init commit
This commit is contained in:
27
src/services/config.js
Normal file
27
src/services/config.js
Normal file
@@ -0,0 +1,27 @@
|
||||
let _defineConfig = {
|
||||
version: "${lib_version}"
|
||||
}
|
||||
|
||||
let _defConfig = {
|
||||
}
|
||||
|
||||
let _customConfig = {
|
||||
}
|
||||
|
||||
export function getVersion() {
|
||||
return _defineConfig.version;
|
||||
}
|
||||
|
||||
export function getConfig(key) {
|
||||
let item = _customConfig[key];
|
||||
if (!item) {
|
||||
item = _defConfig[key];
|
||||
}
|
||||
return item;
|
||||
}
|
||||
|
||||
export function setConfig(config) {
|
||||
if (config && typeof config == "object") {
|
||||
Object.assign(_customConfig, config);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user