vscode iview樣式覆蓋、自定義樣式

 

重寫一個同名樣式,去覆蓋iview table 中某個樣式,卻沒有效果! 

<style scoped>

.ivu-table-cell {
    padding-left: 2px;
    padding-right: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-break: break-all;
    box-sizing: border-box;
}

</style>

  

需要去掉scoped ,然後給添加class類名稱,限制作用域,防止影響其它頁面。

 .weather-table .ivu-table-cell {
    padding-left: 2px;
    padding-right: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-break: break-all;
    box-sizing: border-box;
}
  .weather-table  .ivu-table-small td {
        height: 36px;
    }

應用案例:

  <Table  size="small" class='weather-table' :height="tableHeight" :columns="minuteColumns" :data="minuteData" ref="table"></Table>                

  

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章