mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-09 13:53:38 +08:00
style: format code for all
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
let config: object = {}
|
||||
let config: object = {};
|
||||
|
||||
const setConfig = (cfg?: any) => {
|
||||
config = Object.assign(config, cfg)
|
||||
}
|
||||
config = Object.assign(config, cfg);
|
||||
};
|
||||
|
||||
const getConfig = (key?: string) => {
|
||||
if (typeof key === "string") {
|
||||
const arr = key.split(".")
|
||||
const arr = key.split(".");
|
||||
if (arr && arr.length) {
|
||||
let data = config
|
||||
let data = config;
|
||||
arr.forEach(v => {
|
||||
if (data && typeof data[v] !== "undefined") {
|
||||
data = data[v]
|
||||
data = data[v];
|
||||
} else {
|
||||
data = null
|
||||
data = null;
|
||||
}
|
||||
})
|
||||
return data
|
||||
});
|
||||
return data;
|
||||
}
|
||||
}
|
||||
return config
|
||||
}
|
||||
return config;
|
||||
};
|
||||
|
||||
export { getConfig, setConfig }
|
||||
export { getConfig, setConfig };
|
||||
|
||||
Reference in New Issue
Block a user