Skip to content

Commit 751fbc3

Browse files
committed
fix: 小册自定义链接问题
1 parent 285c62d commit 751fbc3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/post/collection.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,9 @@ export default {
350350
if (collection) {
351351
for (let i in collection.posts) {
352352
let item = collection.posts[i];
353+
if (item.type === "custom") {
354+
collection.posts[i].custom_title = item.custom_title || item.title || "";
355+
}
353356
collection.posts[i].posts =
354357
item.type === "custom"
355358
? null
@@ -384,6 +387,7 @@ export default {
384387
break;
385388
}
386389
if (item.type === "custom") {
390+
item.title = item.custom_title ? item.custom_title.trim() : "";
387391
if (!item.url) {
388392
message = "请填写正确的小册文章链接(http或https开头)";
389393
break;

0 commit comments

Comments
 (0)