mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-19 12:04:02 +08:00
Tree: support scoped slot (#9686)
This commit is contained in:
@@ -97,13 +97,15 @@
|
||||
},
|
||||
render(h) {
|
||||
const parent = this.$parent;
|
||||
const tree = parent.tree;
|
||||
const node = this.node;
|
||||
const data = node.data;
|
||||
const store = node.store;
|
||||
const { data, store } = node;
|
||||
return (
|
||||
parent.renderContent
|
||||
? parent.renderContent.call(parent._renderProxy, h, { _self: parent.tree.$vnode.context, node, data, store })
|
||||
: <span class="el-tree-node__label">{ this.node.label }</span>
|
||||
? parent.renderContent.call(parent._renderProxy, h, { _self: tree.$vnode.context, node, data, store })
|
||||
: tree.$scopedSlots.default
|
||||
? tree.$scopedSlots.default({ node, data })
|
||||
: <span class="el-tree-node__label">{ this.node.label }</span>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user