feat: 首页评论修复html样式

This commit is contained in:
caiyuchao committed 2025-09-11 17:11:40 +08:00
1 parent 85b3b2d471
commit 8c5c7dde57
2 files changed
+11 -5

No files matched your search

+7 -4
View File
@@ -93,11 +93,14 @@ onMounted(async () => {
if (dataContent) {
const position = dataContent.indexOf('>') + 1;
const originalString = dataContent;
const stringToInsert = `<span style="font-size: 12px; color: #32363973">${item.author}:</span>`;
const stringToInsert = `<span style="font-size: 14px; color: #32363973">${item.author}:</span>`;
dataContent =
originalString.slice(0, position) +
stringToInsert +
originalString.slice(position);
originalString.startsWith('<p>') || originalString.startsWith('<h')
? originalString.slice(0, position) +
stringToInsert +
originalString.slice(position)
: stringToInsert + originalString;
}
return {