Skip to content

Commit

Permalink
fix(ui): update state after importing
Browse files Browse the repository at this point in the history
  • Loading branch information
Chilfish committed Mar 5, 2024
1 parent 2faca5f commit 435d4e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/core/src/stores/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const usePostStore = defineStore('post', () => {

const { count, search } = await addDBPosts(data, isReplace)
totalDB.value = count
total.value = count
seachFn.value = search
}

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/Preview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ onMounted(async () => {
loaded.value = true
})
watchImmediate(() => [route.query, loaded.value], async () => {
watchImmediate(() => [route.query, loaded.value, postStore.totalDB], async () => {
if (!loaded.value)
return
const page = route.query.page
Expand Down

0 comments on commit 435d4e2

Please sign in to comment.