解决方法:标签内添加v-if
<a-tree
v-if="tree.length"
:default-expand-all="defaultExpandAll"
multiple
:selected-keys="selectedKeys"
:checked-keys="checkedKeys"
:tree-data="tree"
:check-strictly="true"
@select="onSelect"
@check="onCheck"
@rightClick="rightHandle"
/>
网友评论