mirror of
https://gitee.com/fantastic-admin/basic.git
synced 2024-12-02 03:57:37 +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 基础版
|
||||
# 接口请求地址,会设置到 axios 的 baseURL 参数上
|
||||
|
@ -1,3 +1,5 @@
|
||||
# 应用配置面板
|
||||
VITE_APP_SETTING = true
|
||||
# 页面标题
|
||||
VITE_APP_TITLE = Fantastic-admin 基础版
|
||||
# 接口请求地址,会设置到 axios 的 baseURL 参数上
|
||||
|
@ -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>
|
||||
|
@ -9,7 +9,6 @@ const globalSettingsDefault: RecursiveRequired<Settings.all> = {
|
||||
enableProgress: true,
|
||||
enableDynamicTitle: false,
|
||||
routeBaseOn: 'frontend',
|
||||
enableAppSetting: false,
|
||||
},
|
||||
home: {
|
||||
enable: true,
|
||||
|
@ -6,7 +6,6 @@ const globalSettings: Settings.all = {
|
||||
app: {
|
||||
enablePermission: true,
|
||||
enableDynamicTitle: true,
|
||||
enableAppSetting: true,
|
||||
},
|
||||
layout: {
|
||||
enableMobileAdaptation: true,
|
||||
|
5
src/types/global.d.ts
vendored
5
src/types/global.d.ts
vendored
@ -38,11 +38,6 @@ declare namespace Settings {
|
||||
* @可选值 `'filesystem'` 文件系统
|
||||
*/
|
||||
routeBaseOn?: 'frontend' | 'backend' | 'filesystem'
|
||||
/**
|
||||
* 是否开启应用配置,强烈建议在生产环境中关闭
|
||||
* @默认值 `false`
|
||||
*/
|
||||
enableAppSetting?: boolean
|
||||
}
|
||||
interface home {
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user