zoukankan      html  css  js  c++  java
  • Element获取table中选中的行

    实验版本为:Element2.13.1

    ‘’this.$refs.multipleTable.selection‘获取表格选中行信息 :

    <el-button type="primary" @click="getSelection">获取</el-button>
    <el-table :data="tableData" ref="multipleTable" border>
    <el-table-column type="selection" width="55"></el-table-column>
    <el-table-column prop="date" label="日期" width="180"></el-table-column>
    <el-table-column prop="name" label="姓名" width="180"></el-table-column>
    <el-table-column prop="address" label="地址" width="300"></el-table-column>
    </el-table>
    methods: {
    getSelection() {
    const _selectData = this.$refs.multipleTable.selection;
    console.log(_selectData);
    }
    }
    ————————————————
    版权声明:本文为CSDN博主「duansamve」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/duansamve/article/details/105900195

  • 相关阅读:
    rem 适配
    1px实现方案
    伪类选择器
    css中如何做到容器按比例缩放
    rem移动端适配方案
    Quartz.NET实现作业调度
    iPhone X
    优化hexo访问速度-将hexo部署到云主机VPS
    网页设计命名规范
    网站注册页面
  • 原文地址:https://www.cnblogs.com/javalinux/p/15619033.html
Copyright © 2011-2022 走看看