mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
chore(Swipe): limit the decimal length of transform (#12337)
This commit is contained in:
parent
2bb4b85b5d
commit
4ac80602e8
@ -123,7 +123,9 @@ export default defineComponent({
|
|||||||
const trackStyle = computed(() => {
|
const trackStyle = computed(() => {
|
||||||
const style: CSSProperties = {
|
const style: CSSProperties = {
|
||||||
transitionDuration: `${state.swiping ? 0 : props.duration}ms`,
|
transitionDuration: `${state.swiping ? 0 : props.duration}ms`,
|
||||||
transform: `translate${props.vertical ? 'Y' : 'X'}(${state.offset}px)`,
|
transform: `translate${
|
||||||
|
props.vertical ? 'Y' : 'X'
|
||||||
|
}(${+state.offset.toFixed(2)}px)`,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (size.value) {
|
if (size.value) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user