处理keyword的bug

This commit is contained in:
zer0Black
2023-05-30 12:52:40 +08:00
parent 911726e055
commit 5b02a32b79
5 changed files with 18 additions and 26 deletions
@@ -184,16 +184,20 @@ export default {
}
}
} else {
// 异步一开始也加载一点数据
this.loading = true
getAction(`/sys/dict/loadDict/${this.dict}`, { pageSize: this.pageSize, keyword: '' }).then(res => {
this.loading = false
if (res.success) {
this.options = res.result
} else {
this.$message.warning(res.message)
}
})
if (!this.dict) {
console.error('搜索组件未配置字典项')
} else {
// 异步一开始也加载一点数据
this.loading = true
getAction(`/sys/dict/loadDict/${this.dict}`, { pageSize: this.pageSize, keyword: '' }).then(res => {
this.loading = false
if (res.success) {
this.options = res.result
} else {
this.$message.warning(res.message)
}
})
}
}
},
filterOption (input, option) {
@@ -175,6 +175,7 @@ export default {
},
// 异步加载树节点
asyncLoadTreeData (treeNode) {
debugger
return new Promise((resolve) => {
if (treeNode.$vnode.children) {
resolve()