Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

远程搜索和懒加载不能一起用吗 #540

Open
FKdamn opened this issue Oct 31, 2023 · 0 comments
Open

远程搜索和懒加载不能一起用吗 #540

FKdamn opened this issue Oct 31, 2023 · 0 comments

Comments

@FKdamn
Copy link

FKdamn commented Oct 31, 2023



加了:async="true"之后懒加载失效了 如果去掉这个懒加载又可以了,请问是什么问题
附:
loadOptions的代码:
loadOptions({ action, parentNode, searchQuery, callback }){
if(action === 'LOAD_CHILDREN_OPTIONS'){
getSealParentDept(parentNode.deptId).then(response => {
// 子集树数据
parentNode.children = this.getTreeData(response.data);
callback();
})
} else if(action === 'ASYNC_SEARCH'){
queryDeptByName(searchQuery).then(response => {
if (response.data) {
callback(null, this.getTreeData(response.data));
}
})
}
},
normalizer的代码:
normalizer(node) {
return {
id:node.deptId,
// isDisabled:node.disabled,
label: node.deptName,
children: node.children
}
},

@FKdamn FKdamn closed this as completed Oct 31, 2023
@FKdamn FKdamn reopened this Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant