官方文档: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‘, } ],
常用属性:
原文:https://www.cnblogs.com/zwh0910/p/15093112.html