提交 851ba940 编写于 作者: H hdx

swiper-list2: 处理代码警告

上级 e4b29733
...@@ -112,14 +112,14 @@ ...@@ -112,14 +112,14 @@
// 当前 // 当前
const current_scale = lerpNumber(min_ratio, max_ratio, 1 - percentage) const current_scale = lerpNumber(min_ratio, max_ratio, 1 - percentage)
current_node.style?.setProperty('transform', `scale(${current_scale})`) current_node.style.setProperty('transform', `scale(${current_scale})`)
// 目标 // 目标
const move_to_scale = lerpNumber(min_ratio, max_ratio, percentage) const move_to_scale = lerpNumber(min_ratio, max_ratio, percentage)
move_to_node.style?.setProperty('transform', `scale(${move_to_scale})`) move_to_node.style.setProperty('transform', `scale(${move_to_scale})`)
// 滚动到水平中心位置 // 滚动到水平中心位置
const target_x = current_node.offsetLeft + (move_to_node.offsetLeft - current_node.offsetLeft) * percentage const target_x = lerpNumber(current_node.offsetLeft, move_to_node.offsetLeft, percentage)
const center_x = target_x + move_to_node.offsetWidth / 2 - this.$swiperWidth / 2 const center_x = target_x + move_to_node.offsetWidth / 2 - this.$swiperWidth / 2
this.$tabScrollView?.setAttribute('scrollLeft', center_x) this.$tabScrollView?.setAttribute('scrollLeft', center_x)
} }
...@@ -139,8 +139,7 @@ ...@@ -139,8 +139,7 @@
.swiper-tabs-item { .swiper-tabs-item {
color: #555; color: #555;
font-size: 16px; font-size: 16px;
margin: 12px 25px 5px 25px; margin: 15px 25px 5px 25px;
/* transform-origin: left bottom; */
} }
.swiper-tabs-item-active { .swiper-tabs-item-active {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册