美文网首页
对整个el-tree的节点进行禁用

对整个el-tree的节点进行禁用

作者: Frank_Fang | 来源:发表于2021-10-29 10:20 被阅读0次
    treeData: [...]
    
    function loopMuduleTreeDisabled (arr, that) {
      arr.forEach((item) => {
        that.$set(item, 'disabled', true)
        if (item.children && item.children.length > 0) {
          loopMuduleTreeDisabled(item.children, that)
        }
      })
    }
    
    loopMuduleTreeDisabled(this.treeData, this)
    

    相关文章

      网友评论

          本文标题:对整个el-tree的节点进行禁用

          本文链接:https://www.haomeiwen.com/subject/iwkialtx.html