浏览代码

bug 修复

lilei 4 年之前
父节点
当前提交
a4aa0cd9f5
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      components/uni-check-list/uni-check-list.vue

+ 6 - 2
components/uni-check-list/uni-check-list.vue

@@ -75,14 +75,18 @@ export default {
 	},
 	data() {
 		return {
-			list: this.listData,
+			list: [],
 			value: this.defValue
 		};
 	},
 	watch: {
 		listData(newValue, oldValue) {
-			this.list = newValue;
+			this.list = JSON.parse(JSON.stringify(newValue));
+			this.hasCheck();
 		},
+		defValue(newValue, oldValue){
+			this.value = newValue;
+		}
 	},
 	mounted() {
 		this.hasCheck();