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