diff --git a/frontend/src/business/components/api/definition/ApiDefinition.vue b/frontend/src/business/components/api/definition/ApiDefinition.vue
index 659458f6cb..3abdc02222 100644
--- a/frontend/src/business/components/api/definition/ApiDefinition.vue
+++ b/frontend/src/business/components/api/definition/ApiDefinition.vue
@@ -302,6 +302,9 @@
api.moduleId = this.nodeTree[0].id;
api.modulePath = this.nodeTree[0].path;
}
+ if (this.selectNodeIds && this.selectNodeIds.length > 0) {
+ api.moduleId = this.selectNodeIds[0];
+ }
this.handleTabsEdit(this.$t('api_test.definition.request.title'), e, api);
},
handleTabClose() {
diff --git a/frontend/src/business/components/api/definition/components/assertion/ApiJsonPathSuggestButton.vue b/frontend/src/business/components/api/definition/components/assertion/ApiJsonPathSuggestButton.vue
index f708459ab3..5bb93b7bef 100644
--- a/frontend/src/business/components/api/definition/components/assertion/ApiJsonPathSuggestButton.vue
+++ b/frontend/src/business/components/api/definition/components/assertion/ApiJsonPathSuggestButton.vue
@@ -1,6 +1,6 @@
-
+
{{openTip}}
diff --git a/frontend/src/business/components/api/definition/components/assertion/ApiJsonpathSuggest.vue b/frontend/src/business/components/api/definition/components/assertion/ApiJsonpathSuggest.vue
index 05064cf710..4325ad5cc4 100644
--- a/frontend/src/business/components/api/definition/components/assertion/ApiJsonpathSuggest.vue
+++ b/frontend/src/business/components/api/definition/components/assertion/ApiJsonpathSuggest.vue
@@ -1,5 +1,5 @@
-
+
{{tip}}
@@ -13,9 +13,37 @@ import MsDrawer from "../../../../common/components/MsDrawer";
import MsInstructionsIcon from "../../../../common/components/MsInstructionsIcon";
let dotReplace = "#DOT_MASK#";
+
+const clickoutside = {
+ // 初始化指令
+ bind (el, binding, vnode) {
+ function documentHandler (e) {
+ // 这里判断点击的元素是否是本身,是本身,则返回
+ if (el.contains(e.target)) {
+ return false
+ }
+ // 判断指令中是否绑定了函数
+ if (binding.expression) {
+ // 如果绑定了函数 则调用那个函数,此处binding.value就是handleClose方法
+ binding.value(e)
+ }
+ }
+ // 给当前元素绑定个私有变量,方便在unbind中可以解除事件监听
+ el.__vueClickOutside__ = documentHandler
+ document.addEventListener('click', documentHandler)
+ },
+ update () { },
+ unbind (el, binding) {
+ // 解除事件监听
+ document.removeEventListener('click', el.__vueClickOutside__)
+ delete el.__vueClickOutside__
+ }
+}
+
export default {
name: "MsApiJsonpathSuggest",
components: {MsInstructionsIcon, MsDrawer},
+ directives: { clickoutside },
data() {
return {
visible: false,
@@ -135,4 +163,9 @@ export default {
margin-left: 6px;
}
+ /deep/ .el-icon-close:hover {
+ font-size: 30px;
+ font-weight: bold;
+ }
+
diff --git a/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue b/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue
index 1aa89b01ab..227102ac01 100644
--- a/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue
+++ b/frontend/src/business/components/api/definition/components/case/ApiCaseItem.vue
@@ -95,7 +95,7 @@
{{$t('api_test.definition.request.res_param')}}
-
+
diff --git a/frontend/src/business/components/api/definition/components/complete/EditCompleteTCPApi.vue b/frontend/src/business/components/api/definition/components/complete/EditCompleteTCPApi.vue
index 4d2b2d4e11..be074a4225 100644
--- a/frontend/src/business/components/api/definition/components/complete/EditCompleteTCPApi.vue
+++ b/frontend/src/business/components/api/definition/components/complete/EditCompleteTCPApi.vue
@@ -28,7 +28,7 @@
{{ $t('api_test.definition.request.req_param') }}
{{$t('api_test.definition.request.res_param')}}
-
+
diff --git a/frontend/src/business/components/api/definition/components/document/ApiDocumentAnchor.vue b/frontend/src/business/components/api/definition/components/document/ApiDocumentAnchor.vue
index 194a337c8a..73e447b198 100644
--- a/frontend/src/business/components/api/definition/components/document/ApiDocumentAnchor.vue
+++ b/frontend/src/business/components/api/definition/components/document/ApiDocumentAnchor.vue
@@ -428,11 +428,12 @@ export default {
var returnData = data;
if (data) {
- if(dataType === 'XML'){
- returnData = ""+returnData+"";
- }else{
- returnData = data.replace(/\n/g, '
');
- }
+ // if(dataType === 'XML'){
+ // returnData = ""+returnData+"";
+ // }else {
+ //
+ // }
+ returnData = ""+returnData+"";
}
return returnData;
},
diff --git a/frontend/src/business/components/api/definition/components/import/ApiImport.vue b/frontend/src/business/components/api/definition/components/import/ApiImport.vue
index 1e1f56ff7a..21f94da6a7 100644
--- a/frontend/src/business/components/api/definition/components/import/ApiImport.vue
+++ b/frontend/src/business/components/api/definition/components/import/ApiImport.vue
@@ -97,7 +97,7 @@