👽️ 适配月谕圣牌模式

This commit is contained in:
BTMuli
2025-10-01 10:37:46 +08:00
parent 145438373b
commit 3ece987c80
8 changed files with 57 additions and 25 deletions

View File

@@ -1,3 +1,4 @@
<!-- TODO: 链接处理重构 -->
<template>
<div class="tp-image-box" v-if="localUrl !== undefined">
<img :src="localUrl" @click="showOverlay = true" :alt="oriUrl" :title="getImageTitle()" />
@@ -118,9 +119,7 @@ function getImageTitle(): string {
}
function getImageExt(): string {
if (props.data.attributes) {
if (props.data.attributes.ext) return props.data.attributes.ext;
}
if (props.data.attributes && props.data.attributes.ext) return props.data.attributes.ext;
if (typeof props.data.insert.image === "string") {
const arr = props.data.insert.image.split(".");
return arr[arr.length - 1];