Merge branch 'next' of https://gitee.com/layui/layui-vue into next
This commit is contained in:
commit
c4c80bc790
@ -205,8 +205,8 @@ onMounted(() => {
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
//@ts-ignore
|
||||
document.addEventListener(fullscreenAPI.fullscreenchange, onFullscreenchange);
|
||||
document.addEventListener("keydown", onFullscreenchange);
|
||||
document.removeEventListener(fullscreenAPI.fullscreenchange, onFullscreenchange);
|
||||
document.removeEventListener("keydown", onFullscreenchange);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
||||
<div class="code">layui-anim-fadein</div>
|
||||
</li>
|
||||
<li style="height:auto">
|
||||
<div class="layui-anim layui-anim-fadeout" @click="replay">渐隐</div>
|
||||
<div class="layui-anim" @click="replay($event,'layui-anim-fadeout')">渐隐</div>
|
||||
<div class="code">layui-anim-fadeout</div>
|
||||
</li>
|
||||
<li style="height:auto">
|
||||
@ -72,13 +72,17 @@ import { ref } from 'vue'
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const replay = (e) => {
|
||||
const replay = (e, aninClass) => {
|
||||
const el = e.currentTarget;
|
||||
const targetClass = el.classList[1];
|
||||
el.classList.remove(targetClass);
|
||||
setTimeout(() => {
|
||||
el.classList.add(targetClass);
|
||||
},100)
|
||||
if(!targetClass){
|
||||
el.classList.add(aninClass);
|
||||
}else{
|
||||
el.classList.remove(targetClass);
|
||||
setTimeout(() => {
|
||||
el.classList.add(targetClass);
|
||||
},100)
|
||||
}
|
||||
}
|
||||
return {
|
||||
replay
|
||||
|
Loading…
Reference in New Issue
Block a user