流浪のwolf

卷帝

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

element设置table某个列的样式

复制代码
     <el-table
          style="width: 100%;"
          height="250"
          :data="tableData"
          border
          size="mini"
          ref="multipleTable"
          :header-cell-style="{
            background: '#80c1e2',
            color: '#fff',
            'text-align': 'center'
          }"
          :header-row-style="{
            height: '26px'
          }"
          :row-style="{ height: '25px' }"
          :cell-style="cellStyle"
        >
复制代码

 

复制代码
    /** 表格样式 【给某一列设置样式】 */
    cellStyle ({ row, column, rowIndex, columnIndex }) {
      if (columnIndex === 0) {
        return "background:#eaf5fb"
      }
      return {
        padding: "0px",
        "text-align": "center",
        "backgroud-color": "#007acc"
      }
    },
复制代码

 

posted on   朱龙旭的网络  阅读(14)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· Blazor Hybrid适配到HarmonyOS系统
· 支付宝 IoT 设备入门宝典(下)设备经营篇
· 万字调研——AI生成内容检测
· 解决跨域问题的这6种方案,真香!
· 一套基于 Material Design 规范实现的 Blazor 和 Razor 通用组件库
点击右上角即可分享
微信分享提示