🌀(component): 优化carousel首次加载时不应存在动画效果,而是应立即显示默认的item

This commit is contained in:
0o张不歪o0 2022-07-04 13:13:23 +08:00
parent 6a3fde09ae
commit 780584e989
3 changed files with 5 additions and 3 deletions

View File

@ -39,6 +39,7 @@
transition-duration: 0.3s;
-webkit-transition-duration: 0.3s;
overflow: hidden;
visibility: hidden;
}
.layui-carousel-updown > * {

View File

@ -45,15 +45,15 @@ const getStyle = computed<any>(() => {
if (activeIndex === currentIndex) {
if (animation === "updown") {
return {
transform: "translateY(0)",
transform: "translateY(0)", visibility: 'inherit'
};
} else if (animation.includes("fade")) {
return {
opacity: 1,
opacity: 1,visibility: 'inherit'
};
} else {
return {
transform: "translateX(0)",
transform: "translateX(0)",visibility: 'inherit'
};
}
}

View File

@ -17,6 +17,7 @@
<h3>1.2.7 <span class="layui-badge-rim">2022-07-04</span></h3>
<ul>
<li>[修复] table默认加载时有横向滚动条header 的滚动条占位无法显示 by @dingyongya</li>
<li>[优化] carousel首次加载时不应存在动画效果而是应立即显示默认的item by @0o张不歪o0</li>
</ul>
</li>
</ul>