Commit 253b0da7 by xue-jn Committed by GitHub

fix: 接口返回子节点为空数组时,还会显示折叠箭头 (#6463)

1 parent 33a4d524
......@@ -287,7 +287,7 @@ defineExpose({
class="tree-node focus:ring-grass8 my-0.5 flex items-center rounded px-2 py-1 outline-none focus:ring-2"
>
<ChevronRight
v-if="item.hasChildren"
v-if="item.hasChildren && Array.isArray(item.value[childrenField]) && item.value[childrenField].length > 0"
class="size-4 cursor-pointer transition"
:class="{ 'rotate-90': isExpanded }"
@click.stop="
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!