公司刚给了需求的时候,及蒙圈了,elementUI 里面有 input select ,里面都有 远程搜索,联想查询,也有树结构 (tree);我试着把select 跟 tree结合发现跟需求还是有出入
自己琢磨了两天,总是,这个搞定,那个就不行,百度也查了好久,突然发现 前辈已经有做出来的插件了!!!
插件API 地址
https://www.vue-treeselect.cn/
<treeselect
:multiple="true"
:options="fxjgxz.data"
:maxHeight="200"
:searchable='true'
@input='changeTreeData'
:load-options="loadOptions"
:noResultsText="'未搜索到匹配项...'"
:limit="2"
:limitText="moreText"
placeholder="请选择"
valueConsistsOf="LEAF_PRIORITY"
v-model="searchForm.orgIdStr" />
上面使用插件的例子
网友评论