Skip to content

Commit

Permalink
chore: 新增VITE_HIDE_GLOBAL_SETTING配置
Browse files Browse the repository at this point in the history
  • Loading branch information
kailong321200875 committed Jun 20, 2024
1 parent 49451ae commit d04c67f
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .env.base
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ VITE_USE_MOCK=true

# 是否使用在线图标
VITE_USE_ONLINE_ICON=true

# 是否隐藏全局设置按钮
VITE_HIDE_GLOBAL_SETTING=false
3 changes: 3 additions & 0 deletions .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ VITE_USE_CSS_SPLIT=true

# 是否使用在线图标
VITE_USE_ONLINE_ICON=true

# 是否隐藏全局设置按钮
VITE_HIDE_GLOBAL_SETTING=false
3 changes: 3 additions & 0 deletions .env.gitee
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ VITE_USE_CSS_SPLIT=true

# 是否使用在线图标
VITE_USE_ONLINE_ICON=true

# 是否隐藏全局设置按钮
VITE_HIDE_GLOBAL_SETTING=false
3 changes: 3 additions & 0 deletions .env.pro
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ VITE_USE_CSS_SPLIT=true

# 是否使用在线图标
VITE_USE_ONLINE_ICON=false

# 是否隐藏全局设置按钮
VITE_HIDE_GLOBAL_SETTING=false
3 changes: 3 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ VITE_USE_CSS_SPLIT=false

# 是否使用在线图标
VITE_USE_ONLINE_ICON=true

# 是否隐藏全局设置按钮
VITE_HIDE_GLOBAL_SETTING=false
4 changes: 3 additions & 1 deletion src/layout/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -59,7 +61,7 @@ export default defineComponent({
<Backtop></Backtop>
<Setting></Setting>
{!unref(hideSetting) && <Setting></Setting>}
</section>
)
}
Expand Down
1 change: 1 addition & 0 deletions types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

0 comments on commit d04c67f

Please sign in to comment.