mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-08 19:12:48 +08:00
优化tableData;新增dataGet;
This commit is contained in:
@@ -2433,13 +2433,15 @@
|
||||
defaultValue = undefined;
|
||||
}
|
||||
|
||||
return admin.dataGet(this.dataBrage, keys, defaultValue);
|
||||
},
|
||||
dataGet(data, keys, defaultValue) {
|
||||
return (
|
||||
(!Array.isArray(keys)
|
||||
? keys.replace(/\[/g, '.').replace(/\]/g, '').split('.')
|
||||
: keys
|
||||
).reduce((o, k) => (o || {})[k], this.dataBrage) || defaultValue
|
||||
).reduce((o, k) => (o || {})[k], data) || defaultValue
|
||||
);
|
||||
|
||||
},
|
||||
getExtGroupName(ext) {
|
||||
var groupName = 'file';
|
||||
|
||||
Reference in New Issue
Block a user