fix(接口测试): 文档结构增加移除功能
--bug=1008049 --user=赵勇 【接口测试】文档结构断言没有删除按钮 https://www.tapd.cn/55049933/s/1070011
This commit is contained in:
parent
be5f19854b
commit
3e33ef293d
|
@ -57,7 +57,10 @@
|
|||
:edit="true"/>
|
||||
</div>
|
||||
<div class="assertion-item-editing response-time" v-if="isDocument">
|
||||
<div> {{ assertions.document.type }}-{{ $t("api_test.definition.request.document_structure") }}</div>
|
||||
<div>
|
||||
{{ assertions.document.type }}-{{ $t("api_test.definition.request.document_structure") }}
|
||||
<el-button :disabled="isReadOnly" type="danger" size="mini" icon="el-icon-delete" circle @click="remove" style="float: right"/>
|
||||
</div>
|
||||
<ms-document-body :document="assertions.document" :apiId="apiId"/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -112,6 +115,9 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
remove() {
|
||||
this.assertions.document = {type: "JSON", data: {xmlFollowAPI: false, jsonFollowAPI: false, json: [], xml: []}};
|
||||
},
|
||||
reload() {
|
||||
this.loading = true
|
||||
this.$nextTick(() => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="ms-border">
|
||||
<div class="ms-border" style="margin-top: 10px">
|
||||
<div style="margin-bottom: 10px">
|
||||
<span class="ms-import" @click="importData">
|
||||
<i class="el-icon-edit-outline" style="font-size: 16px"/>
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
</el-select>
|
||||
</el-col>
|
||||
<el-col class="assertion-btn">
|
||||
<el-button :disabled="isReadOnly" type="danger" size="mini" icon="el-icon-delete" circle @click="remove" v-if="edit"/>
|
||||
<el-button :disabled="isReadOnly" type="primary" size="small" @click="add" v-else>
|
||||
<el-button :disabled="isReadOnly" type="primary" size="small" @click="add">
|
||||
{{ $t('api_test.request.assertions.add') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
|
Loading…
Reference in New Issue