diff --git a/api-test/frontend/src/business/automation/scenario/variable/VariableList.vue b/api-test/frontend/src/business/automation/scenario/variable/VariableList.vue index 686f340435..d18e665ec2 100644 --- a/api-test/frontend/src/business/automation/scenario/variable/VariableList.vue +++ b/api-test/frontend/src/business/automation/scenario/variable/VariableList.vue @@ -331,7 +331,7 @@ export default { }, _handleBatchVars(data) { if (data) { - let params = data.split('\n'); + let params = data.split(/[(\r\n)\r\n]+/); let keyValues = []; params.forEach((item) => { if (item) { diff --git a/api-test/frontend/src/business/definition/components/body/ApiBody.vue b/api-test/frontend/src/business/definition/components/body/ApiBody.vue index 41d19b1d84..65d041e16c 100644 --- a/api-test/frontend/src/business/definition/components/body/ApiBody.vue +++ b/api-test/frontend/src/business/definition/components/body/ApiBody.vue @@ -350,7 +350,7 @@ export default { }, batchSave(data) { if (data) { - let params = data.split('\n'); + let params = data.split(/[(\r\n)\r\n]+/); let keyValues = []; params.forEach((item) => { if (item) { diff --git a/api-test/frontend/src/business/definition/components/request/http/ApiHttpRequestForm.vue b/api-test/frontend/src/business/definition/components/request/http/ApiHttpRequestForm.vue index 991aa5cf09..ac17b9f842 100644 --- a/api-test/frontend/src/business/definition/components/request/http/ApiHttpRequestForm.vue +++ b/api-test/frontend/src/business/definition/components/request/http/ApiHttpRequestForm.vue @@ -507,7 +507,7 @@ export default { }, batchSave(data) { if (data) { - let params = data.split('\n'); + let params = data.split(/[(\r\n)\r\n]+/); let keyValues = []; params.forEach((item) => { if (item) { diff --git a/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue b/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue index 9eacb1cc20..e9ccc64dd5 100644 --- a/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue +++ b/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue @@ -469,7 +469,7 @@ export default { this.$refs.batchAdd.open(); }, _handleBatchVars(data) { - let params = data.split("\n"); + let params = data.split(/[(\r\n)\r\n]+/); let keyValues = []; params.forEach(item => { if (item) { diff --git a/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue b/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue index 89be3701ca..be149c4644 100644 --- a/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue +++ b/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue @@ -431,7 +431,7 @@ export default { return this.items.length - 1 !== index; }, _handleBatchVars(data) { - let params = data.split('\n'); + let params = data.split(/[(\r\n)\r\n]+/); let keyValues = []; params.forEach((item) => { if (item) { diff --git a/project-management/frontend/src/business/menu/environment/components/EnvironmentHttpConfig.vue b/project-management/frontend/src/business/menu/environment/components/EnvironmentHttpConfig.vue index e9acda6b19..5ed0f26c86 100644 --- a/project-management/frontend/src/business/menu/environment/components/EnvironmentHttpConfig.vue +++ b/project-management/frontend/src/business/menu/environment/components/EnvironmentHttpConfig.vue @@ -477,7 +477,7 @@ export default { this.$refs.batchAdd.open(); }, _handleBatchVars(data) { - let params = data.split("\n"); + let params = data.split(/[(\r\n)\r\n]+/); let keyValues = []; params.forEach(item => { if (item) {