Skip to content

Commit

Permalink
fix: 修复css zoom检测可能报错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
saint3347 committed Jan 16, 2025
1 parent 3c46488 commit 1eb9144
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions site/pages/documentation/changelog/2.x.x.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# 更新日志


### 2.0.28-beta.2

- 修复css zoom检测可能报错的问题 (< 2.0.28)


### 2.0.28-beta.1

- 修复 `Table` 开启滚动加载时,滚动到底部会触发外部body的滚动问题 (< 2.0.28)
Expand Down
1 change: 1 addition & 0 deletions src/utils/dom/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const getCurrentCSSZoom = (): number => {
if (window.ResizeObserver) {
// 监听document.body的变化,更新缓存的zoom
const resizeObserver = new ResizeObserver(() => {
if (!document.body) return
cachedZoom = Math.round(document.body.getBoundingClientRect().width) / document.body.clientWidth
})

Expand Down

0 comments on commit 1eb9144

Please sign in to comment.