mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-27 21:28:12 +00:00
perf: 优化滑动返回动画效果
This commit is contained in:
parent
7714c53085
commit
b3bd5aded5
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<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>
|
||||
</template>
|
||||
|
||||
@ -54,7 +54,6 @@ export default {
|
||||
maxTop = this.windowHeight - offset;
|
||||
return {
|
||||
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;
|
||||
border-radius: 50%;
|
||||
transform: translate(-460px, -50%);
|
||||
transition: left 0.2s;
|
||||
animation: mobile-back-animation 200ms forwards;
|
||||
}
|
||||
}
|
||||
|
||||
&.show-back {
|
||||
left: 0;
|
||||
}
|
||||
@keyframes mobile-back-animation {
|
||||
from {
|
||||
left: -50px;
|
||||
}
|
||||
to {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user