From 613ce9d31cbb223c77b0c81e24f67127f23e20d5 Mon Sep 17 00:00:00 2001 From: zer0Black <694429613@qq.com> Date: Sun, 17 Apr 2022 21:46:28 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=AD=97=E5=85=B8=E5=A4=9A=E9=80=89=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=A3=E7=A0=81=E4=B8=8D=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/dict/JMultiSelectTag.vue | 37 +++++++++---------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/jero-web/src/components/dict/JMultiSelectTag.vue b/jero-web/src/components/dict/JMultiSelectTag.vue index b089ccbc..84ab369b 100644 --- a/jero-web/src/components/dict/JMultiSelectTag.vue +++ b/jero-web/src/components/dict/JMultiSelectTag.vue @@ -13,15 +13,16 @@ :getPopupContainer="getParentContainer" optionFilterProp="children" :filterOption="filterOption" - allowClear> - - - {{ item.text || item.label }} - - + allowClear + :options="dictOptions"> + + + + + + + + @@ -62,11 +63,13 @@ this.tagType = this.type } //获取字典数据 - //this.initDictData(); + // this.initDictData(); }, watch:{ - options: function(val){ - this.setCurrentDictOptions(val); + options (val) { + val.forEach((item, index) => { + this.$set(this.dictOptions, index, item) + }) }, dictCode:{ immediate:true, @@ -103,14 +106,8 @@ }, onChange (selectedValue) { - this.value = selectedValue.join(this.spliter); - this.$emit('change', this.value); - }, - setCurrentDictOptions(dictOptions){ - this.dictOptions = dictOptions - }, - getCurrentDictOptions(){ - return this.dictOptions + this.arrayValue = selectedValue; + this.$emit('change', selectedValue.join(this.spliter)); }, getParentContainer(node){ if(!this.popContainer){