您的位置:首页 > Web前端 > Vue.js

使用scoped穿透方法实现修改vue中mint UI组件样式

2018-07-09 18:03 501 查看

效果:


代码:

<div class="goods-swiper"> <mt-swipe :auto="5000" :show-indicators="true"> <mt-swipe-item v-for="(item,index) in goodSwiperLists" :key="index"><img :src="item.image"></mt-swipe-item> </mt-swipe> </div>
修改mint UI swiper组件默认样式.mint-swipe-indicator和.mint-swipe-indicator.is-active,在页面中style使用了scoped之后,直接修改样式根本实现不了,之前一直是给要修改的单独加一个class使用<style scoped></style>和<style></style>两个。

    另外一种方式就是使用scoped穿透方法。

代码:


使用‘>>>’样式修改成功。




阅读更多
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐