1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-24 10:24:15 +02:00

refactor(frontend): カスタムディレクティブの型付け (#16659)

* refactor(frontend): カスタムディレクティブの型付け

* fix
This commit is contained in:
かっこかり
2025-10-19 11:36:00 +09:00
committed by GitHub
parent 44930342a8
commit d98bf012b5
13 changed files with 158 additions and 94 deletions

View File

@@ -5,8 +5,8 @@
import type { Directive } from 'vue';
export default {
beforeMount(src, binding, vn) {
export const animDirective = {
beforeMount(src) {
src.style.opacity = '0';
src.style.transform = 'scale(0.9)';
// ページネーションと相性が悪いので
@@ -14,10 +14,10 @@ export default {
src.classList.add('_zoom');
},
mounted(src, binding, vn) {
mounted(src) {
window.setTimeout(() => {
src.style.opacity = '1';
src.style.transform = 'none';
}, 1);
},
} as Directive;
} as Directive<HTMLElement>;