-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
[Bug] VantResolver 自动导入打包后会导致css加载顺序错误 #327
Comments
解决没有 |
没有, 不过找到个解决方案就是在app.vue里使用一个空的van-button组件 |
可能还需要全局引入他的 css 文件 |
没人来修复吗? |
这样 |
有什么解决办法吗? |
同样遇到这个问题了。 |
按需引入的样式一定在自定义样式之后,能快速想到的解决办法就是加!important。因为我也没找到能保证加载所有样式之后的方法 |
贴一下我的解决办法 ,按需导入时不导入样式,手动加载全部样式
|
有个新方法,用scss或less
|
这样太麻烦了吧,全部引入样式体积不会大很多,这样的话也不用额外单独导入toast,dialog等样式了 |
此问题彻底解决前, 建议样式css静态全局引入, js 按需加载时关闭样式. |
今天也碰到这个问题了,什么时候才能修复,排查了半天。。 |
来自2024年,4x版本dialog组件也是加载样式顺序有问题。我是本地调试无问题,但是打包静态文件后dialog样式错乱 |
复现Demo:https://github.com/yanbowe/vite-vant-demo
复现步骤:
1.pnpm安装依赖
2.pnpm dev本地运行查看效果
3.pnpm build & pnpm preview查看效果
The text was updated successfully, but these errors were encountered: