refactor (接口自动化): 去除报告保存按钮,失去焦点自动保存

This commit is contained in:
fit2-zhao 2021-08-03 18:31:55 +08:00 committed by fit2-zhao
parent 3e14b9168f
commit 0659334ca2
1 changed files with 2 additions and 5 deletions

View File

@ -4,7 +4,7 @@
<el-col>
<!-- <span v-if="!debug"><el-input size="mini" style="width: 200px" v-model="report.name"/> </span>-->
<span v-if="!debug">
<el-input v-if="nameIsEdit" size="mini" @blur="nameIsEdit = false" style="width: 200px" v-model="report.name"/>
<el-input v-if="nameIsEdit" size="mini" @blur="handleSave(report.name)" style="width: 200px" v-model="report.name"/>
<span v-else>
<router-link v-if="isSingleScenario" :to="{name: 'ApiAutomation', params: { dataSelectRange: 'edit:' + scenarioId }}">
{{ report.name }}
@ -21,10 +21,6 @@
{{ $t('test_track.plan_view.export_report') }}
</el-button>
<el-button v-if="!debug" :disabled="isReadOnly" class="export-button" plain type="primary" size="mini" @click="handleSave(report.name)" style="margin-right: 10px">
{{ $t('commons.save') }}
</el-button>
</el-col>
</el-row>
</header>
@ -76,6 +72,7 @@ export default {
this.$emit('reportExport', name);
},
handleSave(name) {
this.nameIsEdit = false;
this.$emit('reportSave', name);
}
}