Skip to content

Commit 56a08f1

Browse files
committed
fix: Editor using input method causes editor confusion (#4533)
1 parent 3179b3b commit 56a08f1

File tree

1 file changed

+25
-22
lines changed

1 file changed

+25
-22
lines changed

ui/src/components/codemirror-editor/index.vue

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,37 @@
11
<template>
22
<div class="codemirror-editor w-full">
3-
<Codemirror
4-
v-model="data"
5-
ref="cmRef"
6-
:extensions="extensions"
7-
:style="codemirrorStyle"
8-
:tab-size="4"
9-
:autofocus="true"
10-
v-bind="$attrs"
11-
/>
12-
3+
<form @submit.prevent>
4+
<Codemirror
5+
v-model="data"
6+
ref="cmRef"
7+
:extensions="extensions"
8+
:style="codemirrorStyle"
9+
:tab-size="4"
10+
:autofocus="true"
11+
v-bind="$attrs"
12+
/>
13+
</form>
1314
<div class="codemirror-editor__footer">
1415
<el-button text type="info" @click="openCodemirrorDialog" class="magnify">
1516
<AppIcon iconName="app-magnify" style="font-size: 16px"></AppIcon>
1617
</el-button>
1718
</div>
1819
<!-- Codemirror 弹出层 -->
1920
<el-dialog v-model="dialogVisible" :title="title" append-to-body fullscreen>
20-
<Codemirror
21-
v-model="cloneContent"
22-
:extensions="extensions"
23-
:style="codemirrorStyle"
24-
:tab-size="4"
25-
:autofocus="true"
26-
style="
27-
height: calc(100vh - 160px) !important;
28-
border: 1px solid #bbbfc4;
29-
border-radius: 4px;
30-
"
31-
/>
21+
<form @submit.prevent>
22+
<Codemirror
23+
v-model="cloneContent"
24+
:extensions="extensions"
25+
:style="codemirrorStyle"
26+
:tab-size="4"
27+
:autofocus="true"
28+
style="
29+
height: calc(100vh - 160px) !important;
30+
border: 1px solid #bbbfc4;
31+
border-radius: 4px;
32+
"
33+
/>
34+
</form>
3235
<template #footer>
3336
<div class="dialog-footer mt-24">
3437
<el-button type="primary" @click="submitDialog"> {{ $t('common.confirm') }}</el-button>

0 commit comments

Comments
 (0)