diff --git a/components/enum-data/enum-data.vue b/components/enum-data/enum-data.vue index 00f263a147d3093dfe946a824b98f4e1cc7cb79c..00c4818b1739b9e47019a70790a260013e9f2a79 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 }}