22 lines
498 B
JavaScript
22 lines
498 B
JavaScript
export default defineNuxtPlugin((nuxtApp) => {
|
|
const store = useStore();
|
|
const { $getapi, $readyapi } = nuxtApp;
|
|
const connlist = $readyapi([
|
|
"common",
|
|
"tablesetting",
|
|
"datatype",
|
|
"settingtype",
|
|
"settingclass",
|
|
"colorchoice",
|
|
"menuchoice",
|
|
"colorscheme",
|
|
]);
|
|
const notReadyConns = connlist.filter((v) => !v.ready);
|
|
|
|
async function getReady() {
|
|
await $getapi(notReadyConns);
|
|
store.ready = true;
|
|
}
|
|
if (notReadyConns.length > 0) getReady();
|
|
});
|