使用rem时 部分vux组件的字体大小不受控制的问题

使用vux 的Calendar组件时,日历头部的文字出现了字体过大的情况:
调试发现这里的字体大小使用的是html的font-size,因为我用的rem,html的font-size不能随便改。尝试在vue文件中使用 /deep/ ( → →修改子组件样式) 和!important都失败了,根本没有作用到元素...
然后我在APP.vue(页面级vue组件)中引入一个样式控制:
在uiChange.less中覆盖掉组件样式:
.calendar-header{ font-size:0.3rem!important; } caption,th { text-align: center; font-weight: normal; font-size: 0.25rem; }
问题得以解决
版权声明:
作者:东明兄
链接:https://blog.crazyming.com/note/432/
来源:CrazyMing
文章版权归作者所有,未经允许请勿转载。


共有 0 条评论