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

  • 相关阅读:
    hibernate二级缓存
    hibernateHQL语句
    hibernate之多对多关系
    SPA项目开发之登录注册
    使用vue-cli搭建SPA项目
    elementUI+nodeJS环境搭建
    Vue路由
    Vue模板语法下集
    网页源码爬取
    Vue模板语法上集
  • 原文地址:https://www.cnblogs.com/javalinux/p/15619033.html
Copyright © 2011-2022 走看看