From 8e016af8ab821981a645af852a1caacf35a0aec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E9=91=AB?= Date: Thu, 17 Dec 2020 00:12:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/roadwayManage/model.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/views/roadwayManage/model.vue b/src/views/roadwayManage/model.vue index 4fa21f6..881bc9b 100644 --- a/src/views/roadwayManage/model.vue +++ b/src/views/roadwayManage/model.vue @@ -193,13 +193,14 @@ export default { this.title = newVal; }, modelData: function(newVal){ + // console.log(newVal) if(newVal.id){ this.mdata=newVal this.leftType=newVal.leftType this.rightType=newVal.rightType - console.log('更新了') - this.$nextTick(()=>{ - this.form.setFieldsValue({ //setFieldsValue 表示对form表单重新设置值 + // console.log('触发了watch,重新赋值') + this.$nextTick(()=>{ //this.$nextTick解决不能在表单渲染之前赋值的报错问题 + this.form.setFieldsValue({ //setFieldsValue 表示对form表单重新设置值 name:newVal.name, plcId:newVal.plcId, leftType:newVal.leftType === null ? '' : newVal.leftType === 0 ? '单伸' : '双伸',