预览附件时点击 "pre" 或 "next" 翻页后页面不刷新或者页面刷新错误 #4330
Labels
area/console
Issues or PRs related to the Halo Console
kind/bug
Categorizes issue or PR as related to a bug.
是什么版本出现了此问题?
2.7.0
使用的什么数据库?
H2
使用的哪种方式部署?
Docker
在线站点地址
No response
发生了什么?
问题:
在预览附件时点击 "下一个" 或者 "上一个" 如果这时翻页, 可能会出现
page++
或page--
了但预览页面没有更新, 进而获取到的index
是0
或者data.value.length - 1
, 导致预览显示的是上一页的data.value[index]
; 同时这样还会出现index == -1
导致点击 "上一个" 永远不成功解决方案:
问题猜测为 DOM 异步加载导致
在
await refetch();
前加上await nextTick();
可解决目前只在点击 "下一个" 或 "上一个" 后翻页的情况下发现此 bug
/kind bug
/area console
/assign
相关日志输出
No response
附加信息
No response
The text was updated successfully, but these errors were encountered: