diff --git a/src/components/post/tp-parser.vue b/src/components/post/tp-parser.vue
index f4e5c54a..4e87b7db 100644
--- a/src/components/post/tp-parser.vue
+++ b/src/components/post/tp-parser.vue
@@ -70,7 +70,7 @@ function getParsedData(data: TGApp.Plugins.Mys.SctPost.Base[]): TGApp.Plugins.My
child = [];
}
}
- if (check !== parsedText.length && check !== 0) {
+ if (check < parsedText.length && check !== 0) {
res.push(...child);
child = [];
}
diff --git a/src/components/postReply/tpr-reply.vue b/src/components/postReply/tpr-reply.vue
index 18d5b261..3a56b4ea 100644
--- a/src/components/postReply/tpr-reply.vue
+++ b/src/components/postReply/tpr-reply.vue
@@ -30,7 +30,7 @@
- {{ getTime() }}
+ {{ getTime() }}
{{ props.modelValue.user.ip_region }}
@@ -128,7 +128,6 @@ watch(
async (value) => {
if (value) {
await event.emit("openReplySub", props.modelValue.reply.reply_id);
- console.error("emit openReplySub");
}
},
);
@@ -136,13 +135,16 @@ watch(
async function listenSub(): Promise {
return await event.listen("openReplySub", async (e: Event) => {
if (e.payload !== props.modelValue.reply.reply_id) {
- if (showSub.value) {
- showSub.value = false;
- }
+ if (showSub.value) showSub.value = false;
}
});
}
+function getFullTime(): string {
+ const time = new Date(props.modelValue.reply.created_at * 1000);
+ return time.toLocaleString().replace(/\//g, "-");
+}
+
function getTime(): string {
const time = new Date(props.modelValue.reply.created_at * 1000);
const now = new Date();
@@ -152,10 +154,10 @@ function getTime(): string {
}
// 如果是今年,显示 MM-dd
if (time.getFullYear() === now.getFullYear()) {
- return time.toLocaleDateString().slice(5);
+ return time.toLocaleDateString().slice(5).replace(/\//g, "-");
}
// 否则显示 yyyy-MM-dd
- return time.toLocaleDateString();
+ return time.toLocaleDateString().replace(/\//g, "-");
}
async function showReply(): Promise {