From dc3f7f2d725ff73812de4e358e22463e06631da4 Mon Sep 17 00:00:00 2001 From: yy-wow Date: Fri, 27 Dec 2024 00:59:51 -0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BC=96=E8=BE=91=E5=99=A8=E4=B8=AD?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E8=AF=8D=E6=9D=A1=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E5=88=87=E6=8D=A2=E5=85=A8=E5=B1=8F=E6=97=B6?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/common/component/MonacoEditor.vue | 7 +++++-- packages/plugins/state/src/CreateVariable.vue | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/common/component/MonacoEditor.vue b/packages/common/component/MonacoEditor.vue index 8c6fc8582..07f22b1ad 100644 --- a/packages/common/component/MonacoEditor.vue +++ b/packages/common/component/MonacoEditor.vue @@ -28,6 +28,8 @@ :options="editorOptions" language="javascript" @editorDidMount="$emit('editorDidMount', $event)" + @change="$emit('change', $event)" + @shortcutSave="$emit('shortcutSave', $event)" > @@ -60,8 +62,8 @@ export default { default: true } }, - emits: ['editorDidMount'], - setup(props) { + emits: ['editorDidMount', 'change', 'shortcutSave', 'fullscreenChange'], + setup(props, { emit }) { const editor = ref(null) const fullscreen = ref(false) const editorOptions = computed(() => { @@ -112,6 +114,7 @@ export default { const switchFullScreen = (value) => { fullscreen.value = value + emit('fullscreenChange', value) } return { diff --git a/packages/plugins/state/src/CreateVariable.vue b/packages/plugins/state/src/CreateVariable.vue index be4bcaa05..85883be9a 100644 --- a/packages/plugins/state/src/CreateVariable.vue +++ b/packages/plugins/state/src/CreateVariable.vue @@ -28,6 +28,7 @@ :showFormatBtn="true" :options="state.editorOptions" @editorDidMount="editorDidMount" + @fullscreenChange="fullscreenChange" >