mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-14 09:38:13 +08:00
🐛 修复部分格式的图片渲染失败问题
*PostID:47809689
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div class="tp-image-box">
|
||||
<img
|
||||
:style="getImageStyle()"
|
||||
:src="props.data.insert.image"
|
||||
:src="getImageUrl()"
|
||||
:alt="props.data.insert.image"
|
||||
:title="getImageTitle()"
|
||||
/>
|
||||
@@ -58,6 +58,12 @@ function getImageTitle(): string {
|
||||
}
|
||||
return res.join("\n");
|
||||
}
|
||||
|
||||
function getImageUrl(): string {
|
||||
const img = props.data.insert.image;
|
||||
const append = "?x-oss-process=image/format,webp";
|
||||
return img + append;
|
||||
}
|
||||
</script>
|
||||
<style lang="css" scoped>
|
||||
.tp-image-box {
|
||||
|
||||
Reference in New Issue
Block a user