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

@@ -3,12 +3,13 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import type { Directive } from 'vue';
import MkRippleEffect from '@/components/MkRippleEffect.vue';
import { prefer } from '@/preferences.js';
import { popup } from '@/os.js';
export default {
mounted(el, binding, vn) {
export const rippleDirective = {
mounted(el, binding) {
// 明示的に false であればバインドしない
if (binding.value === false) return;
if (!prefer.s.animation) return;
@@ -24,4 +25,4 @@ export default {
});
});
},
};
} as Directive<HTMLElement, boolean | undefined>;