feat: 新增 transition 组件 type 属性 fade 值, 提供淡入淡出效果

This commit is contained in:
就眠儀式 2022-03-22 01:03:27 +08:00
parent 2ff45cc940
commit 6d3073a666
2 changed files with 8 additions and 7 deletions

View File

@ -17,6 +17,7 @@
<h3>0.4.1 <span class="layui-badge-rim">2022-03-17</span></h3> <h3>0.4.1 <span class="layui-badge-rim">2022-03-17</span></h3>
<ul> <ul>
<li>[新增] transition 组件 type 属性, 默认为 collapse 过渡。</li> <li>[新增] transition 组件 type 属性, 默认为 collapse 过渡。</li>
<li>[新增] transition 组件 type 属性 fade 值, 提供淡出淡入效果。</li>
</ul> </ul>
</li> </li>
</ul> </ul>

View File

@ -5,16 +5,16 @@
</template> </template>
<style> <style>
.fade-enter { .fade-enter-from,
opacity: 0;
}
.fade-enter-active {
transition: opacity 1s;
}
.fade-leave-to { .fade-leave-to {
opacity: 0; opacity: 0;
} }
.fade-enter-to,
.fade-leave-from {
opacity: 1;
}
.fade-enter-active,
.fade-leave-active { .fade-leave-active {
transition: opacity 1s; transition: opacity 1s ease;
} }
</style> </style>