fix type errors in MkEmoji

This commit is contained in:
Lhcfl 2024-04-04 15:51:43 +08:00
parent 75cf048876
commit 9bfa8dc417

View file

@ -4,16 +4,16 @@
class="mk-emoji custom"
:class="{ normal, noStyle }"
:src="url"
:alt="alt"
:title="alt"
:alt="alt || undefined"
:title="alt || undefined"
decoding="async"
/>
<img
v-else-if="char && !useOsNativeEmojis"
class="mk-emoji"
:src="url"
:alt="alt"
:title="alt"
:alt="alt || undefined"
:title="alt || undefined"
decoding="async"
/>
<span v-else-if="char && useOsNativeEmojis">{{ char }}</span>
@ -50,6 +50,7 @@ const customEmoji = computed(() =>
: null,
);
const url = computed(() => {
if (!customEmoji.value) return undefined;
if (char.value) {
return char2filePath(char.value);
} else {