🌀(component): 优化carousel首次加载时不应存在动画效果,而是应立即显示默认的item
This commit is contained in:
parent
6a3fde09ae
commit
780584e989
@ -39,6 +39,7 @@
|
|||||||
transition-duration: 0.3s;
|
transition-duration: 0.3s;
|
||||||
-webkit-transition-duration: 0.3s;
|
-webkit-transition-duration: 0.3s;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-carousel-updown > * {
|
.layui-carousel-updown > * {
|
||||||
|
@ -45,15 +45,15 @@ const getStyle = computed<any>(() => {
|
|||||||
if (activeIndex === currentIndex) {
|
if (activeIndex === currentIndex) {
|
||||||
if (animation === "updown") {
|
if (animation === "updown") {
|
||||||
return {
|
return {
|
||||||
transform: "translateY(0)",
|
transform: "translateY(0)", visibility: 'inherit'
|
||||||
};
|
};
|
||||||
} else if (animation.includes("fade")) {
|
} else if (animation.includes("fade")) {
|
||||||
return {
|
return {
|
||||||
opacity: 1,
|
opacity: 1,visibility: 'inherit'
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
transform: "translateX(0)",
|
transform: "translateX(0)",visibility: 'inherit'
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
<h3>1.2.7 <span class="layui-badge-rim">2022-07-04</span></h3>
|
<h3>1.2.7 <span class="layui-badge-rim">2022-07-04</span></h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>[修复] table默认加载时有横向滚动条,header 的滚动条占位无法显示 by @dingyongya</li>
|
<li>[修复] table默认加载时有横向滚动条,header 的滚动条占位无法显示 by @dingyongya</li>
|
||||||
|
<li>[优化] carousel首次加载时不应存在动画效果,而是应立即显示默认的item by @0o张不歪o0</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user