Vue element 表格获取选中项操作

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

一、在使用element table表格时,获取选中项处理

1.视图

获取选中结果

2.js

export default {
  data() {
    return {
      tableData3: [
        {
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄"
        },
        {
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄"
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄"
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄"
        },
        {
          date: "2016-05-08",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄"
        },
        {
          date: "2016-05-06",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄"
        },
        {
          date: "2016-05-07",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄"
        }
      ],
      multipleSelection: []
    };
  },
  methods: {
    //保存选中结果
    handleSelectionChange(val) {
      console.info(val);
      this.multipleSelection = val;
    },
    //获取选中结果
    getSelected() {
      console.info(this.multipleSelection);
      console.info(this.$refs.multipleTable.tableData);
      console.info(this.$refs.multipleTable);
    }
  }
};

Vue element 表格获取选中项操作_第1张图片

更多:

Vue element 二级菜单绑定示例

 Vue中路由管理器Vue Router使用介绍(三)

Vue中路由管理器Vue Router使用方式(二)-推荐

 

转载于:https://my.oschina.net/tianma3798/blog/2248785

你可能感兴趣的:(Vue element 表格获取选中项操作)