fix: selecting the previous post leads to a negative page (#5594)

#### What type of PR is this?

/kind bug
/area ui

#### What this PR does / why we need it:

修复当选中首个文章设置时,点击上一个还可以继续修改 `page` 的问题。

#### How to test it?

测试选中首个文章设置之后,点击上一个是否不再修改 `page` 值

#### Which issue(s) this PR fixes:

Fixes #5475 

#### Does this PR introduce a user-facing change?
```release-note
修复在文章列表设置中可以无限点击上一个的问题
```
pull/5595/head
Takagi 2024-03-26 16:50:07 +08:00 committed by GitHub
parent a2810156da
commit 1fb4c82e1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ const handleSelectPrevious = async () => {
selectedPost.value = previousPost;
return;
}
if (index === 0 && hasPrevious) {
if (index === 0 && hasPrevious.value) {
page.value--;
await refetch();
selectedPost.value = posts.value[posts.value.length - 1].post;