mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
🐛 修复动图渲染异常
This commit is contained in:
@@ -62,6 +62,7 @@ function getImageTitle(): string {
|
||||
function getImageUrl(): string {
|
||||
const img = props.data.insert.image;
|
||||
const append = "?x-oss-process=image/format,png";
|
||||
if (img.endsWith(".gif")) return img;
|
||||
return img + append;
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file plugins/Mys/utils/news.ts
|
||||
* @description Mys 插件咨讯工具
|
||||
* @since Beta v0.4.0
|
||||
* @since Beta v0.4.4
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -53,7 +53,7 @@ export function getActivityStatus(status: number): TGApp.Plugins.Mys.News.Render
|
||||
|
||||
/**
|
||||
* @description 获取封面图
|
||||
* @since Beta v0.4.0
|
||||
* @since Beta v0.4.4
|
||||
* @param {TGApp.Plugins.Mys.News.Item} item 咨讯列表项
|
||||
* @returns {string} 封面图链接
|
||||
*/
|
||||
@@ -68,12 +68,9 @@ export function getPostCover(item: TGApp.Plugins.Mys.News.Item): string {
|
||||
} else if (item.post.images.length > 0) {
|
||||
cover = item.post.images[0];
|
||||
}
|
||||
if (cover === undefined) {
|
||||
cover = defaultCover;
|
||||
} else {
|
||||
cover = `${cover}?x-oss-process=image/format,png`;
|
||||
}
|
||||
return cover;
|
||||
if (cover === undefined) return defaultCover;
|
||||
if (cover.endsWith(".gif")) return cover;
|
||||
return `${cover}?x-oss-process=image/format,png`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user