Browse Source

bug fixed

wangnan 7 years ago
parent
commit
4965d5ce3d
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/package/choose/src/choose.vue

+ 6 - 2
src/package/choose/src/choose.vue

@@ -114,16 +114,20 @@ export default {
         },
         'listData'(val,oldVal){
             if(val){
-                this.list = val;
-                 this.$refs.areaTabCon.scrollTop = 0;
+                this.$refs.areaTabCon.scrollTop = 0;
                 if(this.tabIndex < this.tempDatas.length){
                    this.tempDatas =  this.tempDatas.slice(0,this.tabIndex);
                 }
+                if(val.length == 0){
+                    return;
+                }
+                this.list = val;
                 this.tempDatas.push({
                     list:val,
                     item:{}
                 });
                 this.tabIndex += 1;
+
             }
         }
     },