-
Notifications
You must be signed in to change notification settings - Fork 507
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
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
加了: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
}
},
The text was updated successfully, but these errors were encountered: