vue看板表格top3样式

 <el-table
      :data="tableData"
      class="topTable electricalDevArr mt-10"
  >
      <!-- <el-table-column prop="id" label="排名" width="50" /> -->
      <el-table-column
          label="排名"
          width="50">
          <template slot-scope="scope">
              <!-- {{  scope.$index+1}} -->
              <div v-if=" scope.$index+1<4"> </div>
              <div v-else>{{  scope.$index+1}}</div>
          </template>
          </el-table-column>
      <el-table-column prop="mingcheng" label="设备名称" width="70" />
      <el-table-column prop="shichang" sortable label="运行时长(h)"  width="70" />
      <el-table-column prop="shuliang"  sortable label="报警数量(条)"  width="80" />
  </el-table>
tableData:[
                {
                    "mingcheng": "1#气调库",
                    "shichang": 682,
                    "shuliang": 32,
                },
                {
                    "mingcheng": "#4冷凝器",
                    "shichang": 423,
                    "shuliang": 12,
                },
                {
                    "mingcheng": "10#保鲜库",
                    "shichang": 411,
                    "shuliang": 27,
                },
                {
                    "mingcheng": "3#气调库",
                    "shichang": 324,
                    "shuliang": 25,
                },
                {
                    "mingcheng": "#1冲霜水泵",
                    "shichang": 241,
                    "shuliang": 8,
                },
                {
                    "mingcheng": "4#保鲜库",
                    "shichang": 124,
                    "shuliang": 11,
                },
                {
                    "mingcheng": "3#气调库",
                    "shichang": 89,
                    "shuliang": 29,
                },
                {
                    "mingcheng": "5#气调库",
                    "shichang": 76,
                    "shuliang": 27,
                },

            ],
.topTable.el-table::before {
        height: 0;
    }
    .topTable {
        background: transparent!important;
    }
    .topTable  tr {
        background-color: transparent!important;
    }
    .topTable  .el-table__body tr:hover>td.el-table__cell {
        background-color: transparent!important;
    }
    .topTable  td.el-table__cell {
        border: 0;
        color: #ffffff;
        text-align: center;
    }
    .topTable  .el-table__body tr:nth-child(1) {
        background-image: url('../../assets/shangxueyuan/top1.png');
        background-size: 100% 100%;
        background-origin: center;
        background-repeat: no-repeat;
    }
    .topTable  .el-table__body tr:nth-child(2) {
        background-image: url('../../assets/shangxueyuan/top2.png');
        background-size: 100% 100%;
        background-origin: center;
        background-repeat: no-repeat;
    }
    .topTable  .el-table__body tr:nth-child(3) {
        background-image: url('../../assets/shangxueyuan/top3.png');
        background-size: 100% 100%;
        background-origin: center;
        background-repeat: no-repeat;
    }
    .topTable  th.is-leaf {
        border: 0;
        color: #17CAF0;
        text-align: center;
        background-color: #0D387B!important;
    }
    .topTable  .el-table__body-wrapper.is-scrolling-none::-webkit-scrollbar {
        width: 8px;
        height: 8px; 
    }
    .topTable  .el-table__body-wrapper.is-scrolling-none::-webkit-scrollbar-thumb {
        width: 6px;
        border-radius: 10px;
        -webkit-box-shadow: inset 0 0 5px #8398BC;
        background: rgba(0,0,0,0.2);
    }
    .topTable  .el-table__body-wrapper.is-scrolling-none::-webkit-scrollbar-track {
        width: 2px;
        -webkit-box-shadow: inset 0 0 5px #8398BC;
        border-radius: 0;
        background: #07317D;
    }
    .topTable  .el-table__body-wrapper.is-scrolling-none::-webkit-scrollbar-corner {
        width: 0;
        height: 0;
    }
Vue 3 的看板滚动列表样式同样可以通过 CSS 进行设置,以下是一个基本的示例: ```html <template> <div class="board-container"> <div class="board-column" v-for="(column, index) in columns" :key="index"> <div class="column-header">{{ column.title }}</div> <div class="column-body" ref="columnBody" @scroll="handleScroll"> <div class="card" v-for="card in column.cards" :key="card.id">{{ card.title }}</div> </div> </div> </div> </template> <script> export default { data() { return { columns: [ { id: 1, title: 'To Do', cards: [ { id: 1, title: 'Task 1' }, { id: 2, title: 'Task 2' }, { id: 3, title: 'Task 3' } ] }, { id: 2, title: 'In Progress', cards: [ { id: 4, title: 'Task 4' }, { id: 5, title: 'Task 5' } ] }, { id: 3, title: 'Done', cards: [ { id: 6, title: 'Task 6' }, { id: 7, title: 'Task 7' }, { id: 8, title: 'Task 8' } ] } ] } }, methods: { handleScroll(event) { // do something on scroll } } } </script> <style> .board-container { display: flex; overflow-x: auto; height: 100%; } .board-column { flex: 0 0 300px; margin-right: 16px; } .column-header { font-weight: bold; margin-bottom: 16px; } .column-body { height: calc(100% - 36px); overflow-y: auto; border: 1px solid #ccc; border-radius: 4px; padding: 16px; } .card { background-color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); border-radius: 4px; margin-bottom: 16px; padding: 8px; } </style> ``` 在上述示例中,`.board-container` 是一个固定高度、可横向滚动的容器。`.board-column` 是每个看板列的样式设置,包括了 `flex`、`margin-right` 等。`.column-header` 是每个看板列标题的样式设置,包括了 `font-weight` 和 `margin-bottom` 等。`.column-body` 是每个看板列的滚动列表样式设置,包括了 `height`、`overflow-y`、`border`、`border-radius` 和 `padding` 等。在 `handleScroll` 方法中,可以获取到滚动事件的信息,并进行相应的处理。 注意,Vue 3 的看板组件需要使用 `v-for` 指令来渲染看板列和卡片。在上述示例中,使用了 `v-for="(column, index) in columns"` 来遍历看板列,使用了 `v-for="card in column.cards"` 来遍历看板列中的卡片。同时,每个看板列的滚动列表需要添加 `ref="columnBody"`,以便在 `handleScroll` 方法中获取到对应的滚动事件。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值