mirror of
https://github.com/kailong321200875/vue-element-plus-admin.git
synced 2024-11-21 00:51:22 +08:00
chore: 新增VITE_HIDE_GLOBAL_SETTING配置
This commit is contained in:
parent
49451ae606
commit
d04c67f0ea
@ -18,3 +18,6 @@ VITE_USE_MOCK=true
|
||||
|
||||
# 是否使用在线图标
|
||||
VITE_USE_ONLINE_ICON=true
|
||||
|
||||
# 是否隐藏全局设置按钮
|
||||
VITE_HIDE_GLOBAL_SETTING=false
|
||||
|
3
.env.dev
3
.env.dev
@ -36,3 +36,6 @@ VITE_USE_CSS_SPLIT=true
|
||||
|
||||
# 是否使用在线图标
|
||||
VITE_USE_ONLINE_ICON=true
|
||||
|
||||
# 是否隐藏全局设置按钮
|
||||
VITE_HIDE_GLOBAL_SETTING=false
|
||||
|
@ -36,3 +36,6 @@ VITE_USE_CSS_SPLIT=true
|
||||
|
||||
# 是否使用在线图标
|
||||
VITE_USE_ONLINE_ICON=true
|
||||
|
||||
# 是否隐藏全局设置按钮
|
||||
VITE_HIDE_GLOBAL_SETTING=false
|
||||
|
3
.env.pro
3
.env.pro
@ -36,3 +36,6 @@ VITE_USE_CSS_SPLIT=true
|
||||
|
||||
# 是否使用在线图标
|
||||
VITE_USE_ONLINE_ICON=false
|
||||
|
||||
# 是否隐藏全局设置按钮
|
||||
VITE_HIDE_GLOBAL_SETTING=false
|
||||
|
@ -36,3 +36,6 @@ VITE_USE_CSS_SPLIT=false
|
||||
|
||||
# 是否使用在线图标
|
||||
VITE_USE_ONLINE_ICON=true
|
||||
|
||||
# 是否隐藏全局设置按钮
|
||||
VITE_HIDE_GLOBAL_SETTING=false
|
||||
|
@ -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
1
types/global.d.ts
vendored
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user