mirror of
https://github.com/element-plus/element-plus.git
synced 2024-12-27 03:01:14 +08:00
fix(tree): fix tree node not render in lazy (#1298)
Because `this` pointer is points to origin object in constructor.
This commit is contained in:
parent
f9bf392053
commit
63d1b1bc2e
@ -41,7 +41,9 @@ export default class TreeStore {
|
||||
}
|
||||
|
||||
this.nodesMap = {}
|
||||
}
|
||||
|
||||
initialize() {
|
||||
this.root = new Node({
|
||||
data: this.data,
|
||||
store: this,
|
||||
|
@ -152,6 +152,9 @@ export default defineComponent({
|
||||
defaultExpandAll: props.defaultExpandAll,
|
||||
filterNodeMethod: props.filterNodeMethod,
|
||||
}))
|
||||
|
||||
store.value.initialize()
|
||||
|
||||
const root = ref<Node>(store.value.root)
|
||||
const currentNode = ref<Node>(null)
|
||||
const el$ = ref<Nullable<HTMLElement>>(null)
|
||||
|
Loading…
Reference in New Issue
Block a user