mirror of
https://gitee.com/fantastic-admin/basic.git
synced 2024-12-02 12:07:41 +08:00
应用配置 app.enableAppSetting 迁移到环境变量文件中
This commit is contained in:
parent
b8b18a8d83
commit
be4cb14a9a
@ -1,3 +1,5 @@
|
|||||||
|
# 应用配置面板
|
||||||
|
VITE_APP_SETTING = true
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VITE_APP_TITLE = Fantastic-admin 基础版
|
VITE_APP_TITLE = Fantastic-admin 基础版
|
||||||
# 接口请求地址,会设置到 axios 的 baseURL 参数上
|
# 接口请求地址,会设置到 axios 的 baseURL 参数上
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# 应用配置面板
|
||||||
|
VITE_APP_SETTING = true
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VITE_APP_TITLE = Fantastic-admin 基础版
|
VITE_APP_TITLE = Fantastic-admin 基础版
|
||||||
# 接口请求地址,会设置到 axios 的 baseURL 参数上
|
# 接口请求地址,会设置到 axios 的 baseURL 参数上
|
||||||
|
@ -68,6 +68,8 @@ onUnmounted(() => {
|
|||||||
hotkeys.unbind('f5')
|
hotkeys.unbind('f5')
|
||||||
hotkeys.unbind('alt+`')
|
hotkeys.unbind('alt+`')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const enableAppSetting = import.meta.env.VITE_APP_SETTING === 'true'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -98,7 +100,7 @@ onUnmounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
<Search />
|
<Search />
|
||||||
<HotkeysIntro />
|
<HotkeysIntro />
|
||||||
<template v-if="settingsStore.settings.app.enableAppSetting">
|
<template v-if="enableAppSetting">
|
||||||
<div class="app-setting" @click="eventBus.emit('global-app-setting-toggle')">
|
<div class="app-setting" @click="eventBus.emit('global-app-setting-toggle')">
|
||||||
<SvgIcon name="uiw:setting-o" class="icon" />
|
<SvgIcon name="uiw:setting-o" class="icon" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,7 +9,6 @@ const globalSettingsDefault: RecursiveRequired<Settings.all> = {
|
|||||||
enableProgress: true,
|
enableProgress: true,
|
||||||
enableDynamicTitle: false,
|
enableDynamicTitle: false,
|
||||||
routeBaseOn: 'frontend',
|
routeBaseOn: 'frontend',
|
||||||
enableAppSetting: false,
|
|
||||||
},
|
},
|
||||||
home: {
|
home: {
|
||||||
enable: true,
|
enable: true,
|
||||||
|
@ -6,7 +6,6 @@ const globalSettings: Settings.all = {
|
|||||||
app: {
|
app: {
|
||||||
enablePermission: true,
|
enablePermission: true,
|
||||||
enableDynamicTitle: true,
|
enableDynamicTitle: true,
|
||||||
enableAppSetting: true,
|
|
||||||
},
|
},
|
||||||
layout: {
|
layout: {
|
||||||
enableMobileAdaptation: true,
|
enableMobileAdaptation: true,
|
||||||
|
5
src/types/global.d.ts
vendored
5
src/types/global.d.ts
vendored
@ -38,11 +38,6 @@ declare namespace Settings {
|
|||||||
* @可选值 `'filesystem'` 文件系统
|
* @可选值 `'filesystem'` 文件系统
|
||||||
*/
|
*/
|
||||||
routeBaseOn?: 'frontend' | 'backend' | 'filesystem'
|
routeBaseOn?: 'frontend' | 'backend' | 'filesystem'
|
||||||
/**
|
|
||||||
* 是否开启应用配置,强烈建议在生产环境中关闭
|
|
||||||
* @默认值 `false`
|
|
||||||
*/
|
|
||||||
enableAppSetting?: boolean
|
|
||||||
}
|
}
|
||||||
interface home {
|
interface home {
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user