fix: tab changed (#518)
All checks were successful
Build and Deploy / build-and-deploy (push) Has been skipped
Build and Push Docker Images / build (push) Has been skipped

This commit is contained in:
Libin YANG 2025-01-15 16:00:53 +08:00 committed by GitHub
parent 6f0ae9dc1d
commit 068c50382a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1 additions and 4 deletions

View File

@ -98,6 +98,7 @@ function tabChanged(tabName: string | number) {
} }
tabHistory.value = [tabHistory.value[1], tabName as string] tabHistory.value = [tabHistory.value[1], tabName as string]
store.tabChanged(tabName as string)
} }
</script> </script>

View File

@ -57,7 +57,6 @@ async function prePost() {
form.value = { form.value = {
...auto, ...auto,
} }
console.log(form.value, `====`)
} }
} }

View File

@ -189,12 +189,9 @@ export const useStore = defineStore(`store`, () => {
renderer.reset({ citeStatus: isCiteStatus.value, legend: legend.value, isUseIndent: isUseIndent.value, countStatus: isCountStatus.value }) renderer.reset({ citeStatus: isCiteStatus.value, legend: legend.value, isUseIndent: isUseIndent.value, countStatus: isCountStatus.value })
const { markdownContent, readingTime: readingTimeResult } = renderer.parseFrontMatterAndContent(editor.value!.getValue()) const { markdownContent, readingTime: readingTimeResult } = renderer.parseFrontMatterAndContent(editor.value!.getValue())
console.log(`Reading time result:`, readingTimeResult)
readingTime.value = readingTimeResult readingTime.value = readingTimeResult
let outputTemp = marked.parse(markdownContent) as string let outputTemp = marked.parse(markdownContent) as string
console.log(readingTime.value)
// 阅读时间及字数统计 // 阅读时间及字数统计
outputTemp = renderer.buildReadingTime(readingTimeResult) + outputTemp outputTemp = renderer.buildReadingTime(readingTimeResult) + outputTemp