core: [Bug report]plugin-docsearch: Using the vue theme page will cause the search plugin to render repeatedly
Bug report
I used the vuepress-docSearch plugin in my theme, but it seems to be rendered repeatedly as shown in the figure below. I am very surprised that such a thing will happen. If the page is rendered with markdown page, it will not happen, but if it is used with vue page, it will happen. .
Description
The plugin-docsearch plugin repeated rendering on my vue theme page.
Steps to reproduce
- Use Search “Mac” on my homepage,
- After the jump Search ”vscode"
- After the jump Search ”Mac"
- Reproduction link / repo: https://www.qbenben.com/
Expected behavior
The plugin-docsearch plugin only render once
Screenshots

- render 4 time
- But it is normal to search only after refreshing the md page

Environment info
- Browser:
System:
OS: macOS 12.0.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 30.88 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 12.22.0 - /var/folders/p3/55bvbjg57lzb1d2b_mwbzykw0000gn/T/yarn--1641138157713-0.534447467104483/node
Yarn: 1.22.4 - /var/folders/p3/55bvbjg57lzb1d2b_mwbzykw0000gn/T/yarn--1641138157713-0.534447467104483/yarn
npm: 6.14.11 - ~/.nvm/versions/node/v12.22.0/bin/npm
Utilities:
Git: 2.30.1 - /usr/bin/git
Browsers:
Chrome: 96.0.4664.110
Edge: Not Found
Firefox: Not Found
Safari: 15.1
npmPackages:
@vuepress/bundler-vite: 2.0.0-beta.31 (2.0.0-beta.32)
@vuepress/bundler-webpack: 2.0.0-beta.30
@vuepress/cli: 2.0.0-beta.31 (2.0.0-beta.32)
@vuepress/client: 2.0.0-beta.29 (2.0.0-beta.32)
@vuepress/core: 2.0.0-beta.29 (2.0.0-beta.32)
@vuepress/markdown: 2.0.0-beta.29 (2.0.0-beta.32)
@vuepress/plugin-active-header-links: 2.0.0-beta.29 (2.0.0-beta.32)
@vuepress/plugin-back-to-top: 2.0.0-beta.30 (2.0.0-beta.32)
@vuepress/plugin-container: 2.0.0-beta.29 (2.0.0-beta.32)
@vuepress/plugin-debug: Not Found
@vuepress/plugin-docsearch: 2.0.0-beta.29 => 2.0.0-beta.29
@vuepress/plugin-external-link-icon: 2.0.0-beta.29 (2.0.0-beta.32)
@vuepress/plugin-git: 2.0.0-beta.29 (2.0.0-beta.32)
@vuepress/plugin-google-analytics: 2.0.0-beta.29
@vuepress/plugin-medium-zoom: 2.0.0-beta.29 (2.0.0-beta.32)
@vuepress/plugin-nprogress: 2.0.0-beta.29 (2.0.0-beta.32)
@vuepress/plugin-palette: 2.0.0-beta.29 (2.0.0-beta.32)
@vuepress/plugin-prismjs: 2.0.0-beta.29 (2.0.0-beta.32)
@vuepress/plugin-pwa: Not Found
@vuepress/plugin-pwa-popup: Not Found
@vuepress/plugin-register-components: Not Found
@vuepress/plugin-search: Not Found
@vuepress/plugin-shiki: Not Found
@vuepress/plugin-theme-data: 2.0.0-beta.29 (2.0.0-beta.32)
@vuepress/plugin-toc: Not Found
@vuepress/shared: 2.0.0-beta.28 (2.0.0-beta.32)
@vuepress/theme-default: 2.0.0-beta.31 (2.0.0-beta.32)
@vuepress/utils: 2.0.0-beta.28 (2.0.0-beta.32)
vue: 3.2.26
vue-loader: 16.8.3
vue-router: 4.0.12
vuepress: ^2.0.0-beta.31 => 2.0.0-beta.32
vuepress-vite: 2.0.0-beta.31 => 2.0.0-beta.31 (2.0.0-beta.32)
vuepress-webpack: 2.0.0-beta.31 => 2.0.0-beta.31
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (4 by maintainers)
Sorry for forgetting noticeing you I made a repro on my site, I already open an issue to docsearch repo, and you can track that issue to see how we can solve it.