Przeglądaj źródła

Merge branch 'dev/v1.2.12_yf' of jianyu/jy-docs into feature/v1.2.12

yangfeng 1 rok temu
rodzic
commit
9347ccd7e5
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      jydocs-mobile/src/views/Search.vue

+ 2 - 0
jydocs-mobile/src/views/Search.vue

@@ -219,6 +219,8 @@ export default class extends Vue {
   onInput (search: string) {
     this.listState.value = search.trim().replace(/\s+/g, ' ')
     if (!this.listState.value) {
+      // 在当前页清除输入框值回到剑鱼搜索需要同时清除掉原来输入框值的缓存
+      localStorage.removeItem('JY-MOBILE-home-top-search')
       history.back()
     }
   }