Skip to content

Commit bbe25f9

Browse files
authored
Update App.vue
1 parent 2dc97d7 commit bbe25f9

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

src/App.vue

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,15 @@
2525
>
2626
<component :is="store.mobileOpenState ? CloseSmall : HamburgerButton" />
2727
</Icon>
28-
<!-- 页脚(仅 Footer;备案已内置在 Footer.vue) -->
28+
<!-- 页脚 -->
2929
<Transition name="fade" mode="out-in">
30-
<!-- 仅受 setOpenState 影响,避免背景模式把页脚也隐藏 -->
31-
<div v-show="!store.setOpenState">
32-
<Footer class="f-ter" />
33-
</div>
30+
<Footer class="f-ter" v-show="!store.backgroundShow && !store.setOpenState" />
3431
</Transition>
3532
</main>
3633
</Transition>
3734
</template>
3835

3936
<script setup>
40-
import { nextTick, watch, onMounted, onBeforeUnmount } from "vue";
4137
import { helloInit, checkDays } from "@/utils/getTime.js";
4238
import { HamburgerButton, CloseSmall } from "@icon-park/vue-next";
4339
import { mainStore } from "@/store";
@@ -81,9 +77,6 @@ watch(
8177
);
8278
8379
onMounted(() => {
84-
// 进入页面时确保退出壁纸展示模式,避免首屏只剩图片
85-
store.backgroundShow = false;
86-
8780
// 自定义鼠标
8881
cursorInit();
8982
@@ -97,7 +90,7 @@ onMounted(() => {
9790
return false;
9891
};
9992
100-
// 鼠标中键事件:切换壁纸展示模式
93+
// 鼠标中键事件
10194
window.addEventListener("mousedown", (event) => {
10295
if (event.button == 1) {
10396
store.backgroundShow = !store.backgroundShow;
@@ -112,7 +105,21 @@ onMounted(() => {
112105
getWidth();
113106
window.addEventListener("resize", getWidth);
114107
115-
108+
// 控制台输出
109+
const styleTitle1 = "font-size: 20px;font-weight: 600;color: rgb(244,167,89);";
110+
const styleTitle2 = "font-size:12px;color: rgb(244,167,89);";
111+
const styleContent = "color: rgb(30,152,255);";
112+
const title1 = "無名の主页";
113+
const title2 = `
114+
_____ __ __ _______ ____ __
115+
|_ _| \\/ |/ ____\\ \\ / /\\ \\ / /
116+
| | | \\ / | (___ \\ \\_/ / \\ \\_/ /
117+
| | | |\\/| |\\___ \\ \\ / \\ /
118+
_| |_| | | |____) | | | | |
119+
|_____|_| |_|_____/ |_| |_|`;
120+
const content = `\n\n版本: ${config.version}\n主页: ${config.home}\nGithub: ${config.github}`;
121+
console.info(`%c${title1} %c${title2} %c${content}`, styleTitle1, styleTitle2, styleContent);
122+
});
116123
117124
onBeforeUnmount(() => {
118125
window.removeEventListener("resize", getWidth);
@@ -244,9 +251,4 @@ onBeforeUnmount(() => {
244251
}
245252
}
246253
}
247-
248-
/* 可选:给备案块一点上间距,避免贴得太近 */
249-
.beian-footer {
250-
margin-top: 6px;
251-
}
252254
</style>

0 commit comments

Comments
 (0)