jwyu пре 2 година
родитељ
комит
0b6042827a
1 измењених фајлова са 16 додато и 1 уклоњено
  1. 16 1
      pages-myChart/list.vue

+ 16 - 1
pages-myChart/list.vue

@@ -9,6 +9,7 @@
                 style="flex:1"
             />
         </view>
+        <template v-if="isSearch||classify_id">
         <view class="report-empty-box" v-if="list.length==0&&finished">
             <image
                 :src="globalImgUrls.chartEmpty"
@@ -23,6 +24,7 @@
             </view>
             <view style="height:0;width: 47%;"></view>
         </view>
+        </template>
     </view>
       
 </template>
@@ -42,7 +44,8 @@ export default {
             pageSize:20,
             finished:false,
             keyword:'',
-            classify_id:''
+            classify_id:'',
+            isSearch:false
         }
     },
     onLoad(opt){
@@ -68,9 +71,21 @@ export default {
     methods: {
         onChange(e){
             this.keyword=e
+            if(!e){
+                this.page=1
+                this.list=[]
+                this.finished=false 
+                this.isSearch=false
+            }
         },
 
         onSearch(){
+            if(!this.keyword){
+                this.isSearch=false
+            }else{
+                this.isSearch=true
+            }
+            
             this.page=1
             this.list=[]
             this.finished=false