From 80fbfceb0ef9264d8dcec414eaf22c1017021758 Mon Sep 17 00:00:00 2001 From: yurj26 <1816387074@qq.com> Date: Thu, 15 Jun 2023 11:25:11 +0800 Subject: [PATCH] feat(component): change event --- pages/component/checkbox/checkbox.uvue | 5 ++--- pages/component/radio/radio.uvue | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pages/component/checkbox/checkbox.uvue b/pages/component/checkbox/checkbox.uvue index 31f25c83..ec9e521b 100644 --- a/pages/component/checkbox/checkbox.uvue +++ b/pages/component/checkbox/checkbox.uvue @@ -94,10 +94,9 @@ } }, methods: { - checkboxChange: function (value : string[]) { - // TODO 后续更改参数 + checkboxChange: function (e : CheckboxGroupChangeEvent) { var items = this.items, - values = value; + values = e.detail.value; for (var i = 0, lenI = items.length; i < lenI; ++i) { const item = items[i] if (values.indexOf(item.value) >= 0) { diff --git a/pages/component/radio/radio.uvue b/pages/component/radio/radio.uvue index d9e63896..b9794d95 100644 --- a/pages/component/radio/radio.uvue +++ b/pages/component/radio/radio.uvue @@ -81,9 +81,9 @@ } }, methods: { - radioChange(e : string) { + radioChange(e : RadioGroupChangeEvent) { for (let i = 0; i < this.items.length; i++) { - if (this.items[i].value === e) { + if (this.items[i].value === e.detail.value) { this.current = i; break; } -- GitLab