Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
cumany committed Apr 1, 2024
1 parent 7c7d238 commit 0246ab0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/plugin/PluginMarket.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -218,6 +219,7 @@ onMounted(async () => {
})
const handleWindowResize = () => {
//@ts-ignore
pkmerSize.value = props.app.workspace.activeLeaf.view.leaf.width
}
onUnmounted(() => {
Expand Down
2 changes: 2 additions & 0 deletions src/components/theme/ThemeMarket.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -227,6 +228,7 @@ onMounted(async () => {
}
})
const handleWindowResize = () => {
//@ts-ignore
pkmerSize.value = props.app.workspace.activeLeaf.view.leaf.width
}
Expand Down

0 comments on commit 0246ab0

Please sign in to comment.