2025-05-30 18:05:17 +08:00
|
|
|
<template>
|
2025-06-27 09:53:36 +08:00
|
|
|
<div class="message-image">
|
|
|
|
<img mode="aspectFit" class="message-image" :src="url" />
|
2025-05-30 18:05:17 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
import { ref, onMounted } from '../../../../adapter-vue';
|
|
|
|
import { CUSTOM_BIG_EMOJI_URL } from '../../emoji-config';
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
content: {
|
|
|
|
type: Object,
|
2025-06-27 09:53:36 +08:00
|
|
|
default: () => ({})
|
|
|
|
}
|
2025-05-30 18:05:17 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
const url = ref(props.content.url);
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
if (props.content.type === 'custom') {
|
|
|
|
if (!CUSTOM_BIG_EMOJI_URL) {
|
|
|
|
console.warn('CUSTOM_BIG_EMOJI_URL is required for custom emoji, please check your CUSTOM_BIG_EMOJI_URL.');
|
|
|
|
} else {
|
|
|
|
url.value = CUSTOM_BIG_EMOJI_URL + props.content.name;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2025-06-27 09:53:36 +08:00
|
|
|
@import '../../../../assets/styles/common';
|
2025-05-30 18:05:17 +08:00
|
|
|
|
|
|
|
.message-image {
|
|
|
|
width: 80px;
|
|
|
|
height: 80px;
|
|
|
|
}
|
|
|
|
</style>
|