瀏覽代碼

collapse: remove overflow hidden even if height does not match perfect (#4203)

Sandro Gehri 1 年之前
父節點
當前提交
6dcfefc973
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/collapse/src/index.js

+ 1 - 1
packages/collapse/src/index.js

@@ -56,7 +56,7 @@ export default function (Alpine) {
                     start: { height: current+'px' },
                     end: { height: full+'px' },
                 }, () => el._x_isShown = true, () => {
-                    if (el.getBoundingClientRect().height == full) {
+                    if (Math.abs(el.getBoundingClientRect().height - full) < 1) {
                         el.style.overflow = null
                     }
                 })