(component): 优化 collapse 折叠面板动画

This commit is contained in:
就眠儀式 2022-11-05 21:57:37 +08:00
parent 62c444a954
commit 16c0047620
2 changed files with 3 additions and 5 deletions

View File

@ -33,8 +33,8 @@
}
.layui-colla-icon {
position: absolute;
left: 15px;
top: 0;
font-size: 14px;
position: absolute;
}

View File

@ -55,10 +55,8 @@ const showHandle = function () {
:class="['layui-colla-title', { 'layui-disabled': disabled }]"
@click="showHandle"
>
<slot name="title" :props="props">{{ title }}</slot>
<i class="layui-icon layui-colla-icon">
{{ isShow ? "" : "" }}
</i>
<slot name="title" :props="props">{{ title }}</slot> {{ collapseTransition }}
<i class="layui-icon layui-colla-icon layui-icon-right" :style="{ 'transform' : isShow ? 'rotate(90deg)':'none', 'transition': collapseTransition ? 'all 0.2s ease 0s':'' }"></i>
</h2>
<lay-transition :enable="collapseTransition">
<div v-if="isShow">