Browse Source

bug 修复

lilei 4 years ago
parent
commit
a4aa0cd9f5
1 changed files with 6 additions and 2 deletions
  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();