Skip to content

Commit 8596e28

Browse files
committed
Fix: 修复布局错乱
1 parent 0dc7445 commit 8596e28

File tree

13 files changed

+19
-13
lines changed

13 files changed

+19
-13
lines changed

package/App.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ $fontFamily: "微软雅黑", "Helvetica Neue", Helvetica, "PingFang SC", "Hiragi
2121
box-sizing: border-box;
2222
margin: 0;
2323
padding: 0;
24+
border: 0;
2425
touch-action: auto;
2526
}
2627

package/App.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
ctl.hidePaths = true;
3636
ctl.hideCopyright = true;
3737
} else {
38-
if (clientWidth >= 2560) {
38+
if (clientWidth >= 2440) {
3939
htmlEl.style.setProperty('font-size', '18px');
40-
} else if (clientWidth >= 1920) {
40+
} else if (clientWidth >= 1600) {
4141
htmlEl.style.setProperty('font-size', '16px');
4242
} else {
4343
htmlEl.style.setProperty('font-size', '14px');

package/components/NanoFooter/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<footer
3-
class="shrink-0 w-full h-[var(--footer-size)]"
3+
class="relative shrink-0 w-full h-[var(--footer-size)] overflow-hidden"
44
un-border="t-solid t-1px t-[var(--footer-border-color)]"
55
un-flex="~ items-center justify-between shrink-0"
66
style="background: var(--footer-bg);"

package/components/NanoHeader/index.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
<template>
22
<header
3-
class="shrink-0 w-full h-[var(--header-size)]"
3+
class="relative shrink-0 w-full h-[var(--header-size)] overflow-hidden"
44
un-flex="~ justify-between"
5-
un-border="b-solid b-1px b-[var(--header-border-color)]"
65
style="--s: var(--header-size); background: var(--header-bg)"
76
>
87
<!--header left-->
9-
<div class="relative flex-center gap-.8">
8+
<div class="relative h-full flex-center gap-.8">
109
<NanoLogo/>
1110
<NanoHeaderTopNav v-if="!ctl.hideHeaderTopNav"/>
1211
<NanoMiniHeaderTopNav v-else/>
1312
</div>
1413
<!--header right-->
15-
<div class="relative flex flex-row-reverse">
14+
<div class="relative h-full flex flex-row-reverse">
1615
<NanoWindowController/>
1716
</div>
1817
</header>

package/components/NanoLeftActionBar/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div
3-
class="shrink-0 h-full w-[var(--action-bar-size)]"
3+
class="relative shrink-0 h-full w-[var(--action-bar-size)]"
44
un-border="r-1px r-solid r-[var(--action-bar-border-color)]"
55
un-flex="~ col items-center justify-between"
66
style="background: var(--action-bar-bg)"

package/components/NanoLeftSidebar/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div
3-
class="shrink-0 h-full w-[var(--sidebar-left-size)]"
3+
class="relative shrink-0 h-full w-[var(--sidebar-left-size)]"
44
:class="{ 'w-0': !openStatus }"
55
un-border="r-solid r-1px r-[var(--sidebar-border-color)]"
66
un-flex="~ col"

package/components/NanoMain/index.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div
3-
class="grow z-2 h-full bg-white min-w-0 vp-doc"
3+
class="relative grow z-2 h-full bg-white min-w-0 vp-doc"
44
>
55
<!--content area-->
66
<div class="relative w-full h-full">
@@ -85,6 +85,7 @@
8585
8686
onUnmounted(() => {
8787
emitter.off('scroll-to-hash');
88+
scrollbars.value?.osInstance()?.destroy();
8889
});
8990
</script>
9091

package/components/NanoOutline/index.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
const shadowShow = ref(false);
7676
const headers = shallowRef<any[]>([]);
7777
const openStatus = ref<boolean>(true);
78+
const scrollbar = ref<any | null>(null);
7879
7980
const scroll = debounce((e: any) => {
8081
shadowShow.value = e.elements().viewport.scrollTop > 0;
@@ -102,6 +103,7 @@
102103
103104
onBeforeUnmount(() => {
104105
emitter.off('toggle-structure-open-status');
106+
scrollbar.value?.osInstance()?.destroy();
105107
});
106108
107109
defineExpose({ openStatus });

package/components/NanoPaths/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
text: '💠' + title
5959
} ];
6060
});
61+
scrollbar.value?.osInstance()?.destroy();
6162
});
6263
</script>
6364

package/components/NanoRightActionBar/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div
3-
class="shrink-0 h-full w-[var(--action-bar-size)]"
3+
class="relative shrink-0 h-full w-[var(--action-bar-size)]"
44
un-border="l-1px l-solid l-[var(--action-bar-border-color)]"
55
un-flex="~ col items-center justify-between"
66
style="background: var(--action-bar-bg)"

0 commit comments

Comments
 (0)