官方文档:https://www.vue-treeselect.cn/
官方示例
一、安装
建议通过npm安装vue-treeselect
npm install --save @riophae/vue-treeselect
二、引入
import Treeselect from ‘@riophae/vue-treeselect‘
三、注册
components: { Treeselect },
四、使用
<treeselect v-model="value" :multiple="true" :options="options" />
options: [ { id: ‘a‘, label: ‘a‘, children: [ { id: ‘aa‘, label: ‘aa‘, }, { id: ‘ab‘, label: ‘ab‘, } ], }, { id: ‘b‘, label: ‘b‘, }, { id: ‘c‘, label: ‘c‘, } ],
常用属性: