mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2025-12-08 17:12:28 +08:00
Jeecg-Boot 2.2.0 版本发布 | 重磅升级
This commit is contained in:
@ -83,7 +83,16 @@ export const JEditableTableMixin = {
|
||||
requestSubTableData(url, params, tab, success) {
|
||||
tab.loading = true
|
||||
getAction(url, params).then(res => {
|
||||
tab.dataSource = res.result || []
|
||||
let { result } = res
|
||||
let dataSource = []
|
||||
if (result) {
|
||||
if (Array.isArray(result)) {
|
||||
dataSource = result
|
||||
} else if (Array.isArray(result.records)) {
|
||||
dataSource = result.records
|
||||
}
|
||||
}
|
||||
tab.dataSource = dataSource
|
||||
typeof success === 'function' ? success(res) : ''
|
||||
}).finally(() => {
|
||||
tab.loading = false
|
||||
|
||||
Reference in New Issue
Block a user