@devops-web/vue3-treeselect-ts
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

vue3-treeselect-ts

介绍

基于vue3用ts重写的vue-treeselect。

安装教程

 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>

更多使用方式可以参考vue-treeselect主页或者vue-treeselect中文主页

发现Bugs

你可以新建一个issue

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request

Package Sidebar

Install

npm i @devops-web/vue3-treeselect-ts

Weekly Downloads

0

Version

0.0.1

License

none

Unpacked Size

532 kB

Total Files

43

Last publish

Collaborators

  • devopsweb
  • fangwenzheng