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