lint fixes

This commit is contained in:
syuilo
2025-03-20 19:00:09 +09:00
parent c02f0b3b33
commit 6015254e59
71 changed files with 160 additions and 160 deletions

View File

@@ -13,7 +13,7 @@ export default {
el._keyHandler = makeHotkey(binding.value);
if (el._hotkey_global) {
document.addEventListener('keydown', el._keyHandler, { passive: false });
window.document.addEventListener('keydown', el._keyHandler, { passive: false });
} else {
el.addEventListener('keydown', el._keyHandler, { passive: false });
}
@@ -21,7 +21,7 @@ export default {
unmounted(el) {
if (el._hotkey_global) {
document.removeEventListener('keydown', el._keyHandler);
window.document.removeEventListener('keydown', el._keyHandler);
} else {
el.removeEventListener('keydown', el._keyHandler);
}

View File

@@ -10,7 +10,7 @@ export default {
mounted(src, binding, vn) {
const parentBg = getBgColor(src.parentElement) ?? 'transparent';
const myBg = getComputedStyle(document.documentElement).getPropertyValue('--MI_THEME-panel');
const myBg = getComputedStyle(window.document.documentElement).getPropertyValue('--MI_THEME-panel');
if (parentBg === myBg) {
src.style.backgroundColor = 'var(--MI_THEME-bg)';

View File

@@ -47,7 +47,7 @@ export default {
}
self.show = () => {
if (!document.body.contains(el)) return;
if (!window.document.body.contains(el)) return;
if (self._close) return;
if (self.text == null) return;

View File

@@ -31,7 +31,7 @@ export class UserPreview {
}
private show() {
if (!document.body.contains(this.el)) return;
if (!window.document.body.contains(this.el)) return;
if (this.promise) return;
const showing = ref(true);
@@ -58,7 +58,7 @@ export class UserPreview {
};
this.checkTimer = window.setInterval(() => {
if (!document.body.contains(this.el)) {
if (!window.document.body.contains(this.el)) {
window.clearTimeout(this.showTimer);
window.clearTimeout(this.hideTimer);
this.close();