欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

sass 中使用 /deep/ 修改 elementUI 組件樣式報(bào)錯(cuò)的解決方案

 更新時(shí)間:2024年02月19日 10:00:47   作者:程序員iteng  
這篇文章主要介紹了sass 中使用 /deep/ 修改 elementUI 組件樣式報(bào)錯(cuò)的解決方案,嘗試用 ::v-deep 替換 /deep/ ,成功解決了問題,感興趣的朋友跟隨小編一起看看吧

element plus 想要覆蓋組件的樣式,想到了/deep/樣式穿透,但樣式一直不生效,代碼如下:

<style scoped lang="sass">
.main_wrapper{
	padding: 0 53px
	position: relative
	top: -20px
}
>>> .el-tabs__item{
    height: 30px
    line-height: 30px
    color: #fff!important
}
</style>

上邊的寫法不會報(bào)錯(cuò),但是也不會生效。改用下面的方式:

<style scoped lang="sass">
.main_wrapper{
	padding: 0 53px
	position: relative
	top: -20px
}
/deep/ .el-tabs__item{
    height: 30px
    line-height: 30px
    color: #fff!important
}

這樣就報(bào)錯(cuò)了,SassError: expected selector

解決方法:

嘗試用 ::v-deep 替換 /deep/ ,成功解決了問題。

<style scoped lang="sass">
.main_wrapper{
	padding: 0 53px
	position: relative
	top: -20px
}
::v-deep(.el-tabs__item){
    height: 30px
    line-height: 30px
    color: #fff!important
}

到此這篇關(guān)于sass 中使用 /deep/ 修改 elementUI 組件樣式報(bào)錯(cuò)的文章就介紹到這了,更多相關(guān)sass 使用 /deep/ 報(bào)錯(cuò)內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評論