Skip to content

Commit

Permalink
Merge pull request #147 from Jackfinal/main
Browse files Browse the repository at this point in the history
代码编辑器光标回到原点
  • Loading branch information
kanyxmo authored Apr 7, 2024
2 parents 0dd8525 + 79f50e8 commit a19b1b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/ma-codeEditor/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ onMounted(() => {
instance = monaco.editor.create(dom.value, options)
initEditorValue()

instance.onDidChangeModelContent(() => {
instance.onDidBlurEditorText(() => {
emit('update:modelValue', toRaw(props.valueType === 'value' ? instance.getValue() : instance.getModel()))
})
})
Expand All @@ -114,4 +114,4 @@ defineExpose({ getInstance, initEditorValue })
border-radius: 3px;
background: var(--color-bg-2);
}
</style>
</style>

0 comments on commit a19b1b6

Please sign in to comment.