| commit | ec2317212d5579b6f84475894a8fc7c65313952f | [log] [tgz] |
|---|---|---|
| author | wjun94 <kasepa1994@gmail.com> | Mon Jul 01 21:37:51 2019 +0800 |
| committer | wjun94 <kasepa1994@gmail.com> | Mon Jul 01 21:37:51 2019 +0800 |
| tree | c094a8d8d1d56d4bb0d9ed458f701389886095ee | |
| parent | bd194a23b85b3b0610322de57d5c50d8d196fcc3 [diff] |
[!] wxc-radio組件修改list array時無法修改期選中項
diff --git a/packages/wxc-radio/index.vue b/packages/wxc-radio/index.vue index 34e2238..5e69dd2 100644 --- a/packages/wxc-radio/index.vue +++ b/packages/wxc-radio/index.vue
@@ -46,7 +46,13 @@ } }, watch: { - list (newList) { + list (newList, oldList) { + if (JSON.stringify(newList) !== JSON.stringify(oldList.map(v => { + const {title, value} = v + return {title, value} + }))) { + this.checkedIndex = -1 + } this.setListChecked(newList); } },