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

@@ -6,8 +6,8 @@
import type { Directive } from 'vue';
import { getBgColor } from '@/utility/get-bg-color.js';
export default {
mounted(src, binding, vn) {
export const panelDirective = {
mounted(src) {
const parentBg = getBgColor(src.parentElement) ?? 'transparent';
const myBg = getComputedStyle(window.document.documentElement).getPropertyValue('--MI_THEME-panel');
@@ -18,4 +18,4 @@ export default {
src.style.backgroundColor = 'var(--MI_THEME-panel)';
}
},
} as Directive;
} as Directive<HTMLElement>;