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

feat: 菜单搜索新增搜索历史和收藏功能 #847

Closed
wants to merge 1 commit into from

Conversation

xiaoxian521
Copy link
Member

@xiaoxian521 xiaoxian521 commented Jan 2, 2024

欢迎pr,该功能会在5.0.0版本发布后着手开发。
可参考 https://cn.vuejs.org/ 的搜索功能

image

大致实现思路参考:

  1. 将搜索历史和收藏功能使用 localforage 缓存本地IndexedDB,如果不支持IndexedDB会自动缓存到localStorage(这里不需要额外处理,因为localforage已经处理过了)
  2. 搜索历史显示的条目可全局 platform-config.json 配置,属性为MenuSearchHistory,默认4个,当大于默认值时覆盖(IndexedDB)掉上一条搜索历史
  3. 收藏功能无需限制条目,需要注意的是从搜索历史里收藏后,要把收藏的条目从搜索历史移除
  4. 搜索历史和收藏功能在删除条目时从本地IndexedDB删除

完成上面功能后再维护一些 pure-admin微前端 代码即可加入 pure-admin 团队!

@xiaoxian521 xiaoxian521 force-pushed the main branch 2 times, most recently from 6a8cdf5 to f17eda3 Compare January 3, 2024 08:12
@xiaoxian521 xiaoxian521 added the pr welcomed 欢迎pr label Jan 4, 2024
@xiaoxian521 xiaoxian521 added the v5.1.0 5.1.0版本 label Jan 24, 2024
@pure-admin pure-admin locked and limited conversation to collaborators Jan 26, 2024
@xiaoxian521
Copy link
Member Author

#901 完成

@xiaoxian521 xiaoxian521 deleted the perf/menu-search branch February 21, 2024 05:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr welcomed 欢迎pr v5.1.0 5.1.0版本
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant