From 1954e8b88c61b314f19e7fb1ae2fe61f4a9c5118 Mon Sep 17 00:00:00 2001 From: yaojn Date: Tue, 26 Dec 2023 18:44:34 +0800 Subject: [PATCH] =?UTF-8?q?-=20[=E5=8A=9F=E8=83=BD]TsFormSelect=E7=BB=84?= =?UTF-8?q?=E4=BB=B6change=E6=96=B9=E6=B3=95=E5=88=86=E5=8F=91=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E5=92=8Con-change=E6=96=B9=E6=B3=95=E4=BF=9D=E6=8C=81?= =?UTF-8?q?=E4=B8=80=E8=87=B4=20=20=20-=20[=E5=85=B3=E8=81=94]#[1025390535?= =?UTF-8?q?999488]TsFormSelect=E7=BB=84=E4=BB=B6change=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E5=88=86=E5=8F=91=E5=8F=82=E6=95=B0=E5=92=8Con-change=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E4=BF=9D=E6=8C=81=E4=B8=80=E8=87=B4=20http://192.168.?= =?UTF-8?q?0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947?= =?UTF-8?q?543042/1025390535999488?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/plugins/TsForm/TsFormSelect.vue | 4 ++-- .../pages/autoexec/config/profile/component/params-list.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/resources/plugins/TsForm/TsFormSelect.vue b/src/resources/plugins/TsForm/TsFormSelect.vue index 0322ed5b..effc57e4 100755 --- a/src/resources/plugins/TsForm/TsFormSelect.vue +++ b/src/resources/plugins/TsForm/TsFormSelect.vue @@ -1036,10 +1036,10 @@ export default { } else if (this.value == this.currentValue) { isSame = true; } - this.$emit('change', toValue, valueObject); + let selectItem = this.multiple ? this.selectedList : this.selectedList[0] || {}; + this.$emit('change', toValue, valueObject, selectItem); if (!(!this.isChangeWrite && isSame)) { //改变值时出发on-change事件 - let selectItem = this.multiple ? this.selectedList : this.selectedList[0] || {}; this.$emit('on-change', toValue, valueObject, selectItem); typeof this.onChange == 'function' && this.onChange(toValue, valueObject, selectItem); this.multiple && this.updatePosition(); diff --git a/src/views/pages/autoexec/config/profile/component/params-list.vue b/src/views/pages/autoexec/config/profile/component/params-list.vue index 23ebfab3..8ba01eca 100644 --- a/src/views/pages/autoexec/config/profile/component/params-list.vue +++ b/src/views/pages/autoexec/config/profile/component/params-list.vue @@ -18,7 +18,7 @@ :width="100" transfer class="pr-md" - @change="handleChange(...arguments, data, index)" + @change="(currentValue, valueObj) => handleChange(currentValue, valueObj, data, index)" >