diff --git a/frontend/src/views/api-test/components/condition/content.vue b/frontend/src/views/api-test/components/condition/content.vue
index 3730841ec9..389887ef7f 100644
--- a/frontend/src/views/api-test/components/condition/content.vue
+++ b/frontend/src/views/api-test/components/condition/content.vue
@@ -125,6 +125,18 @@
+
+
+
+
+ {{ t('project.commonScript.formatting') }}
+
@@ -462,6 +474,7 @@
requestRadioTextProps?: Record; // 前后置请求前后置按钮文本
showPrePostRequest?: boolean; // 是否展示前后置请求忽略
totalList?: ExecuteConditionProcessor[]; // 总列表
+ isFormat?: boolean;
}>(),
{
showAssociatedScene: false,
@@ -541,6 +554,9 @@ if (!result){
function clearScript() {
condition.value.script = '';
}
+ function formatCoding() {
+ scriptDefinedRef.value?.formatCoding();
+ }
/**
* 复制条件
diff --git a/frontend/src/views/api-test/scenario/components/common/scriptOperationDrawer.vue b/frontend/src/views/api-test/scenario/components/common/scriptOperationDrawer.vue
index e44fbbd447..11864026c4 100644
--- a/frontend/src/views/api-test/scenario/components/common/scriptOperationDrawer.vue
+++ b/frontend/src/views/api-test/scenario/components/common/scriptOperationDrawer.vue
@@ -5,19 +5,89 @@
:width="960"
no-content-padding
disabled-width-drag
+ @cancel="handleDrawerCancel"
>
- waiting scriptOperation
+
+ {{ t('apiScenario.scriptOperationName') }}
+
+
+
+
+
+
+
+ {{ t('common.cancel') }}
+
+
+ {{ t('common.saveAndContinue') }}
+
+
+ {{ t('common.add') }}
+
+
diff --git a/frontend/src/views/api-test/scenario/locale/en-US.ts b/frontend/src/views/api-test/scenario/locale/en-US.ts
index 20a84092f7..60a65385af 100644
--- a/frontend/src/views/api-test/scenario/locale/en-US.ts
+++ b/frontend/src/views/api-test/scenario/locale/en-US.ts
@@ -78,4 +78,7 @@ export default {
'api_scenario.recycle.list': 'Recycle list',
'api_scenario.recycle.batchCleanOut': 'Delete',
'api_scenario.table.searchPlaceholder': 'Search by ID/Name/Tag',
+
+ 'apiScenario.scriptOperationName': 'Script operation name',
+ 'apiScenario.scriptOperationNamePlaceholder': 'Please enter the script operation name',
};
diff --git a/frontend/src/views/api-test/scenario/locale/zh-CN.ts b/frontend/src/views/api-test/scenario/locale/zh-CN.ts
index 06ac40c6c4..25b7b3ee31 100644
--- a/frontend/src/views/api-test/scenario/locale/zh-CN.ts
+++ b/frontend/src/views/api-test/scenario/locale/zh-CN.ts
@@ -139,4 +139,7 @@ export default {
'apiScenario.quoteTableSearchTip': '通过路径或名称搜索',
'apiScenario.collapseAll': '收起全部子模块',
'apiScenario.expandAll': '展开全部子模块',
+
+ 'apiScenario.scriptOperationName': '脚本操作名称',
+ 'apiScenario.scriptOperationNamePlaceholder': '请输入脚本操作名称',
};