应用配置 app.enableAppSetting 迁移到环境变量文件中

This commit is contained in:
Hooray Hu 2023-12-18 00:14:18 +08:00
parent b8b18a8d83
commit be4cb14a9a
6 changed files with 7 additions and 8 deletions

View File

@ -1,3 +1,5 @@
# 应用配置面板
VITE_APP_SETTING = true
# 页面标题
VITE_APP_TITLE = Fantastic-admin 基础版
# 接口请求地址,会设置到 axios 的 baseURL 参数上

View File

@ -1,3 +1,5 @@
# 应用配置面板
VITE_APP_SETTING = true
# 页面标题
VITE_APP_TITLE = Fantastic-admin 基础版
# 接口请求地址,会设置到 axios 的 baseURL 参数上

View File

@ -68,6 +68,8 @@ onUnmounted(() => {
hotkeys.unbind('f5')
hotkeys.unbind('alt+`')
})
const enableAppSetting = import.meta.env.VITE_APP_SETTING === 'true'
</script>
<template>
@ -98,7 +100,7 @@ onUnmounted(() => {
</div>
<Search />
<HotkeysIntro />
<template v-if="settingsStore.settings.app.enableAppSetting">
<template v-if="enableAppSetting">
<div class="app-setting" @click="eventBus.emit('global-app-setting-toggle')">
<SvgIcon name="uiw:setting-o" class="icon" />
</div>

View File

@ -9,7 +9,6 @@ const globalSettingsDefault: RecursiveRequired<Settings.all> = {
enableProgress: true,
enableDynamicTitle: false,
routeBaseOn: 'frontend',
enableAppSetting: false,
},
home: {
enable: true,

View File

@ -6,7 +6,6 @@ const globalSettings: Settings.all = {
app: {
enablePermission: true,
enableDynamicTitle: true,
enableAppSetting: true,
},
layout: {
enableMobileAdaptation: true,

View File

@ -38,11 +38,6 @@ declare namespace Settings {
* @可选值 `'filesystem'`
*/
routeBaseOn?: 'frontend' | 'backend' | 'filesystem'
/**
*
* @默认值 `false`
*/
enableAppSetting?: boolean
}
interface home {
/**