vue---selection下拉级别树选框

vue---selection下拉级别树选框_第1张图片

npm install --save @riophae/vue-treeselect

// import the component
  import Treeselect from '@riophae/vue-treeselect'
// import the styles
  import '@riophae/vue-treeselect/dist/vue-treeselect.css'




// define the default value
        form:{selectTree:[]},
        normalizer(node) {
            return {
                id: node.id,
                label: node.label,
                children: node.children
            };
        },
        options: [ {
          id: 'a',
          label: 'a',
          children: [ {
            id: 'aa',
            label: 'aa',
          }, {
            id: 'ab',
            label: 'ab',
          } ],
        }, {
          id: 'b',
          label: 'b',
        }, {
          id: 'c',
          label: 'c',
        } ],

 

你可能感兴趣的:(vue)