2020-01-30 04:37:25 +09:00
|
|
|
<template>
|
2020-02-06 19:11:14 +09:00
|
|
|
<transition-group v-if="$store.state.device.animation"
|
2020-02-15 18:39:45 +09:00
|
|
|
class="uupnnhew"
|
|
|
|
name="staggered"
|
2020-01-30 04:37:25 +09:00
|
|
|
tag="div"
|
|
|
|
appear
|
|
|
|
>
|
|
|
|
<slot></slot>
|
|
|
|
</transition-group>
|
2020-02-06 19:11:14 +09:00
|
|
|
<div v-else>
|
|
|
|
<slot></slot>
|
|
|
|
</div>
|
2020-01-30 04:37:25 +09:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
methods: {
|
|
|
|
focus() {
|
|
|
|
this.$slots.default[0].elm.focus();
|
|
|
|
}
|
2020-02-15 18:39:45 +09:00
|
|
|
},
|
2020-01-30 04:37:25 +09:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2020-02-21 09:11:35 +09:00
|
|
|
.uupnnhew {
|
|
|
|
> .staggered-enter {
|
2020-02-15 18:39:45 +09:00
|
|
|
opacity: 0;
|
|
|
|
transform: translateY(-64px);
|
|
|
|
}
|
|
|
|
|
|
|
|
@for $i from 1 through 30 {
|
2020-02-21 09:11:35 +09:00
|
|
|
> .staggered-enter-active:nth-child(#{$i}) {
|
2020-02-15 18:42:43 +09:00
|
|
|
transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1) (15ms * ($i - 1)), opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1) (15ms * ($i - 1));
|
2020-02-15 18:39:45 +09:00
|
|
|
}
|
|
|
|
}
|
2020-01-30 04:37:25 +09:00
|
|
|
}
|
|
|
|
</style>
|