Skip to content

Commit

Permalink
fixed: 修复了translate3d的值有小数导致文字模糊的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
heikaimu committed Nov 5, 2024
1 parent 7d40009 commit 6d45c57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/use/useLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function useLayout(props: WaterfallProps, colWidth: Ref<number>, 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`

// 隐藏
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-waterfall-plugin-next",
"version": "2.6.0",
"version": "2.6.1",
"license": "UNLICENSED",
"author": "Yaowen Liu <[email protected]>",
"main": "dist/my-lib.umd.js",
Expand Down

0 comments on commit 6d45c57

Please sign in to comment.