Skip to content

Commit e8c5595

Browse files
perf: Optimization codemirror title
1 parent dc79a22 commit e8c5595

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@
1616
</el-button>
1717
</div>
1818
<!-- Codemirror 弹出层 -->
19-
<el-dialog
20-
v-model="dialogVisible"
21-
:title="$t('views.functionLib.functionForm.form.param.code')"
22-
append-to-body
23-
fullscreen
24-
>
19+
<el-dialog v-model="dialogVisible" :title="title" append-to-body fullscreen>
2520
<Codemirror
2621
v-model="cloneContent"
2722
:extensions="extensions"
@@ -54,6 +49,7 @@ import FunctionApi from '@/api/function-lib'
5449
defineOptions({ name: 'CodemirrorEditor' })
5550
5651
const props = defineProps<{
52+
title: String
5753
modelValue: any
5854
}>()
5955
const emit = defineEmits(['update:modelValue', 'submitDialog'])

ui/src/components/dynamics-form/items/JsonInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<!-- Codemirror 弹出层 -->
2323
<el-dialog
2424
v-model="dialogVisible"
25-
:title="$t('views.functionLib.functionForm.form.param.code')"
25+
:title="$t('dynamicsForm.default.label')"
2626
append-to-body
2727
fullscreen
2828
>

ui/src/views/function-lib/component/FunctionFormDrawer.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,11 @@
134134
</h4>
135135

136136
<div class="mb-8" v-if="showEditor">
137-
<CodemirrorEditor v-model="form.code" @submitDialog="submitCodemirrorEditor" />
137+
<CodemirrorEditor
138+
:title="$t('views.functionLib.functionForm.form.param.code')"
139+
v-model="form.code"
140+
@submitDialog="submitCodemirrorEditor"
141+
/>
138142
</div>
139143
<h4 class="title-decoration-1 mb-16 mt-16">
140144
{{ $t('common.param.outputParam') }}

ui/src/workflow/nodes/function-node/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
</h5>
8080
<div class="mb-8" v-if="showEditor">
8181
<CodemirrorEditor
82+
:title="$t('views.functionLib.functionForm.form.param.code')"
8283
v-model="chat_data.code"
8384
@wheel="wheel"
8485
style="height: 130px !important"

ui/src/workflow/nodes/variable-assign-node/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
]"
119119
>
120120
<CodemirrorEditor
121+
title="JSON"
121122
v-model="item.value"
122123
:style="{
123124
height: '100px'

0 commit comments

Comments
 (0)