摘要:
锚点跳转 document.getElementById("task").scrollIntoView(); 阅读全文
摘要:
window.scrollY + this.Refs_btn.current.offsetTop < document.body.scrollHeight scrollY 滚动条滚动的距离 offsetTop 元素对于视图顶部的距离scrollHeight 滚动条+视图高度,即文档高度 阅读全文
摘要:
引入插件 react-transition-group import { CSSTransition, TransitionGroup } from 'react-transition-group' class TextAnimation extends Component { state = { 阅读全文
摘要:
if (UserAgent.app.weixin && UserAgent.env.android) { //安卓回退弹窗兼容 try { window.tbs_bridge.nativeExec('network', 'type', 0, null); } catch (e) { console. 阅读全文
摘要:
var browserRule = /^.*((iPhone)|(iPad)|(Safari))+.*$/; if (browserRule.test(navigator.userAgent)) { window.onpageshow = function (event) { if (event.p 阅读全文
摘要:
转载自:https://blog.csdn.net/weixin_44134588/article/details/112178199 需求二的样式问题, 之前默认是17改成51即可 变成一行展示3个 阅读全文
摘要:
替换有什么好处? 显然,当我们考虑升级或重构时,我们总是用“它以目前的方式工作得很好”为借口推脱。那么,这是否值得升级? 更小的bundle: react-loadable gzip后大概是 2K,去掉这个第三方库后,所以打包时间并没有减少多少,但是确确实实减少了2K。 增加可维护性:使用 Reac 阅读全文
摘要:
// 原生实现promise基本功能,实现依次调用,eg:a().then() //不用考虑实现race all finally的复杂功能 function Promise(fn) { if (typeof fn !== 'function') { throw new Error('Resolver 阅读全文
摘要:
https://zh-hans.reactjs.org/docs/context.html#when-to-use-context 阅读全文
摘要:
开发环境:development 应用: module-cheap-eval-source-map生产环境:production 应用: modul-cheap-source-map eval-source-map组合使用是指将.map以DataURL的形式引入到打包好的模块中,类似于inline属 阅读全文