Merge remote-tracking branch 'origin/main'

This commit is contained in:
Lykin 2024-01-23 11:47:45 +08:00
commit 76783c36fb
1 changed files with 44 additions and 0 deletions

View File

@ -150,6 +150,50 @@ watch(
}, },
) )
watch(
() => pref.editorFont.fontSize,
(fontSize) => {
if (editorNode != null) {
editorNode.updateOptions({
fontSize,
})
}
},
)
watch(
() => pref.editorFont.fontFamily,
(fontFamily = undefined) => {
if (editorNode != null) {
editorNode.updateOptions({
fontFamily,
})
}
},
)
watch(
() => pref.showLineNum,
(showLineNum) => {
if (editorNode != null) {
editorNode.updateOptions({
lineNumbers: showLineNum ? 'on' : 'off',
})
}
},
)
watch(
() => pref.showFolding,
(showFolding) => {
if (editorNode != null) {
editorNode.updateOptions({
folding: showFolding !== false,
})
}
},
)
onUnmounted(() => { onUnmounted(() => {
destroyEditor() destroyEditor()
}) })