|
|
|
@ -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> |
|
|
|
|