Browse Source

chore: fix BasicTree

main
刘凯 1 year ago
parent
commit
7b765ed3eb
  1. 3
      src/components/Tree/src/BasicTree.vue

3
src/components/Tree/src/BasicTree.vue

@ -372,6 +372,7 @@ export default defineComponent({
const iconDom = icon ? (<TreeIcon icon={icon} />) : slots.icon ? (<span class="mr-1">{getSlot(slots, 'icon')}</span>) : null
item.__title = item[titleField] // title __title title vnode
item[titleField] = (
<span class={`${bem('title')} pl-2`} onClick={handleClickNode.bind(null, item[keyField], item[childrenField])}>
{slots?.title
@ -430,7 +431,7 @@ export default defineComponent({
)}
<Spin wrapperClassName={unref(props.treeWrapperClassName)} spinning={unref(props.loading)} tip="加载中...">
<ScrollContainer style={scrollStyle} v-show={!unref(getNotFound)}>
<Tree {...unref(getBindValues)} showIcon={false} treeData={treeData.value} loadData={loadData}>
<Tree {...unref(getBindValues)} showIcon={false} treeData={treeData.value} loadData={getBindValues.value.loadData ? loadData : undefined}>
{extendSlots(slots, ['title'])}
</Tree>
</ScrollContainer>

Loading…
Cancel
Save