mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-27 20:37:32 -07:00
23 lines
517 B
TypeScript
23 lines
517 B
TypeScript
|
import { Directive } from 'vue';
|
||
|
|
||
|
export default {
|
||
|
mounted(el, binding, vn) {
|
||
|
el.addEventListener('mousedown', () => {
|
||
|
el.classList.add('_anime_bounce_ready');
|
||
|
|
||
|
el.addEventListener('mouseleave', () => {
|
||
|
el.classList.remove('_anime_bounce_ready');
|
||
|
});
|
||
|
});
|
||
|
|
||
|
el.addEventListener('click', () => {
|
||
|
el.classList.add('_anime_bounce');
|
||
|
});
|
||
|
|
||
|
el.addEventListener('animationend', () => {
|
||
|
el.classList.remove('_anime_bounce_ready');
|
||
|
el.classList.remove('_anime_bounce');
|
||
|
});
|
||
|
}
|
||
|
} as Directive;
|