From 56317489bf3c7fe196c5b794100b2875ee82aa2c Mon Sep 17 00:00:00 2001 From: hdx Date: Mon, 22 Jan 2024 17:16:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(enum-data=E7=BB=84=E4=BB=B6):=20=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E9=94=99=E8=AF=AF=E5=AF=BC=E8=87=B4=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/enum-data/enum-data.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/components/enum-data/enum-data.vue b/components/enum-data/enum-data.vue index 00f263a1..00c4818b 100644 --- a/components/enum-data/enum-data.vue +++ b/components/enum-data/enum-data.vue @@ -22,11 +22,10 @@ // @ts-ignore _change(e : RadioGroupChangeEvent) { const selected = this.items.find((item : ItemType) : boolean => { - return item.name == e.detail.value + return item.value.toString() == e.detail.value }) if (selected != null) { - this.current = selected.value - this.$emit('change', this.current) + this.$emit('change', selected.value) uni.showToast({ icon: 'none', title: '当前选中:' + selected.name, @@ -46,7 +45,7 @@ + :class="index < items.length - 1 ? 'uni-list-cell-line' : ''" :value="item.value"> {{ item.name }} -- GitLab