提交 915091bf 编写于 作者: H hdx

fix(swiper-list): web 平台 chrome windows系统 transform scaleX渲染bug

上级 4d5aaa75
......@@ -204,8 +204,16 @@
const indicator_line_w = lerpNumber(current_size.w, move_to_size.w, percentage)
// 更新指示线
// #ifdef APP
const x = indicator_line_x + indicator_line_w / 2
this.indicatorNode?.style?.setProperty('transform', `translateX(${x}px) scaleX(${indicator_line_w})`)
// #endif
// #ifdef WEB
// TODO chrome windows系统 transform scaleX渲染bug
const x = indicator_line_x
this.indicatorNode?.style?.setProperty('width', `${indicator_line_w}px`)
this.indicatorNode?.style?.setProperty('transform', `translateX(${x}px)`)
// #endif
// 滚动到水平中心位置
const scroll_x = x - this.swiperWidth / 2
......
......@@ -208,8 +208,16 @@
const indicator_line_w = lerpNumber(current_size.w, move_to_size.w, percentage)
// 更新指示线
// #ifdef APP
const x = indicator_line_x + indicator_line_w / 2
this.indicatorNode?.style?.setProperty('transform', `translateX(${x}px) scaleX(${indicator_line_w})`)
// #endif
// #ifdef WEB
// TODO chrome windows系统 transform scaleX渲染bug
const x = indicator_line_x
this.indicatorNode?.style?.setProperty('width', `${indicator_line_w}px`)
this.indicatorNode?.style?.setProperty('transform', `translateX(${x}px)`)
// #endif
// 滚动到水平中心位置
const scroll_x = x - this.swiperWidth / 2
......
......@@ -162,8 +162,16 @@
const indicator_line_w = lerpNumber(current_size.w, move_to_size.w, percentage)
// 通过 transform 更新指示线,避免重排版
// #ifdef APP
const x = indicator_line_x + indicator_line_w / 2
this.indicatorNode!.style.setProperty('transform', `translateX(${x}px) scaleX(${indicator_line_w})`)
this.indicatorNode?.style?.setProperty('transform', `translateX(${x}px) scaleX(${indicator_line_w})`)
// #endif
// #ifdef WEB
// TODO chrome windows系统 transform scaleX渲染bug
const x = indicator_line_x
this.indicatorNode?.style?.setProperty('width', `${indicator_line_w}px`)
this.indicatorNode?.style?.setProperty('transform', `translateX(${x}px)`)
// #endif
// 滚动到水平中心位置
const scroll_x = x - this.swiperWidth / 2
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册