Browse Source

Merge branch 'v2-dev' of https://github.com/jdf2e/nutui into v2-dev

yumingming11 5 years ago
parent
commit
a51d0d98c6
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/packages/picker/picker.vue

+ 7 - 1
src/packages/picker/picker.vue

@@ -68,6 +68,9 @@ export default {
       this.chooseValueData = [...this.defaultValueData];
       this.cacheValueData = [...this.defaultValueData];
       this.$emit('confirm', this.cacheValueData);
+    },
+    listData: function() {
+      this.init();
     }
   },
   methods: {
@@ -97,7 +100,7 @@ export default {
       }
     }
   },
-  created() {
+  init() {
     if (this.defaultValueData && this.defaultValueData.length) {
       this.chooseValueData = [...this.defaultValueData];
     } else {
@@ -107,6 +110,9 @@ export default {
       });
       this.chooseValueData = [...defaultValueData];
     }
+  },
+  created() {
+    this.init();
   }
 };
 </script>