Parcourir la source

bug fix in selector.vue

louyu il y a 7 ans
Parent
commit
b3861269e8
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 4 1
      src/components/selector.vue

+ 4 - 1
src/components/selector.vue

@@ -43,7 +43,10 @@
       methods:{
       methods:{
         showPopup(){
         showPopup(){
           this.popupVisible=true;
           this.popupVisible=true;
-          this.selectedValue=this.slots[0].values[0];
+          if(!this.selectedValue){
+            this.selectedValue=this.slots[0].values[0];
+          }
+
           this.$emit('input',this.selectedValue);
           this.$emit('input',this.selectedValue);
         },
         },
         onValuesChange(picker,val){
         onValuesChange(picker,val){