Skip to content

Commit

Permalink
fix(ui): styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Chilfish committed Mar 10, 2024
1 parent 3d9d430 commit 420bd3d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/ui/src/Preview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ watchImmediate(
暂无微博数据,点击右上角设置来导入吧👋
</p>

<div v-if="publicStore.users.length">
<div
v-if="publicStore.users.length"
class="mx-auto w-fit"
>
<p class="mb-3 text-4.5">
不过检测到了可导入的用户
</p>
Expand Down
11 changes: 11 additions & 0 deletions packages/ui/src/post/Pagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
import { storeToRefs } from 'pinia'
const { curPage, pageSize, total } = storeToRefs(usePostStore())
async function fixPageBug(targetSize: number) {
if (targetSize > pageSize.value)
return
const tmp = document.querySelector<{ HTMLDivElement }>('.n-base-selection.n-base-selection--selected')
await new Promise(resolve => setTimeout(resolve, 500))
tmp?.click()
}
</script>

<template>
Expand All @@ -14,6 +24,7 @@ const { curPage, pageSize, total } = storeToRefs(usePostStore())
show-size-picker
:page-sizes="[10, 20, 30]"
:item-count="total"
@update-page-size="fixPageBug"
/>

<div>
Expand Down

0 comments on commit 420bd3d

Please sign in to comment.