chore: status to citeStatus

This commit is contained in:
dribble-njr 2024-11-20 16:14:53 +08:00
parent f63504a7cc
commit e946a55f0f
3 changed files with 3 additions and 3 deletions

View File

@ -143,7 +143,7 @@ export const useStore = defineStore(`store`, () => {
// 更新编辑器 // 更新编辑器
const editorRefresh = () => { const editorRefresh = () => {
codeThemeChange() codeThemeChange()
renderer.reset({ status: isCiteStatus.value, legend: legend.value, isUseIndent: isUseIndent.value }) renderer.reset({ citeStatus: isCiteStatus.value, legend: legend.value, isUseIndent: isUseIndent.value })
let outputTemp = marked.parse(editor.value!.getValue()) as string let outputTemp = marked.parse(editor.value!.getValue()) as string
// 去除第一行的 margin-top // 去除第一行的 margin-top

View File

@ -22,7 +22,7 @@ export interface IOpts {
size: string size: string
isUseIndent: boolean isUseIndent: boolean
legend?: string legend?: string
status?: boolean citeStatus?: boolean
} }
export type ThemeStyles = Record<Block | Inline, ExtendedProperties> export type ThemeStyles = Record<Block | Inline, ExtendedProperties>

View File

@ -220,7 +220,7 @@ export function initRenderer(opts: IOpts) {
if (href === text) { if (href === text) {
return parsedText return parsedText
} }
if (opts.status) { if (opts.citeStatus) {
const ref = addFootnote(title || text, href) const ref = addFootnote(title || text, href)
return `<span ${styles(`link`)}>${parsedText}<sup>[${ref}]</sup></span>` return `<span ${styles(`link`)}>${parsedText}<sup>[${ref}]</sup></span>`
} }