From 1999f30b0e363d63bf1f1a8c0fda7bdc80c9b8b7 Mon Sep 17 00:00:00 2001 From: nongyehong <2439646234@qq.com> Date: Mon, 21 Oct 2024 00:12:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(layout):=20:bug:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E6=A0=8F=E9=A1=B6=E9=83=A8=E7=A9=BA=E7=99=BD?= =?UTF-8?q?=E5=9D=97=E9=A2=9C=E8=89=B2=E5=92=8C=E6=97=A0=E6=B3=95=E7=BC=A9?= =?UTF-8?q?=E5=B0=8F=E4=B8=BB=E9=A1=B5=E9=9D=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/enums/index.ts | 2 +- src/layout/left/components/ActionList.vue | 27 +------------------ .../left/components/definePlugins/Card.vue | 1 - .../left/components/definePlugins/List.vue | 1 - src/layout/left/config.tsx | 1 - src/layout/left/hook.ts | 1 - src/layout/left/index.vue | 2 +- src/stores/menuTop.ts | 1 - src/stores/onlineStatus.ts | 1 - src/stores/plugins.ts | 9 +++---- src/stores/setting.ts | 1 - src/typings/stores.d.ts | 3 +-- src/views/loginWindow/Login.vue | 1 - 13 files changed, 8 insertions(+), 43 deletions(-) diff --git a/src/enums/index.ts b/src/enums/index.ts index 91f1db4..3974d13 100644 --- a/src/enums/index.ts +++ b/src/enums/index.ts @@ -281,7 +281,7 @@ export enum PluginEnum { /** 菜单显示模式 */ export enum ShowModeEnum { /** 图标方式 */ - ICON = 0, + ICON, /** 文字方式 */ TEXT } diff --git a/src/layout/left/components/ActionList.vue b/src/layout/left/components/ActionList.vue index 6c61fe0..e307961 100644 --- a/src/layout/left/components/ActionList.vue +++ b/src/layout/left/components/ActionList.vue @@ -311,6 +311,7 @@ const handleResize = async (e: Event) => { const initWindowHeight = async () => { let homeWindow = await WebviewWindow.getByLabel('home') + await homeWindow?.setResizable(true) let size = await homeWindow?.size() let sf = await homeWindow?.scaleFactor() if (homeWindow && size && sf) { @@ -350,32 +351,6 @@ onMounted(() => { setTimeout(() => { tipShow.value = false }, 5000) - - // // 创建 ResizeObserver 实例并监听 headerRef - // const resizeObserver = new ResizeObserver((entries) => { - // for (let entry of entries) { - // console.log(entry.contentRect.height) - // // if (entry.contentRect.height > 220) { - // // // 计算需要移动的项数量 - // // const itemsToMove = Math.floor(itemsTop.value.length / 2) // 例如:移动一半 - // // excessItems.value = itemsTop.value.splice(-itemsToMove, itemsToMove) - // // } - // } - // }) - // - // // 观察 headerRef 的大小变化 - // if (headerRef.value) { - // resizeObserver.observe(headerRef.value) - // } - // - // if (actionListRef.value) { - // resizeObserver.observe(actionListRef.value) - // } - // - // // 在组件卸载时停止观察 - // onUnmounted(() => { - // resizeObserver.disconnect() - // }) })