dyy-dida
/*实现表格头数据换行*/
.el-table .cell {
    /*text-align: center;*/
    white-space: pre-line;/*保留换行符*/
}

  写法:   

                              <el-table-column v-for="(item,index) in tableColums" :key="index"
                                                                     :prop="item.prop"
                                                                     :label="item.label"
                                                                     :width="item.width"
                                                                     align="center"
                                                                     show-overflow-tooltip>
                                                    </el-table-column>
  
                               
                               
                               

  

<el-table-column prop="name" :label="\'数据\n单位\'" align="center" show-overflow-tooltip></el-table-column>//
第一种写法

  

tableColums:[{prop:\'name\',label:\'数据\n单位\'}]//
第二种写法

  

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
  • 2021-06-03
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
相关资源
相似解决方案