From 506b5b59e3899d8dd40a61cc8b9a575bbde3caaa Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期一, 06 五月 2024 18:24:33 +0800 Subject: [PATCH] 添加action --- Source/ProjectWeb/src/components/PLT-basic-component/basicForm.vue | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Source/ProjectWeb/src/components/PLT-basic-component/basicForm.vue b/Source/ProjectWeb/src/components/PLT-basic-component/basicForm.vue index c8c67c8..718ae8f 100644 --- a/Source/ProjectWeb/src/components/PLT-basic-component/basicForm.vue +++ b/Source/ProjectWeb/src/components/PLT-basic-component/basicForm.vue @@ -70,7 +70,11 @@ //琛ㄥ崟鏄惁鍙紪杈� type:Boolean, default:true - } + }, + initValue:{ + type: Object, + default: () => {}, + }, }, data() { return { @@ -103,10 +107,13 @@ watch: { formItems: { handler(val) { - if(val[0] &&val[0].column && val[0].column.isArray()){ + if (val[0] && val[0].column && val[0].column.isArray()) { this.getInitGroup(val); - }else{ + } else { this.getInit(val); + } + if (this.initValue) { + Object.assign(this.form, this.initValue); } }, immediate: true, @@ -154,7 +161,6 @@ code = this.initItem(code); column.push(code); this.allColumn.push(code); - console.log('allColumn',this.allColumn) } this.option.column = column; }, @@ -220,9 +226,9 @@ if(col.data && col.data.length>0){ col.dicData = col.data.map((d) => { return { - label: d.value, - key: d.key, - value: d.key, + label: d.key, + key: d.value, + value: d.value, attributes:d.attributes }; }); -- Gitblit v1.9.3