Przeglądaj źródła

清空搜索时,把 AppSearchModule 组件中输入的内容也置空

shizhongqi 7 miesięcy temu
rodzic
commit
9ab523eca3
1 zmienionych plików z 4 dodań i 1 usunięć
  1. 4 1
      ghsApp/src/admin/home/order.vue

+ 4 - 1
ghsApp/src/admin/home/order.vue

@@ -25,7 +25,7 @@
         <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" defaultShowName="时间" />
       </view>
       <view class="search-container">
-        <AppSearchModule placeholder="这里搜索" @input="searchFn" />
+        <AppSearchModule ref="appSearch" placeholder="这里搜索" @input="searchFn" />
         <view v-if="customId != 0" class="search-clear-overlay" @click.stop="clearSearch">清空搜索</view>
       </view>
       <view>
@@ -375,6 +375,9 @@ export default {
       }
     },
     clearSearch() {
+      if (this.$refs.appSearch) {
+        this.$refs.appSearch.inputEmptyFn();
+      }
       this.closeMore();
       this.customId = 0;
       this.searchTime = '';