This commit is contained in:
syuilo
2018-02-21 02:53:34 +09:00
parent b2a6257f93
commit a1e57841e7
22 changed files with 304 additions and 372 deletions

View File

@@ -11,24 +11,26 @@ import * as anime from 'animejs';
export default Vue.extend({
props: ['message'],
mounted() {
anime({
targets: this.$el,
opacity: 1,
translateY: [-64, 0],
easing: 'easeOutElastic',
duration: 500
});
setTimeout(() => {
this.$nextTick(() => {
anime({
targets: this.$el,
opacity: 0,
translateY: -64,
duration: 500,
easing: 'easeInElastic',
complete: () => this.$destroy()
opacity: 1,
translateY: [-64, 0],
easing: 'easeOutElastic',
duration: 500
});
}, 6000);
setTimeout(() => {
anime({
targets: this.$el,
opacity: 0,
translateY: -64,
duration: 500,
easing: 'easeInElastic',
complete: () => this.$destroy()
});
}, 6000);
});
}
});
</script>