mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-25 20:13:57 +02:00
refactor(frontend): カスタムディレクティブの型付け (#16659)
* refactor(frontend): カスタムディレクティブの型付け * fix
This commit is contained in:
@@ -9,8 +9,8 @@ import { globalEvents } from '@/events.js';
|
||||
|
||||
const handlerMap = new WeakMap<any, any>();
|
||||
|
||||
export default {
|
||||
mounted(src, binding, vn) {
|
||||
export const adaptiveBorderDirective = {
|
||||
mounted(src) {
|
||||
function calc() {
|
||||
const parentBg = getBgColor(src.parentElement) ?? 'transparent';
|
||||
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
globalEvents.on('themeChanged', calc);
|
||||
},
|
||||
|
||||
unmounted(src, binding, vn) {
|
||||
unmounted(src) {
|
||||
globalEvents.off('themeChanged', handlerMap.get(src));
|
||||
},
|
||||
} as Directive;
|
||||
} as Directive<HTMLElement>;
|
||||
|
||||
Reference in New Issue
Block a user