1、 表单数据回写
- import pick from 'lodash.pick'//要引用这个必然会报pick错
-
- this.form.resetFields();
- this.model = Object.assign({}, record)
- this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model, 'tenantId', 'devUsername', 'locationId', 'devPwd',
- 'locationType', 'cloudAddress', 'devId', 'cloudPort', 'devName', 'productKey',
- 'devIp',
- 'productName'))
- })
解决:使用this.$nextTick或者setTimeout