11 2020 档案
摘要:const [receiveData, setReceiveData] = React.useState([ { key:1, paymentId:'', paymentName:'', paymentAccount:'', paymentInfo:'', paymentAmount:'', },{
阅读全文
摘要:一、参数规则 1、可选的 2、数组类型 3、值为state或者props 二、不同的参数和返回 1、不传参数 默认的行为,会每次 render 后都执行,一般表单控制中使用 类似于类组件中的componentDidMoount以及componentDidUpdate useEffect(() =>
阅读全文
摘要:1 const React = { 2 Children: { 3 map, 4 forEach, 5 count, 6 toArray, 7 only, 8 }, 9 10 createRef, 11 Component, 12 PureComponent, 13 14 createContext
阅读全文
摘要:1 const data = [{ 2 name: "撤回", 3 type: "withdraw" 4 }, { 5 name: "...", 6 type: "other", 7 children: [{ 8 name: "会签", 9 type: "sign" 10 }] 11 }]; 12
阅读全文
摘要:1 const data = [{ 2 name: "撤回", 3 type: "withdraw" 4 }, { 5 name: "...", 6 type: "other", 7 children: [{ 8 name: "会签", 9 type: "sign" 10 }] 11 }]; 12
阅读全文
摘要:1、Object.hasOwnProperty(prop); 定义:判断某对象是否包含某属性 参数:prop 要检测的属性 字符串 名称或者 Symbol(ES6) 2、Object.definProperty(obj,prop,desc); 定义:在一个对象上定义一个新属性,或者修改一个已经存在的
阅读全文
摘要:我们在使用window.print打印页面信息的时候,往往要新增或者删除一些Dom节然后去定制化打印; 我们通过设置打印的样式确定打印区域@media print 设置具体区域; 废话少说上代码工具类print.ts 1 // 设置打印样式 2 const getStyle = () => { 3
阅读全文

浙公网安备 33010602011771号