mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-23 12:06:36 +08:00
24 lines
523 B
TypeScript
24 lines
523 B
TypeScript
import type { ResponseDictionary, Dictionary } from '@/interface';
|
|
|
|
export function fecthDictionaryMiddleware(data: ResponseDictionary[]): Dictionary[] {
|
|
return data.map(item => {
|
|
const {
|
|
modelName: label,
|
|
modelCharactorName: charactorLabel,
|
|
modelIndicator: indicatorKey,
|
|
modelIndicatorName: indicatorLabel,
|
|
remarks: remark,
|
|
formula
|
|
} = item;
|
|
|
|
return {
|
|
label,
|
|
charactorLabel,
|
|
indicatorKey,
|
|
indicatorLabel,
|
|
remark,
|
|
formula
|
|
};
|
|
});
|
|
}
|