<style scoped>只作用于當(dāng)前組件
<style>作用于全局
1、找到表格泉粉,右鍵檢查元素
.ivu-table th {
height: 40px;
white-space: nowrap;
overflow: hidden;
background-color: #f8f8f9;
}
2连霉、到需要修改的頁面
<style>
.mytable .ivu-table th{
background-color: black;
}
</style>
說明,其他樣式還是寫在<style scoped>嗡靡,此元素寫在<style scoped>沒有作用跺撼,寫在<style>里面又會全部都修改。
給組件外面包一層讨彼,然后再選歉井。注意的是,名字要取好哈误,因為此時哩至。mytable是全局
3躏嚎、iview的modal遮罩層樣式修改
class-name 設(shè)置對話框容器.ivu-modal-wrap的類名,可輔助實現(xiàn)垂直居中等自定義效果
全局style菩貌,因為.ivu-modal-wrap在body里面
<Modal class-name="test"><Modal>
<style> .test{background-color: #1890FF;}<style>