feat: main区域支持全屏

This commit is contained in:
gary.fu
2026-02-02 17:19:46 +08:00
parent 4e052c28ae
commit 5fc146aa4f
2 changed files with 41 additions and 0 deletions

View File

@@ -599,4 +599,40 @@ body,
.dark .monaco-editor.vs-dark .monaco-editor-background {
background-color: #1e1e1e !important;
}
.home-main.is-maximized {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 2000;
background-color: var(--el-bg-color);
}
.fullscreen-btn {
position: fixed;
top: auto;
right: 40px;
bottom: 90px;
z-index: 999;
width: 40px;
height: 40px;
border-radius: 50%;
background-color: var(--el-bg-color-overlay);
color: var(--el-color-primary);
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
box-shadow: var(--el-box-shadow-lighter);
opacity: 1;
transition: opacity 0.3s;
font-size: 20px;
}
.fullscreen-btn:hover {
opacity: 1;
box-shadow: var(--el-box-shadow);
}

View File

@@ -39,6 +39,7 @@ const serializer = {
*/
export const useTabsViewStore = defineStore('tabsView', () => {
const isTabMode = ref(false)
const isMainMaximized = ref(false)
const isCachedTabMode = ref(true)
const isShowTabIcon = ref(true)
const currentTab = ref('')
@@ -204,6 +205,10 @@ export const useTabsViewStore = defineStore('tabsView', () => {
})
return {
isMainMaximized,
toggleMainFullscreen () {
isMainMaximized.value = !isMainMaximized.value
},
isTabMode,
isCachedTabMode,
isShowTabIcon,