mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
🐛 修复 divider 生成分享时渲染错误的问题
This commit is contained in:
BIN
public/source/post/divider_line_1.webp
Normal file
BIN
public/source/post/divider_line_1.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 786 B |
BIN
public/source/post/divider_line_2.webp
Normal file
BIN
public/source/post/divider_line_2.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
public/source/post/divider_line_3.webp
Normal file
BIN
public/source/post/divider_line_3.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
BIN
public/source/post/divider_line_4.webp
Normal file
BIN
public/source/post/divider_line_4.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 114 B |
@@ -243,7 +243,7 @@ function LinkTextParser(data: TGApp.Plugins.Mys.Post.StructuredContent): HTMLSpa
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 解析分割线
|
* @description 解析分割线
|
||||||
* @since Alpha v0.1.1
|
* @since Beta v0.3.0
|
||||||
* @param {TGApp.Plugins.Mys.Post.StructuredContent} data Mys数据
|
* @param {TGApp.Plugins.Mys.Post.StructuredContent} data Mys数据
|
||||||
* @returns {HTMLDivElement} 解析后的分割线
|
* @returns {HTMLDivElement} 解析后的分割线
|
||||||
*/
|
*/
|
||||||
@@ -261,17 +261,13 @@ function parseDivider(data: TGApp.Plugins.Mys.Post.StructuredContent): HTMLDivEl
|
|||||||
// 创建 img
|
// 创建 img
|
||||||
const img = document.createElement("img");
|
const img = document.createElement("img");
|
||||||
if (data.insert.divider === "line_1") {
|
if (data.insert.divider === "line_1") {
|
||||||
img.src =
|
img.src = "/source/post/divider_line_1.webp";
|
||||||
"https://mihoyo-community-web.oss-cn-shanghai.aliyuncs.com/upload/2021/01/05/40eb5281cb24042bf34a9f1bcc61eaf5.png";
|
|
||||||
} else if (data.insert.divider === "line_2") {
|
} else if (data.insert.divider === "line_2") {
|
||||||
img.src =
|
img.src = "/source/post/divider_line_2.webp";
|
||||||
"https://mihoyo-community-web.oss-cn-shanghai.aliyuncs.com/upload/2021/01/05/477d4c535e965bec1791203aecdfa8e6.png";
|
|
||||||
} else if (data.insert.divider === "line_3") {
|
} else if (data.insert.divider === "line_3") {
|
||||||
img.src =
|
img.src = "/source/post/divider_line_3.webp";
|
||||||
"https://mihoyo-community-web.oss-cn-shanghai.aliyuncs.com/upload/2021/01/05/e7047588e912d60ff87a975e037c7606.png";
|
|
||||||
} else if (data.insert.divider === "line_4") {
|
} else if (data.insert.divider === "line_4") {
|
||||||
img.src =
|
img.src = "/source/post/divider_line_4.webp";
|
||||||
"https://mihoyo-community-web.oss-cn-shanghai.aliyuncs.com/upload/2022/07/13/line_4.png";
|
|
||||||
} else {
|
} else {
|
||||||
console.error("Unknown divider type", data);
|
console.error("Unknown divider type", data);
|
||||||
return parseUnknown(data);
|
return parseUnknown(data);
|
||||||
|
|||||||
Reference in New Issue
Block a user