-
This commit is contained in:
parent
b8adf5cf2d
commit
718e773fbc
5 changed files with 33 additions and 39 deletions
16
examples/components/tableExpand.vue
Executable file
16
examples/components/tableExpand.vue
Executable file
|
@ -0,0 +1,16 @@
|
|||
<template>
|
||||
<div>{{ name }}</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
name: String
|
||||
},
|
||||
created () {
|
||||
console.log(this.name + ': 被创建');
|
||||
},
|
||||
destroyed () {
|
||||
console.log(this.name + ': 被销毁');
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -2,6 +2,7 @@
|
|||
<Table border :columns="columns7" :data="data6" @on-expand="expand"></Table>
|
||||
</template>
|
||||
<script>
|
||||
import TableExpand from '../components/tableExpand.vue';
|
||||
import etable from '../components/table.vue';
|
||||
export default {
|
||||
components: { etable },
|
||||
|
@ -13,7 +14,8 @@
|
|||
width: 50,
|
||||
render: (h, params) => {
|
||||
// return h(etable);
|
||||
return h('div', params.row.name)
|
||||
// return h('div', params.row.name)
|
||||
return h(TableExpand, { props: { name: params.row.name } })
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue