2019独角兽企业重金招聘Python工程师标准>>>
一、在使用element table表格时,获取选中项处理
1.视图
获取选中结果
{{ scope.row.date }}
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 二级菜单绑定示例
Vue中路由管理器Vue Router使用介绍(三)
Vue中路由管理器Vue Router使用方式(二)-推荐