摘要:
calc(50%-200px) => 不生效 calc()计算中的两个值必须同运算符号之间存在空格,否则不会起作用 calc(50% - 200px) => 生效 阅读全文
摘要:
这种情况一般是数据在传递的过程中类型发生了变化,用Number()转化一下数字类型就好了. moment(Number(queryParams.timeBegin)) 阅读全文
摘要:
var now = new Date(); var year = now.getFullYear(); //得到年份 var month = now.getMonth();//得到月份 var date = now.getDate();//得到日期 var day = now.getDay();// 阅读全文
摘要:
echarts里有个属性是axisLabel,当其为1时会隔行显示,设为0时会强制显示所有.示例: xAxis: { data: totalLineChart?totalLineChart.x:[], axisLine: { lineStyle: { color: '#8E8E93' } }, ax 阅读全文
摘要:
在antd的form表单中通常用this.props.form.validateFields()来获取并提交表单信息,那么问题来了,有时为啥会不走validateFields()方法里的代码呢? 这是因为你的form表单里有自定义校验,而你的自定义校验没有用callback()跳出: // 校验角色 阅读全文
摘要:
// 校验密码 validateToNextPassword = (rule, value, callback) => { const { form } = this.props; // 校验密码强度 // 1. 必须同时包含大写字母、小写字母和数字,三种组合 // 2. 长度在8-30之间 con 阅读全文
摘要:
<FormItem {...formItemLayout} label="上级单位" > {form.getFieldDecorator('parentId', { initialValue: edit&&edit.parentId ? JSON.stringify(edit.parentId) : 阅读全文
摘要:
form.setFieldsValue(''parentId'')并不是清空输入框的值,而是将输入框的值恢复到initialValue属性所默认的值。 解决方法: 手动清空 form.setFieldsValue({ parentId: null, }) 阅读全文
摘要:
const { typeChart } = this.props; let echartData = []; if(typeChart){ for(var i in typeChart){ echartData.push({name:typeChart[i].x,value:typeChart[i] 阅读全文
摘要:
有时 git checkout 分支名 的时候会报错:error: pathspec 'dev' did not match any file(s) known to git 。 这是因为本地没有更新过,git不知道有当前分支的存在,执行git pull,然后在 git checkout 分支名 就 阅读全文