fix: 1050995

--bug=1050995 --user=王孝刚 【函数库】-创建函数,Python 代码为空时提示语和界面显示标题的不符 https://www.tapd.cn/57709429/s/1647978
This commit is contained in:
wxg0103 2025-01-20 16:27:48 +08:00 committed by wxg
parent 86330c443e
commit 7ea082427b
6 changed files with 28 additions and 14 deletions

View File

@ -20,14 +20,23 @@
</el-button> </el-button>
</div> </div>
<!-- Codemirror 弹出层 --> <!-- Codemirror 弹出层 -->
<el-dialog v-model="dialogVisible" :title="'Python ' + $t('views.functionLib.functionForm.form.param.code')" append-to-body fullscreen> <el-dialog
v-model="dialogVisible"
:title="$t('views.functionLib.functionForm.form.param.code')"
append-to-body
fullscreen
>
<Codemirror <Codemirror
v-model="cloneContent" v-model="cloneContent"
:extensions="extensions" :extensions="extensions"
:style="codemirrorStyle" :style="codemirrorStyle"
:tab-size="4" :tab-size="4"
:autofocus="true" :autofocus="true"
style="height: calc(100vh - 160px) !important; border: 1px solid #bbbfc4; border-radius: 4px" style="
height: calc(100vh - 160px) !important;
border: 1px solid #bbbfc4;
border-radius: 4px;
"
/> />
<template #footer> <template #footer>
<div class="dialog-footer mt-24"> <div class="dialog-footer mt-24">

View File

@ -66,7 +66,7 @@ export default {
outputParam: 'Output Parameters', outputParam: 'Output Parameters',
paramInfo1: 'Displayed when using the function', paramInfo1: 'Displayed when using the function',
paramInfo2: 'Not displayed when using the function', paramInfo2: 'Not displayed when using the function',
code: 'Code', code: 'Function Content (Python)'
}, },
debug: { debug: {
run: 'Run', run: 'Run',

View File

@ -10,7 +10,7 @@ export default {
disabled: '禁用' disabled: '禁用'
}, },
tip: { tip: {
saveMessage:'当前的更改尚未保存,确认退出吗?' saveMessage: '当前的更改尚未保存,确认退出吗?'
}, },
delete: { delete: {
confirmTitle: '是否删除函数:', confirmTitle: '是否删除函数:',
@ -50,28 +50,28 @@ export default {
requiredMessage: '请输入参数名' requiredMessage: '请输入参数名'
}, },
dataType: { dataType: {
label: '数据类型', label: '数据类型'
}, },
source: { source: {
label: '来源', label: '来源',
custom: '自定义', custom: '自定义',
reference: '引用参数', reference: '引用参数'
}, },
required: { required: {
label: '是否必填', label: '是否必填'
}, },
param: { param: {
outputParam: '输出参数', outputParam: '输出参数',
paramInfo1: '使用函数时显示', paramInfo1: '使用函数时显示',
paramInfo2: '使用函数时不显示', paramInfo2: '使用函数时不显示',
code: '代码', code: '函数内容Python'
}, },
debug: { debug: {
run: '运行', run: '运行',
output: '输出', output: '输出',
runResult: '运行结果', runResult: '运行结果',
runSuccess: '运行成功', runSuccess: '运行成功',
runFailed: '运行失败', runFailed: '运行失败'
} }
} }
} }

View File

@ -64,7 +64,7 @@ export default {
outputParam: '輸出參數', outputParam: '輸出參數',
paramInfo1: '使用函數時顯示', paramInfo1: '使用函數時顯示',
paramInfo2: '使用函數時不顯示', paramInfo2: '使用函數時不顯示',
code: '代碼', code: '函数内容Python'
}, },
debug: { debug: {
run: '運行', run: '運行',

View File

@ -126,7 +126,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<h4 class="title-decoration-1 mb-16"> <h4 class="title-decoration-1 mb-16">
Python {{ $t('views.functionLib.functionForm.form.param.code') }} {{ $t('views.functionLib.functionForm.form.param.code') }}
<el-text type="info" class="color-secondary"> <el-text type="info" class="color-secondary">
{{ $t('views.functionLib.functionForm.form.param.paramInfo2') }} {{ $t('views.functionLib.functionForm.form.param.paramInfo2') }}
</el-text> </el-text>
@ -164,7 +164,7 @@
<!-- Codemirror 弹出层 --> <!-- Codemirror 弹出层 -->
<el-dialog <el-dialog
v-model="dialogVisible" v-model="dialogVisible"
:title="'Python ' + $t('views.functionLib.functionForm.form.param.code')" :title="$t('views.functionLib.functionForm.form.param.code')"
append-to-body append-to-body
fullscreen fullscreen
> >

View File

@ -72,7 +72,7 @@
</el-card> </el-card>
<h5 class="lighter mb-8"> <h5 class="lighter mb-8">
Python {{ $t('views.functionLib.functionForm.form.param.code') }} {{ $t('views.functionLib.functionForm.form.param.code') }}
</h5> </h5>
<div class="function-CodemirrorEditor mb-8" v-if="showEditor"> <div class="function-CodemirrorEditor mb-8" v-if="showEditor">
<CodemirrorEditor <CodemirrorEditor
@ -112,7 +112,12 @@
</el-form> </el-form>
<FieldFormDialog ref="FieldFormDialogRef" @refresh="refreshFieldList" /> <FieldFormDialog ref="FieldFormDialogRef" @refresh="refreshFieldList" />
<!-- Codemirror 弹出层 --> <!-- Codemirror 弹出层 -->
<el-dialog v-model="dialogVisible" :title="'Python ' + $t('views.functionLib.functionForm.form.param.code')" append-to-body fullscreen> <el-dialog
v-model="dialogVisible"
:title="$t('views.functionLib.functionForm.form.param.code')"
append-to-body
fullscreen
>
<CodemirrorEditor <CodemirrorEditor
v-model="cloneContent" v-model="cloneContent"
style=" style="