fix: modify the problem of lazy load root node not triggering in tree menu component vue3 (#4242)

This commit is contained in:
James 2026-07-21 10:17:11 +08:00 committed by GitHub
parent 5ad55a68bc
commit 72bcdfe803
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,10 @@ import { xss } from '@opentiny/utils'
export const initData =
({ state, props, service, api }: { state: ITreeMenuState; props: ITreeMenuProps; service: any; api: ITreeMenuApi }) =>
async () => {
if (props.lazy) {
return
}
if (props.data) {
state.data = props.data
return