first commit
This commit is contained in:
55
iview/examples/routers/tree.vue
Normal file
55
iview/examples/routers/tree.vue
Normal file
@@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<div>
|
||||
<Tree ref="treeRef" :data="data4" show-checkbox multiple></Tree>
|
||||
<Button @click="get">
|
||||
get
|
||||
</Button>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
data4: [
|
||||
{
|
||||
title: 'parent 1',
|
||||
expand: true,
|
||||
children: [
|
||||
{
|
||||
title: 'parent 1-1',
|
||||
expand: true,
|
||||
children: [
|
||||
{
|
||||
title: 'leaf 1-1-1',
|
||||
checked : false,
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
title: 'leaf 1-1-2'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'parent 1-2',
|
||||
expand: true,
|
||||
children: [
|
||||
{
|
||||
title: 'leaf 1-2-1',
|
||||
},
|
||||
{
|
||||
title: 'leaf 1-2-1'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
get(){
|
||||
console.log(this.$refs.treeRef.getCheckedNodes())
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user