2017-02-06 11:24:03 +08:00
|
|
|
<template>
|
2017-03-03 10:35:38 +08:00
|
|
|
<Tree v-model="baseData" 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 {
|
2017-03-03 10:35:38 +08:00
|
|
|
baseData: [{
|
2017-02-07 15:29:53 +08:00
|
|
|
expand: true,
|
2017-02-07 11:34:00 +08:00
|
|
|
title: 'parent 1',
|
2017-02-07 15:29:53 +08:00
|
|
|
children: [{
|
2017-02-07 11:34:00 +08:00
|
|
|
title: 'parent 1-0',
|
|
|
|
expand: true,
|
|
|
|
disabled: true,
|
2017-02-07 15:29:53 +08:00
|
|
|
children: [{
|
2017-02-07 11:34:00 +08:00
|
|
|
title: 'leaf',
|
|
|
|
disableCheckbox: true
|
|
|
|
}, {
|
|
|
|
title: 'leaf',
|
|
|
|
}]
|
|
|
|
}, {
|
|
|
|
title: 'parent 1-1',
|
2017-03-03 10:35:38 +08:00
|
|
|
expand: true,
|
2017-02-07 11:34:00 +08:00
|
|
|
checked: true,
|
2017-02-07 15:29:53 +08:00
|
|
|
children: [{
|
2017-03-03 10:35:38 +08:00
|
|
|
title: '<span style="color: red">leaf</span>'
|
2017-02-07 11:34:00 +08:00
|
|
|
}]
|
|
|
|
}]
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|