Skip to content

Commit ea1f1bb

Browse files
committed
Update: 主题样式更新
1 parent 7a2895d commit ea1f1bb

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

package/components/NanoContainer/index.vue

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template>
22
<div
33
ref="root"
4-
class="nano-theme absolute top-5vh left-5vw h-90vh w-90vw flex flex-col"
5-
:class="{ 'top-0! left-0! w-screen! h-screen!': fullscreen }"
4+
class="nano-theme absolute flex flex-col"
5+
:style="windowStyle"
66
>
77
<template v-if="!loading">
88
<NanoHeader/>
@@ -34,10 +34,22 @@
3434
const resizeObserver = ref<ResizeObserver | null>(null);
3535
const loading = ref(true);
3636
37-
console.log('onlyFullscreen', ctl.onlyFullscreen);
38-
console.log('fullscreen', ctl.fullscreen);
39-
const fullscreen = computed(() => {
40-
return ctl.onlyFullscreen || ctl.fullscreen;
37+
const windowStyle = computed(() => {
38+
if (ctl.onlyFullscreen || ctl.fullscreen) {
39+
return {
40+
width: '100vw',
41+
height: '100vh',
42+
top: '0',
43+
left: '0'
44+
};
45+
} else {
46+
return {
47+
width: '90vw',
48+
height: '90vh',
49+
top: '5vh',
50+
left: '5vw'
51+
};
52+
}
4153
});
4254
4355
onMounted(() => {

0 commit comments

Comments
 (0)