Skip to content

Commit a0260d7

Browse files
committed
feat(collapse): 适配鸿蒙
1 parent 2fc1a55 commit a0260d7

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/packages/collapseitem/collapseitem.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,11 @@ export const CollapseItem: FunctionComponent<
7373

7474
const updateRectHeight = async () => {
7575
const height = contentRef.current.offsetHeight
76-
if (height) {
77-
setCurrentHeight(height)
78-
setWrapperHeight(expanded ? height : 0)
79-
setTimeout(() => {
80-
setTran(1)
81-
})
82-
}
76+
setCurrentHeight(height)
77+
setWrapperHeight(expanded ? height : 0)
78+
setTimeout(() => {
79+
setTran(1)
80+
})
8381
}
8482

8583
useEffect(() => {

0 commit comments

Comments
 (0)