Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: 使用 EventBus 触发搜索 #1576

Merged
merged 1 commit into from
Sep 12, 2023
Merged

ref: 使用 EventBus 触发搜索 #1576

merged 1 commit into from
Sep 12, 2023

Conversation

IITII
Copy link
Member

@IITII IITII commented Sep 12, 2023

  • 相同 key 跳过路由跳转, 应该使用 this.$route.params.key 进行判定
  • 跳过的路由跳转, 使用 EventBus 触发搜索
  • 手动触发时, 强制搜索

#257
#1508
#1561

@Meng-Lan

* 相同 key 跳过路由跳转, 应该使用 this.$route.params.key 进行判定
* 跳过的路由跳转, 使用 EventBus 触发搜索
@IITII IITII merged commit 2bec711 into pt-plugins:dev Sep 12, 2023
1 check passed
@Meng-Lan
Copy link

看起来实现应该是用户按下Enter将强制搜索?解决相同key切换solution之后无法触发搜索应该是ok的。
我之前预想的是组合key和solution作为一个pair,比较一下是否一致来决定是否执行搜索。

@IITII
Copy link
Member Author

IITII commented Sep 12, 2023

是. 这几次主要解决

  • 同路由跳转报错: NavigationDuplicated: Avoided redundant navigation to current location
  • 搜索方案切换立即搜索, 但是使用的是上一次的 key, 而不是搜索框实际的
  • 跨组件通讯
  • 手动触发时, 强制搜索

你之前的那种大概率是不行, 用户都手动操作了, 肯定要保存的. @Meng-Lan 这块逻辑还是蛮复杂的.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants