fix(docsConfigProvider): Fix the issue where the ConfigProvider theme… #13187
+12
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
… switching causes the theme styles to stack up in the document.
Before submitting a pull request, please read the contributing guide.
在提交 pull request 之前,请阅读 贡献指南。
解决#13179
这个bug存在于文档ConfigProvider全局配置的demo中,并且只有暗色主题存在这个问题,看了下源码,发现应该是在顶部切换主题的时候会默认执行增删van-theme-dark 和van-theme-light逻辑,而ConfigProvider全局配置内部引入了ConfigProvider在加载时会默认添加van-theme-light,应该算是文档的一个小bug,修复逻辑是暂时在ConfigProvider全局配置的示例文件中,如果同时存在这两种主题的话将van-theme-light属性删除,不会影响其他