Bladeren bron

refactor(search): 优化搜索页面历史关键词展示及搜索逻辑

- 重构历史关键词展示布局,使用 Flex 组件实现灵活布局
- 优化关键词点击事件处理,提升用户体验
- 调整搜索逻辑,解决测试中发现的问题- 统一三个搜索页面(已签约、未签约、全部)的展示和搜索逻辑
徐勤民 3 weken geleden
bovenliggende
commit
5e3ca28817
1 gewijzigde bestanden met toevoegingen van 4 en 1 verwijderingen
  1. 4 1
      src/main/ets/view/RefreshView.ets

+ 4 - 1
src/main/ets/view/RefreshView.ets

@@ -5,6 +5,7 @@ export struct RefreshView {
   @Link isLoading: boolean
   @Prop data: Array<ESObject>
   @Require keyGenerator?: (item: ESObject, index: number) => string
+  init: boolean = true
   pageSize: number = 10
   onLoadMore?: (pageNum: number) => void
   onRefresh?: () => void
@@ -15,7 +16,9 @@ export struct RefreshView {
   private _oTime: number = 0
 
   aboutToAppear(): void {
-    this.onRefresh && this.onRefresh()
+    if (this.init) {
+      this.onRefresh && this.onRefresh()
+    }
   }
 
   // 使用父组件@Builder装饰的方法初始化子组件@BuilderParam