24 lines
479 B
JavaScript
24 lines
479 B
JavaScript
import {
|
|
getConfig
|
|
} from '@/common/server/interface/common'
|
|
import {
|
|
ref
|
|
} from 'vue';
|
|
|
|
|
|
export const configData = ref(null);
|
|
|
|
export const preloadConfigData = async () => {
|
|
const res = await getConfig();
|
|
configData.value = {
|
|
config: res
|
|
};
|
|
console.log("configData.value", configData.value);
|
|
};
|
|
|
|
export const getConfigData = async () => {
|
|
if (configData.value == null) {
|
|
await preloadConfigData();
|
|
}
|
|
return configData.value;
|
|
} |