Skip to content

刷新部分子页面报错并卡死网页 #3148

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

Closed
Bayn-Web opened this issue Jun 12, 2023 · 3 comments
Closed

刷新部分子页面报错并卡死网页 #3148

Bayn-Web opened this issue Jun 12, 2023 · 3 comments

Comments

@Bayn-Web
Copy link

"vuepress": "^1.9.9"
"@vue/cli-plugin-typescript": "^5.0.8",
"@vuepress/client": "^2.0.0-beta.12",
"@vuepress/plugin-register-components": "^1.9.9",
"vuepress-plugin-typescript": "^0.3.1"

我一直在用vuepress做个人组件,直到有一天发现一个子页面刷新后会卡住页面,想着找个时间解决,然后改着改着发现全部子页面都出现这个问题了,只要域名如:5500/b_layout/scroll.html#代码类似的子页面都会出现刷新后卡住不能动的情况,试错发现很困难,目前只改好了一点,这是错误的网址:https://bcomponent.vercel.app/ 这个项目源代码就这这个账号的仓库中,麻烦大家帮忙看看,似乎是和服务端渲染有关。
报错正文:DOMException: Failed to execute 'appendChild' on 'Node': This node type does not support this method.

@Bayn-Web
Copy link
Author

如果删掉所有的代码段 如JavaScript 这样会有效,但我需要这些代码段

@Bayn-Web
Copy link
Author

文档中提到了
<<< @/docs/.vuepress/components/scroll.vue
这个方法似乎也一样不行

@Bayn-Web
Copy link
Author

Bayn-Web commented Jun 14, 2023

在md用到的组件外加ClientOnly标签是一个可行的方案

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

No branches or pull requests

1 participant