Unify coding style

This commit is contained in:
raojinlin 2024-02-23 10:36:53 +08:00
parent 565f04d49d
commit ced23f350a
1 changed files with 2 additions and 2 deletions

View File

@ -96,13 +96,13 @@ onMounted(async () => {
// add shortcut for save // add shortcut for save
editorNode.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyS, (event) => { editorNode.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyS, (event) => {
emit('save') emit('save')
}); })
if (props.rememberScroll) { if (props.rememberScroll) {
editorNode.onDidScrollChange((event) => { editorNode.onDidScrollChange((event) => {
// Update scrolltop when scroll height changes, ie. content changes // Update scrolltop when scroll height changes, ie. content changes
if (!event.scrollHeightChanged) { if (!event.scrollHeightChanged) {
scrollTop.value = event.scrollTop; scrollTop.value = event.scrollTop
} }
}) })
} }