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>                

  

 

posted @ 2021-12-08 09:31  hao_1234_1234  阅读(319)  评论(0编辑  收藏  举报