123456789101112131415 |
- /** @format */
- import { getDictConfig } from "@/api/login";
- export async function useDict(...args) {
- let dictList = [];
- for (let key of args) {
- dictList.push(getDictConfig({ key }));
- }
- let syncRes = await Promise.all(dictList);
- return syncRes[0].data;
- }
- export function paraseDict(dictList, value) {
- return dictList.filter((dict) => dict.dictValue == value)[0].dictLabel;
- }
|