[Improvement][UI] Scrolling will be applied to parent model on editor scrolled to top/bottom (#11335)

This commit is contained in:
Chris Ho 2022-08-08 09:53:05 +08:00 committed by GitHub
parent 3aa9f2ea25
commit 991414edc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -97,7 +97,10 @@ export default defineComponent({
readOnly: formItem.mergedDisabledRef.value || props.options?.readOnly,
value: props.defaultValue ?? props.value,
automaticLayout: true,
theme: monacoEditorThemeRef.value
theme: monacoEditorThemeRef.value,
scrollbar: {
alwaysConsumeMouseWheel: false
}
})
editor.onDidChangeModelContent(() => {
const { onUpdateValue, 'onUpdate:value': _onUpdateValue } = props