diff --git a/lib/use/useLayout.ts b/lib/use/useLayout.ts index dc52c75..0ae0b98 100644 --- a/lib/use/useLayout.ts +++ b/lib/use/useLayout.ts @@ -66,7 +66,7 @@ export function useLayout(props: WaterfallProps, colWidth: Ref, cols: Re const style = curItem.style as CssStyleObject // 设置偏移 - if (transform) style[transform] = `translate3d(${curX}px,${minY}px, 0)` + if (transform) style[transform] = `translate3d(${Math.floor(curX)}px,${Math.floor(minY)}px, 0)` style.width = `${colWidth.value}px` // 隐藏 diff --git a/package.json b/package.json index b57d846..5682c9e 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-waterfall-plugin-next", - "version": "2.6.0", + "version": "2.6.1", "license": "UNLICENSED", "author": "Yaowen Liu <576079353@qq.com>", "main": "dist/my-lib.umd.js",