Skip to content

Commit

Permalink
feat: 全新tree组件
Browse files Browse the repository at this point in the history
  • Loading branch information
keno-lee authored and apathiaX committed Sep 24, 2024
1 parent c5e9330 commit 1bc00d3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/VirtList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -513,13 +513,13 @@ function useVirtList<T extends Record<string, any>>(
// 兼容性处理,详情:https://developer.mozilla.org/zh-CN/docs/Web/API/ResizeObserver
// ios中没有borderBoxSize,只有contentRect
if (entry.borderBoxSize) {
// Firefox implements `contentBoxSize` as a single content rect, rather than an array
const contentBoxSize = Array.isArray(entry.contentBoxSize)
? entry.contentBoxSize[0]
: entry.contentBoxSize;
// Firefox implements `borderBoxSize` as a single content rect, rather than an array
const borderBoxSize = Array.isArray(entry.borderBoxSize)
? entry.borderBoxSize[0]
: entry.borderBoxSize;
newSize = props.horizontal
? contentBoxSize.inlineSize
: contentBoxSize.blockSize;
? borderBoxSize.inlineSize
: borderBoxSize.blockSize;
} else {
newSize = props.horizontal
? entry.contentRect.width
Expand Down

0 comments on commit 1bc00d3

Please sign in to comment.