mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-11-30 02:08:12 +08:00
48a056b051
* docs: modify layout style * docs: modify nav padding * docs: update style * feat: update * docs: upadte * docs: update * docs: modify layout style * docs: update style * feat: update * docs: upadte * docs: update * docs: update * docs: update * docs: remove empty script * docs: update --------- Co-authored-by: kooriookami <bingshuanglingluo@163.com> Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com>
57 lines
949 B
Vue
57 lines
949 B
Vue
<template>
|
|
<el-tree
|
|
style="max-width: 600px"
|
|
:data="data"
|
|
:props="defaultProps"
|
|
show-checkbox
|
|
/>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
const defaultProps = {
|
|
children: 'children',
|
|
label: 'label',
|
|
disabled: 'disabled',
|
|
}
|
|
|
|
const 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,
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
]
|
|
</script>
|