在未用props定义的情况下,slot-scope="{ node, data }"解析data对象只有data含有lable和children才能识别出内容和子节点
当我获取的数据如下,没有lable和children,使用的是name和childList,如下图所示:
注意props是对象形式,
文章来源地址https://www.toymoban.com/news/detail-516298.html
文章来源:https://www.toymoban.com/news/detail-516298.html
到了这里,关于[vue]使用Element--Tree 树形控件使用props解决自定义slot-scope=“{ node, data }“的对象问题的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!