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

[style]浅色模式无法使用css变量,切换深色模式正常 #1732

Closed
willianfu opened this issue Jan 21, 2025 · 1 comment · Fixed by Tencent/tdesign-common#2038
Closed
Assignees

Comments

@willianfu
Copy link

tdesign-mobile-vue 版本

1.7.0

重现链接

https://stackblitz.com/edit/vitejs-vite-e1tt7hfm?file=src%2FApp.vue&terminal=dev

重现步骤

复现demo已放在上方链接内,不知是我遗漏了哪一步还是存在bug,按照mobile文档操作的

复现demo
1、在vue3、vite项目 安装tdsign-mobile-vue
2、main.js 全局注册TDesign,导入依赖
import TDesign from 'tdesign-mobile-vue'; import 'tdesign-mobile-vue/es/style/index.css';

3、组件内使用css变量,浅色模式无效

Image

添加 document.documentElement.setAttribute('theme-mode', 'dark');
切换深色模式后正常

Image

期望结果

No response

实际结果

No response

框架版本

No response

浏览器版本

edge

系统版本

win11

Node版本

20.0.0

补充说明

No response

Copy link
Contributor

👋 @willianfu,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@willianfu willianfu changed the title 浅色模式无法使用css变量,切换深色模式正常 [style]浅色模式无法使用css变量,切换深色模式正常 Jan 21, 2025
@anlyyao anlyyao self-assigned this Jan 22, 2025
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 a pull request may close this issue.

2 participants