2017-02-06 11:24:03 +08:00
|
|
|
<template>
|
2019-02-27 10:22:01 +08:00
|
|
|
<Tree :data="data2" check-directly show-checkbox></Tree>
|
2017-02-06 11:24:03 +08:00
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
2017-03-03 10:35:38 +08:00
|
|
|
data () {
|
2017-02-07 11:34:00 +08:00
|
|
|
return {
|
2019-02-27 10:22:01 +08:00
|
|
|
data2: [
|
2017-03-24 20:50:13 +08:00
|
|
|
{
|
2017-10-25 16:45:42 +08:00
|
|
|
title: 'parent 1',
|
2017-10-25 17:41:37 +08:00
|
|
|
expand: true,
|
2017-04-27 13:56:58 +08:00
|
|
|
children: [
|
|
|
|
{
|
2017-10-25 17:41:37 +08:00
|
|
|
title: 'parent 1-1',
|
|
|
|
expand: true,
|
|
|
|
children: [
|
|
|
|
{
|
2017-10-25 22:34:58 +08:00
|
|
|
title: 'leaf 1-1-1'
|
2017-10-25 17:41:37 +08:00
|
|
|
},
|
|
|
|
{
|
2017-10-25 22:34:58 +08:00
|
|
|
title: 'leaf 1-1-2'
|
2017-10-25 17:41:37 +08:00
|
|
|
}
|
|
|
|
]
|
2017-04-27 13:56:58 +08:00
|
|
|
},
|
|
|
|
{
|
2017-10-25 17:41:37 +08:00
|
|
|
title: 'parent 1-2',
|
2017-10-24 16:20:09 +08:00
|
|
|
expand: true,
|
2017-10-23 11:55:35 +08:00
|
|
|
children: [
|
|
|
|
{
|
2017-10-25 22:34:58 +08:00
|
|
|
title: 'leaf 1-2-1'
|
2017-10-25 17:41:37 +08:00
|
|
|
},
|
|
|
|
{
|
2017-10-25 22:34:58 +08:00
|
|
|
title: 'leaf 1-2-1'
|
2017-10-23 11:55:35 +08:00
|
|
|
}
|
|
|
|
]
|
2017-04-27 13:56:58 +08:00
|
|
|
}
|
|
|
|
]
|
2017-03-27 14:28:42 +08:00
|
|
|
}
|
2017-10-25 22:34:58 +08:00
|
|
|
]
|
2017-10-23 11:55:35 +08:00
|
|
|
}
|
2017-02-07 11:34:00 +08:00
|
|
|
}
|
2017-10-25 17:41:37 +08:00
|
|
|
}
|
2017-10-25 22:34:58 +08:00
|
|
|
</script>
|