Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

预览附件时点击 "pre" 或 "next" 翻页后页面不刷新或者页面刷新错误 #4330

Closed
Erzbir opened this issue Jul 29, 2023 · 0 comments · Fixed by #4331
Closed
Assignees
Labels
area/console Issues or PRs related to the Halo Console kind/bug Categorizes issue or PR as related to a bug.

Comments

@Erzbir
Copy link
Contributor

Erzbir commented Jul 29, 2023

是什么版本出现了此问题?

2.7.0

使用的什么数据库?

H2

使用的哪种方式部署?

Docker

在线站点地址

No response

发生了什么?

问题:

在预览附件时点击 "下一个" 或者 "上一个" 如果这时翻页, 可能会出现 page++page-- 了但预览页面没有更新, 进而获取到的 index0 或者 data.value.length - 1, 导致预览显示的是上一页的 data.value[index]; 同时这样还会出现 index == -1 导致点击 "上一个" 永远不成功

解决方案:

问题猜测为 DOM 异步加载导致

await refetch(); 前加上 await nextTick(); 可解决

目前只在点击 "下一个" 或 "上一个" 后翻页的情况下发现此 bug

/kind bug
/area console
/assign

相关日志输出

No response

附加信息

No response

@f2c-ci-robot f2c-ci-robot bot added kind/bug Categorizes issue or PR as related to a bug. area/console Issues or PRs related to the Halo Console labels Jul 29, 2023
@Erzbir Erzbir changed the title 预览附件时翻页有可能会出错 预览附件时点击 "pre" 或 "next" 翻页后有可能会出错 Jul 29, 2023
@Erzbir Erzbir changed the title 预览附件时点击 "pre" 或 "next" 翻页后有可能会出错 预览附件时点击 "pre" 或 "next" 翻页后页面不刷新或者页面刷新错误 Jul 29, 2023
f2c-ci-robot bot pushed a commit that referenced this issue Jul 31, 2023
#### What type of PR is this?

/kind bug
/area console

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

在预览附件时点击 "下一个" 或者 "上一个", 如果这时翻页, 预览页面可能不会刷新, 也可能刷新到其他非预料中的页面

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

Fixes #4330

#### Special notes for your reviewer:
1. 准备附件测试翻页
2. 在第一页的最后一个附件预览中点击 "next", 观察是否正常
3. 在第二页的第一个附件预览中点击 "pre", 观察是否正常

#### Does this PR introduce a user-facing change?

```release-note
预览附件点击 "下一个" 或者 "上一个" 翻页后, 预览页面不正常刷新
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/console Issues or PRs related to the Halo Console kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant