forked from mirrors/misskey
chore(frontend): fix type errors
This commit is contained in:
@@ -56,10 +56,12 @@ const emit = defineEmits<{
|
||||
}>();
|
||||
|
||||
function getScreenY(event: TouchEvent | MouseEvent | PointerEvent): number {
|
||||
if (event.touches && event.touches[0] && event.touches[0].screenY != null) {
|
||||
if (('touches' in event) && event.touches[0] && event.touches[0].screenY != null) {
|
||||
return event.touches[0].screenY;
|
||||
} else {
|
||||
} else if ('screenY' in event) {
|
||||
return event.screenY;
|
||||
} else {
|
||||
return 0; // TSを黙らせるため
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ const elRef = useTemplateRef('elRef');
|
||||
|
||||
if (props.withTooltip) {
|
||||
useTooltip(elRef, (showing) => {
|
||||
if (elRef.value == null) return;
|
||||
const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkReactionTooltip.vue')), {
|
||||
showing,
|
||||
reaction: props.reaction.replace(/^:(\w+):$/, ':$1@.:'),
|
||||
|
||||
Reference in New Issue
Block a user