riophae / vue-treeselect

A multi-select component with nested options support for Vue.js
https://vue-treeselect.js.org/
MIT License
2.89k stars 505 forks source link

是否支持配置禁止选中根节点的属性 #524

Open willcom95 opened 1 year ago

congshengwu commented 4 months ago

我这里搜到一个方法

为treeselect组件设置属性::flat="true" 在treeselect组件属性的::normalizer="normalizer"中使用如下函数

normalizer(node) {
  return {
    isDisabled: node.id === 0, // 这里假设根节点的id为0
  }
},

这个库感觉已经完全弃用了,不建议使用