Skip to content

Commit

Permalink
build(ui): 📦 新增VITE_HIDE_GLOBAL_SETTING配置,控制全局设置按钮是否隐藏
Browse files Browse the repository at this point in the history
  • Loading branch information
ShanYi-Hui committed Jun 26, 2024
1 parent c60b8a3 commit 40079fa
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .env.base
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ VITE_USE_ALL_ELEMENT_PLUS_STYLE=true
VITE_USE_MOCK=true

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

# 是否隐藏全局设置按钮
VITE_HIDE_GLOBAL_SETTING=false
5 changes: 4 additions & 1 deletion .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@ VITE_USE_MOCK=true
VITE_USE_CSS_SPLIT=true

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

# 是否隐藏全局设置按钮
VITE_HIDE_GLOBAL_SETTING=false
5 changes: 4 additions & 1 deletion .env.gitee
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@ VITE_USE_MOCK=true
VITE_USE_CSS_SPLIT=true

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

# 是否隐藏全局设置按钮
VITE_HIDE_GLOBAL_SETTING=false
5 changes: 4 additions & 1 deletion .env.github
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@ VITE_USE_MOCK=true
VITE_USE_CSS_SPLIT=true

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

# 是否隐藏全局设置按钮
VITE_HIDE_GLOBAL_SETTING=false
5 changes: 4 additions & 1 deletion .env.pro
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@ VITE_USE_MOCK=true
VITE_USE_CSS_SPLIT=true

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

# 是否隐藏全局设置按钮
VITE_HIDE_GLOBAL_SETTING=false
5 changes: 4 additions & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@ VITE_USE_MOCK=true
VITE_USE_CSS_SPLIT=false

# 是否使用在线图标
VITE_USE_ONLINE_ICON=true
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 @@ -15,6 +15,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 @@ -58,7 +60,7 @@ export default defineComponent({
<Backtop></Backtop>
<Setting></Setting>
{!unref(hideSetting) && <Setting></Setting>}
</section>
)
}
Expand Down

0 comments on commit 40079fa

Please sign in to comment.