mirror of
https://github.com/jekip/naive-ui-admin.git
synced 2026-02-12 17:22:26 +08:00
fix Bug or esLink formatting
This commit is contained in:
@@ -4,32 +4,31 @@ import { warn } from '@/utils/log';
|
||||
import { getAppEnvConfig } from '@/utils/env';
|
||||
|
||||
export const useGlobSetting = (): Readonly<GlobConfig> => {
|
||||
const {
|
||||
VITE_GLOB_APP_TITLE,
|
||||
VITE_GLOB_API_URL,
|
||||
VITE_GLOB_APP_SHORT_NAME,
|
||||
VITE_GLOB_API_URL_PREFIX,
|
||||
VITE_GLOB_UPLOAD_URL,
|
||||
VITE_GLOB_PROD_MOCK,
|
||||
VITE_GLOB_IMG_URL
|
||||
} = getAppEnvConfig();
|
||||
const {
|
||||
VITE_GLOB_APP_TITLE,
|
||||
VITE_GLOB_API_URL,
|
||||
VITE_GLOB_APP_SHORT_NAME,
|
||||
VITE_GLOB_API_URL_PREFIX,
|
||||
VITE_GLOB_UPLOAD_URL,
|
||||
VITE_GLOB_PROD_MOCK,
|
||||
VITE_GLOB_IMG_URL,
|
||||
} = getAppEnvConfig();
|
||||
|
||||
if (!/[a-zA-Z\_]*/.test(VITE_GLOB_APP_SHORT_NAME)) {
|
||||
warn(
|
||||
`VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.`
|
||||
);
|
||||
}
|
||||
if (!/[a-zA-Z\_]*/.test(VITE_GLOB_APP_SHORT_NAME)) {
|
||||
warn(
|
||||
`VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.`
|
||||
);
|
||||
}
|
||||
|
||||
// Take global configuration
|
||||
const glob: Readonly<GlobConfig> = {
|
||||
title: VITE_GLOB_APP_TITLE,
|
||||
apiUrl: VITE_GLOB_API_URL,
|
||||
shortName: VITE_GLOB_APP_SHORT_NAME,
|
||||
urlPrefix: VITE_GLOB_API_URL_PREFIX,
|
||||
uploadUrl: VITE_GLOB_UPLOAD_URL,
|
||||
prodMock: VITE_GLOB_PROD_MOCK,
|
||||
imgUrl: VITE_GLOB_IMG_URL
|
||||
|
||||
};
|
||||
return glob as Readonly<GlobConfig>;
|
||||
// Take global configuration
|
||||
const glob: Readonly<GlobConfig> = {
|
||||
title: VITE_GLOB_APP_TITLE,
|
||||
apiUrl: VITE_GLOB_API_URL,
|
||||
shortName: VITE_GLOB_APP_SHORT_NAME,
|
||||
urlPrefix: VITE_GLOB_API_URL_PREFIX,
|
||||
uploadUrl: VITE_GLOB_UPLOAD_URL,
|
||||
prodMock: VITE_GLOB_PROD_MOCK,
|
||||
imgUrl: VITE_GLOB_IMG_URL,
|
||||
};
|
||||
return glob as Readonly<GlobConfig>;
|
||||
};
|
||||
|
||||
@@ -2,18 +2,17 @@ import { computed } from 'vue';
|
||||
import { useDesignSettingStore } from '@/store/modules/designSetting';
|
||||
|
||||
export function useDesignSetting() {
|
||||
const designStore = useDesignSettingStore();
|
||||
const designStore = useDesignSettingStore();
|
||||
|
||||
const getDarkTheme = computed(() => designStore.darkTheme);
|
||||
const getDarkTheme = computed(() => designStore.darkTheme);
|
||||
|
||||
const getAppTheme = computed(() => designStore.appTheme);
|
||||
const getAppTheme = computed(() => designStore.appTheme);
|
||||
|
||||
const getAppThemeList = computed(() => designStore.appThemeList);
|
||||
|
||||
return {
|
||||
getDarkTheme,
|
||||
getAppTheme,
|
||||
getAppThemeList
|
||||
}
|
||||
const getAppThemeList = computed(() => designStore.appThemeList);
|
||||
|
||||
return {
|
||||
getDarkTheme,
|
||||
getAppTheme,
|
||||
getAppThemeList,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,33 +2,32 @@ import { computed } from 'vue';
|
||||
import { useProjectSettingStore } from '@/store/modules/projectSetting';
|
||||
|
||||
export function useProjectSetting() {
|
||||
const projectStore = useProjectSettingStore();
|
||||
|
||||
const projectStore = useProjectSettingStore();
|
||||
const getNavMode = computed(() => projectStore.navMode);
|
||||
|
||||
const getNavMode = computed(() => projectStore.navMode);
|
||||
const getNavTheme = computed(() => projectStore.navTheme);
|
||||
|
||||
const getNavTheme = computed(() => projectStore.navTheme);
|
||||
const getHeaderSetting = computed(() => projectStore.headerSetting);
|
||||
|
||||
const getHeaderSetting = computed(() => projectStore.headerSetting);
|
||||
const getMultiTabsSetting = computed(() => projectStore.multiTabsSetting);
|
||||
|
||||
const getMultiTabsSetting = computed(() => projectStore.multiTabsSetting);
|
||||
const getMenuSetting = computed(() => projectStore.menuSetting);
|
||||
|
||||
const getMenuSetting = computed(() => projectStore.menuSetting);
|
||||
const getCrumbsSetting = computed(() => projectStore.crumbsSetting);
|
||||
|
||||
const getCrumbsSetting = computed(() => projectStore.crumbsSetting);
|
||||
const getPermissionMode = computed(() => projectStore.permissionMode);
|
||||
|
||||
const getPermissionMode = computed(() => projectStore.permissionMode);
|
||||
const getShowFooter = computed(() => projectStore.showFooter);
|
||||
|
||||
const getShowFooter = computed(() => projectStore.showFooter);
|
||||
|
||||
return {
|
||||
getNavMode,
|
||||
getNavTheme,
|
||||
getHeaderSetting,
|
||||
getMultiTabsSetting,
|
||||
getMenuSetting,
|
||||
getCrumbsSetting,
|
||||
getPermissionMode,
|
||||
getShowFooter
|
||||
}
|
||||
return {
|
||||
getNavMode,
|
||||
getNavTheme,
|
||||
getHeaderSetting,
|
||||
getMultiTabsSetting,
|
||||
getMenuSetting,
|
||||
getCrumbsSetting,
|
||||
getPermissionMode,
|
||||
getShowFooter,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user