mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-09 23:17:21 +08:00
feat: 全屏
This commit is contained in:
parent
26535ebc09
commit
eb9ec322f8
5 changed files with 11 additions and 2 deletions
|
@ -1,9 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<Layout v-loading="loading" :element-loading-text="loadinText" fullscreen>
|
<Layout v-loading="loading" :element-loading-text="loadinText" fullscreen>
|
||||||
<template #menu>
|
<template #menu v-if="!globalStore.isFullScreen">
|
||||||
<Menu></Menu>
|
<Menu></Menu>
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer v-if="!globalStore.isFullScreen">
|
||||||
<Footer></Footer>
|
<Footer></Footer>
|
||||||
</template>
|
</template>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
@click="jump(key)"
|
@click="jump(key)"
|
||||||
:right="key == paths.length - 1"
|
:right="key == paths.length - 1"
|
||||||
>
|
>
|
||||||
|
<!-- <span class="sle">{{ item }}</span> -->
|
||||||
{{ item }}
|
{{ item }}
|
||||||
</BreadCrumbItem>
|
</BreadCrumbItem>
|
||||||
</BreadCrumbs>
|
</BreadCrumbs>
|
||||||
|
|
|
@ -19,9 +19,13 @@ export const GlobalStore = defineStore({
|
||||||
theme: 'bright',
|
theme: 'bright',
|
||||||
footer: true,
|
footer: true,
|
||||||
},
|
},
|
||||||
|
isFullScreen: false,
|
||||||
}),
|
}),
|
||||||
getters: {},
|
getters: {},
|
||||||
actions: {
|
actions: {
|
||||||
|
setScreenFull() {
|
||||||
|
this.isFullScreen = !this.isFullScreen;
|
||||||
|
},
|
||||||
setLogStatus(login: boolean) {
|
setLogStatus(login: boolean) {
|
||||||
this.isLogin = login;
|
this.isLogin = login;
|
||||||
},
|
},
|
||||||
|
|
|
@ -15,6 +15,7 @@ export interface GlobalState {
|
||||||
language: string; // zh | en
|
language: string; // zh | en
|
||||||
// assemblySize: string; // small | default | large
|
// assemblySize: string; // small | default | large
|
||||||
themeConfig: ThemeConfigProp;
|
themeConfig: ThemeConfigProp;
|
||||||
|
isFullScreen: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MenuState {
|
export interface MenuState {
|
||||||
|
|
|
@ -131,13 +131,16 @@ import i18n from '@/lang';
|
||||||
import { Host } from '@/api/interface/host';
|
import { Host } from '@/api/interface/host';
|
||||||
import { getHostTree, testByID } from '@/api/modules/host';
|
import { getHostTree, testByID } from '@/api/modules/host';
|
||||||
import { getCommandList } from '@/api/modules/command';
|
import { getCommandList } from '@/api/modules/command';
|
||||||
|
import { GlobalStore } from '@/store';
|
||||||
|
|
||||||
const dialogRef = ref();
|
const dialogRef = ref();
|
||||||
const ctx = getCurrentInstance() as any;
|
const ctx = getCurrentInstance() as any;
|
||||||
|
const globalStore = GlobalStore();
|
||||||
|
|
||||||
function toggleFullscreen() {
|
function toggleFullscreen() {
|
||||||
if (screenfull.isEnabled) {
|
if (screenfull.isEnabled) {
|
||||||
screenfull.toggle();
|
screenfull.toggle();
|
||||||
|
globalStore.setScreenFull();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue