zoukankan      html  css  js  c++  java
  • el-table多选框,只选一个的方法

    <el-table
          ref="table"
          v-loading="listLoading"
          :data="tableData"
          border
          :row-key="getRow"
          stripe
          :height="tableHeight"
          :header-cell-style="{'background':'#F5F4F7'}"
          @selection-change="handleCurrentChange"
        >
          <el-table-column
            type="selection"
            width="50"
            align="center"
            fixed="left"
            :resizable="false"
          />
          <el-table-column
            type="index"
            label="序号"
            width="60"
            fixed="left"
            :index="indexMethod"
            align="center"
          />
          <el-table-column
            prop="strdate"
            label="单据日期"
            min-width="160"
          />
    </el-table>
    methods: {
        handleCurrentChange(val) {
          this.currentRow = val
          this.tableData.forEach(item => {
            if (val[val.length - 1] === item) {
              this.$refs.table.toggleRowSelection(item, true)
            } else {
              this.$refs.table.toggleRowSelection(item, false)
            }
          })
        },
    }
  • 相关阅读:
    VGA Vesa DDC显示接口
    sourceinsight 技巧
    framebuffer 相关
    Windows Live Writer 粘贴表格的使用技巧
    The Linux Kernel API
    XBAP and Silverlight : Product Lining in .NET 3.0/WPF
    DDC and EDID
    cmem模块,cmemk
    Linux Platform Device and Driver,platform_add_devices()>platform_driver_register()
    platform设备驱动全透析
  • 原文地址:https://www.cnblogs.com/hellofangfang/p/15018927.html
Copyright © 2011-2022 走看看