Table tree support @on-row-click
This commit is contained in:
parent
cd68d23fdb
commit
cb6477e080
2 changed files with 20 additions and 5 deletions
|
@ -1,6 +1,14 @@
|
|||
<template>
|
||||
<div style="margin: 100px;">
|
||||
<Table border highlight-row @on-current-change="occ" ref="selection" :columns="columns4" :data="data1" row-key="id">
|
||||
<Table
|
||||
border
|
||||
highlight-row
|
||||
@on-current-change="occ"
|
||||
@on-row-click="orc"
|
||||
ref="selection"
|
||||
:columns="columns4"
|
||||
:data="data1"
|
||||
row-key="id">
|
||||
<template slot-scope="{ row }" slot="age">
|
||||
<strong>{{row.age}}</strong>
|
||||
</template>
|
||||
|
@ -139,8 +147,12 @@
|
|||
this.$refs.selection.selectAll(status);
|
||||
},
|
||||
occ (n, o) {
|
||||
console.log(n);
|
||||
console.log(o);
|
||||
// console.log(n);
|
||||
// console.log(o);
|
||||
},
|
||||
orc (data, index) {
|
||||
console.log(data);
|
||||
console.log(index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue