06 2021 档案
摘要:compositionstart:compositionstart事件触发于一段文字的输入之前(类似于 keydown 事件,但是该事件仅在若干可见字符的输入之前,而这些可见字符的输入可能需要一连串的键盘操作、语音识别或者点击输入法的备选词)。compositionend:当文本段落的组成完成或取消
阅读全文
摘要:React.forwardRef 会创建一个React组件,这个组件能够将其接受的 ref 属性转发到其组件树下的另一个组件中。这种技术并不常见,但在以下两种场景中特别有用: 官方解释: https://react.docschina.org/docs/forwarding-refs.html#fo
阅读全文
摘要:官方: https://react.docschina.org/docs/react-api.html#reactcomponent 其他博主: React.Children提供了处理this.props.children的工具,this.props.children可以任何数据(组件、字符串、函数
阅读全文
摘要:React 16.6.0 正式发布了!这次主要更新了两个新的重要功能: React.memo() React.lazy(): 使用 React Suspense 进行代码拆分和懒加载 React.memo() 是什么? React.memo() 和 PureComponent 很相似,它帮助我们控制
阅读全文
摘要:提到PureComponent,应该并不是react与生俱来就有的,而应该是在15.3版本之后才出现的,主要是为了取代之前的PureRenderMixin。所以对于几年不怎么接触react的我来说,当提到PureComponent的时候,还是有那么些许的懵逼。更不要说它于Component的区别是什
阅读全文
摘要:官网地址 https://react.docschina.org/docs/thinking-in-react.html 官网介绍了react开发的哲学,即思维模式,有助于理解和实际开发项目。值得推荐! class ProductCategoryRow extends React.Component
阅读全文
摘要:vue-cli 2.0 在webpack.prod.conf.js代码配置 最顶层 增加 const version = new Date().getTime() cosnt webpackConfig = merge(baseWebpackConfig, { ..., // 此处省略 // 增加o
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document<
阅读全文
摘要:// 高德 获取经纬度信息 getLocation () { const _this = this const AMap = window.AMap AMap.plugin('AMap.Geolocation', function () { var geolocation = new AMap.Ge
阅读全文

浙公网安备 33010602011771号