chore: 新增VITE_HIDE_GLOBAL_SETTING配置

This commit is contained in:
kailong321200875 2024-06-20 15:31:54 +08:00
parent 49451ae606
commit d04c67f0ea
7 changed files with 19 additions and 1 deletions

View File

@ -18,3 +18,6 @@ VITE_USE_MOCK=true
# 是否使用在线图标
VITE_USE_ONLINE_ICON=true
# 是否隐藏全局设置按钮
VITE_HIDE_GLOBAL_SETTING=false

View File

@ -36,3 +36,6 @@ VITE_USE_CSS_SPLIT=true
# 是否使用在线图标
VITE_USE_ONLINE_ICON=true
# 是否隐藏全局设置按钮
VITE_HIDE_GLOBAL_SETTING=false

View File

@ -36,3 +36,6 @@ VITE_USE_CSS_SPLIT=true
# 是否使用在线图标
VITE_USE_ONLINE_ICON=true
# 是否隐藏全局设置按钮
VITE_HIDE_GLOBAL_SETTING=false

View File

@ -36,3 +36,6 @@ VITE_USE_CSS_SPLIT=true
# 是否使用在线图标
VITE_USE_ONLINE_ICON=false
# 是否隐藏全局设置按钮
VITE_HIDE_GLOBAL_SETTING=false

View File

@ -36,3 +36,6 @@ VITE_USE_CSS_SPLIT=false
# 是否使用在线图标
VITE_USE_ONLINE_ICON=true
# 是否隐藏全局设置按钮
VITE_HIDE_GLOBAL_SETTING=false

View File

@ -20,6 +20,8 @@ const collapse = computed(() => appStore.getCollapse)
const layout = computed(() => appStore.getLayout)
const hideSetting = computed(() => import.meta.env.VITE_HIDE_GLOBAL_SETTING === 'true')
const handleClickOutside = () => {
appStore.setCollapse(true)
}
@ -59,7 +61,7 @@ export default defineComponent({
<Backtop></Backtop>
<Setting></Setting>
{!unref(hideSetting) && <Setting></Setting>}
</section>
)
}

1
types/global.d.ts vendored
View File

@ -82,5 +82,6 @@ declare global {
readonly VITE_USE_CSS_SPLIT: string
readonly VITE_USE_ONLINE_ICON: string
readonly VITE_ICON_PREFIX: string
readonly VITE_HIDE_GLOBAL_SETTING: string
}
}