(- Forked from: gitee - (zhangtaoaizsn/vue3-treeselect-ts) -)
vue-treeselect rewritten with ts based on vue 3.
npm install --save vue3-treeselect-ts
<!-- Vue SFC -->
<template>
<div id="app">
<TreeSelect v-model="value" :multiple="true" :options="options" />
</div>
</template>
<script>
// import the component
import TreeSelect from 'vue3-treeselect-ts'
// import the styles
import 'vue3-treeselect-ts/dist/style.css'
export default {
// register the component
components: { TreeSelect },
data() {
return {
// define the default value
value: null,
// define options
options: [ {
id: 'a',
label: 'a',
children: [ {
id: 'aa',
label: 'aa',
}, {
id: 'ab',
label: 'ab',
} ],
}, {
id: 'b',
label: 'b',
}, {
id: 'c',
label: 'c',
} ],
}
},
}
</script>
Documentation: vue-treeselect
Create an issue
- Fork the repository
- Create a branch like Feat_xxx or Fix_xxx
- Make a Pull Request