diff --git a/src/components/plugin/PluginMarket.vue b/src/components/plugin/PluginMarket.vue index b649ef3..f89da5a 100644 --- a/src/components/plugin/PluginMarket.vue +++ b/src/components/plugin/PluginMarket.vue @@ -205,6 +205,7 @@ onMounted(async () => { // '.workspace-leaf-content[data-type="pkmer-downloader"]' // ) as HTMLElement app.workspace.on("resize", handleWindowResize) + //@ts-ignore pkmerSize.value = props.app.workspace.activeLeaf.view.leaf.width // ele.value && resizeObserver.observe(ele.value) // window.addEventListener("resize", handleWindowResize) @@ -218,6 +219,7 @@ onMounted(async () => { }) const handleWindowResize = () => { + //@ts-ignore pkmerSize.value = props.app.workspace.activeLeaf.view.leaf.width } onUnmounted(() => { diff --git a/src/components/theme/ThemeMarket.vue b/src/components/theme/ThemeMarket.vue index d68ffa5..de7ece0 100644 --- a/src/components/theme/ThemeMarket.vue +++ b/src/components/theme/ThemeMarket.vue @@ -216,6 +216,7 @@ onMounted(async () => { // '.workspace-leaf-content[data-type="pkmer-downloader"]' // ) as HTMLElement app.workspace.on("resize", handleWindowResize) + //@ts-ignore pkmerSize.value = props.app.workspace.activeLeaf.view.leaf.width if (isUserLogin) downloadCount.value = await api.getDownloadCount() @@ -227,6 +228,7 @@ onMounted(async () => { } }) const handleWindowResize = () => { + //@ts-ignore pkmerSize.value = props.app.workspace.activeLeaf.view.leaf.width }