摘要:
//方式1:const copyText = (text, callback) => { // text: 要复制的内容, callback: 回调 var tag = document.createElement('input'); tag.setAttribute('id', 'copy_inp 阅读全文
摘要:
!(function (doc, win) { // 拿到html标签的dom元素对象 var docEle = doc.documentElement, evt = "onorientationchange" in window ? "orientationchange" : "resize", 阅读全文
摘要:
1、import导入 import tx from "@a/images/tx.jpeg" 2、require加载加.defalut <img src={require('../../assets/images/zplogo.png').default} alt=""/> 阅读全文
摘要:
1、修改table表头: div .ant-table-thead > tr > th{ background: #EEF4FE; text-align: center; border-right: 0px !important; font-size:14px; font-weight: 400; 阅读全文
摘要:
history路由(pathname)或者hash路由 (hash) 阅读全文
摘要:
找到node_modules 里面找到 react-loadable 包 componentWillMount 修改为 UNSAFE_componentWillMount 即可。 阅读全文
摘要:
由于用的是axios封装的。 没有指定 axios.defaults.baseURL 阅读全文
摘要:
react的特点: 1、组件化,模块化,虚拟DOM,diff算法。 2、声明式的框架,可追踪性更强。 3、react 只关注视图层 & react 是MVC架构。react可以是这两种,但是react可以的更多。 4、react的灵活、以及react带来的思维模型、直观的API。 5、react将组 阅读全文
摘要:
$.validator.addMethod("xssCheck",function(value,element){ // var strExp=/.*<(script|a|img|link|style|iframe|frame|onerror|body|document)>.*|.*(\'|\"). 阅读全文
摘要:
受控组件:输入的值始终受 React 的 state 驱动。 非受控组件:数据现用现取。 react推荐使用受控组件。 高阶函数(增强函数的作用): 1、函数参数为函数。 2、函数返回一个函数。 阅读全文