vue修改mint-ui默认样式
-
用mint-ui使用switch开关时。与主题颜色不匹配

解决办法:
这里预编译css用的stylus
新建一个mint-ui.styl
$color-theme = #D91D35 .mint-switch-input:checked + .mint-switch-core border-color $color-theme background-color $color-theme.mint-switch-input:checked + .mint-switch-core 指定的css(用chrome定位查看css)
然后在mian.js中引入即可
import "./common/stylus/mint-ui.styl"
效果实现


本文介绍如何通过预编译CSS(Stylus)修改Mint-UI中Switch组件的默认样式,以匹配特定的主题颜色。具体步骤包括创建自定义的mint-ui.styl文件,定义主题颜色变量,并覆盖Switch组件的CSS属性。最后,在main.js中引入自定义样式文件即可实现效果。
600

被折叠的 条评论
为什么被折叠?



