mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-02 02:48:13 +00:00
perf: 优化滑动返回动画效果
This commit is contained in:
parent
7714c53085
commit
b3bd5aded5
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mobile-back">
|
<div class="mobile-back">
|
||||||
<div v-if="isVisible" class="back-semicircle" :style="style"></div>
|
<div v-if="isVisible && x > 20" class="back-semicircle" :style="style"></div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -54,7 +54,6 @@ export default {
|
|||||||
maxTop = this.windowHeight - offset;
|
maxTop = this.windowHeight - offset;
|
||||||
return {
|
return {
|
||||||
top: Math.min(top, maxTop) + 'px',
|
top: Math.min(top, maxTop) + 'px',
|
||||||
left: this.x > 20 ? 0 : '-50px',
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
13
resources/assets/sass/components/mobile.scss
vendored
13
resources/assets/sass/components/mobile.scss
vendored
@ -98,11 +98,16 @@
|
|||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
transform: translate(-460px, -50%);
|
transform: translate(-460px, -50%);
|
||||||
transition: left 0.2s;
|
animation: mobile-back-animation 200ms forwards;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&.show-back {
|
@keyframes mobile-back-animation {
|
||||||
left: 0;
|
from {
|
||||||
}
|
left: -50px;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user