mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 01:40:21 +08:00
refactor: 优化智能分页检测和密钥复制交互
- 智能分页统一使用防抖检测避免与 ResizeObserver 双重触发 - 密钥名称仅在非空时启用复制功能 - 移除 API Key 不必要的危险字符校验
This commit is contained in:
@@ -127,13 +127,13 @@ export function useSmartPagination<T>(
|
||||
function requestDetect() {
|
||||
pendingDetect = true
|
||||
|
||||
// 先尝试立即检测
|
||||
// 先尝试立即检测(快路径),统一走防抖避免与 ResizeObserver 双重触发
|
||||
nextTick(() => {
|
||||
const el = listRef.value
|
||||
if (el && el.scrollHeight > 0) {
|
||||
// DOM 已就绪,直接检测
|
||||
// DOM 已就绪,通过防抖检测
|
||||
pendingDetect = false
|
||||
detect()
|
||||
debouncedDetect()
|
||||
}
|
||||
// 否则等待 ResizeObserver 回调
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user