mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-14 01:11:25 +08:00
57 lines
1.2 KiB
Vue
57 lines
1.2 KiB
Vue
|
<template>
|
||
|
<el-tree :data="data" :props="defaultProps" show-checkbox />
|
||
|
</template>
|
||
|
|
||
|
<script lang="ts">
|
||
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
data: [
|
||
|
{
|
||
|
id: 1,
|
||
|
label: 'Level one 1',
|
||
|
children: [
|
||
|
{
|
||
|
id: 3,
|
||
|
label: 'Level two 2-1',
|
||
|
children: [
|
||
|
{
|
||
|
id: 4,
|
||
|
label: 'Level three 3-1-1',
|
||
|
},
|
||
|
{
|
||
|
id: 5,
|
||
|
label: 'Level three 3-1-2',
|
||
|
disabled: true,
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
{
|
||
|
id: 2,
|
||
|
label: 'Level two 2-2',
|
||
|
disabled: true,
|
||
|
children: [
|
||
|
{
|
||
|
id: 6,
|
||
|
label: 'Level three 3-2-1',
|
||
|
},
|
||
|
{
|
||
|
id: 7,
|
||
|
label: 'Level three 3-2-2',
|
||
|
disabled: true,
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
],
|
||
|
defaultProps: {
|
||
|
children: 'children',
|
||
|
label: 'label',
|
||
|
disabled: 'disabled',
|
||
|
},
|
||
|
}
|
||
|
},
|
||
|
}
|
||
|
</script>
|