优化当获取不到应用时,出现的逻辑错误

This commit is contained in:
aixianling
2023-01-05 09:10:12 +08:00
parent b69b0e878a
commit c42f6006b8
2 changed files with 5 additions and 4 deletions

View File

@@ -54,7 +54,8 @@ export default {
multiple: Boolean,
disabled: Boolean,
meta: {default: () => []},
choose: {default: null}
choose: {default: null},
customData: Boolean
},
data() {
return {
@@ -83,8 +84,8 @@ export default {
},
methods: {
getTableData() {
const {page, search, action, meta, searchKey, dict} = this
if (meta.length > 0) {
const {page, search, action, meta, searchKey, dict, customData} = this
if (meta.length > 0 || customData) {
const reg = new RegExp(search[searchKey])
this.handleTableData(meta.filter(e => reg.test(e.label) || reg.test(e.name) || reg.test(dict.getLabel('appsCategory', e.category))))
} else this.instance?.post(action, null, {