fix(测试跟踪): 功能用例列表点击的问题

--bug=1016091 --user=宋昌昌 【测试跟踪】github#17096,功能用例列表想要复制用例的名称信息,即使是鼠标长按选中用例名称也判定为点击事件了,接口测试列表中并没有这个问题。 https://www.tapd.cn/55049933/s/1231169
This commit is contained in:
song-cc-rock 2022-08-23 16:02:45 +08:00 committed by f2c-ci-robot[bot]
parent 09da9ebc71
commit 0ebbd736fe
1 changed files with 24 additions and 14 deletions

View File

@ -25,7 +25,6 @@
:field-key="tableHeaderKey" :field-key="tableHeaderKey"
:custom-fields="testCaseTemplate.customFields" :custom-fields="testCaseTemplate.customFields"
@handlePageChange="initTableData" @handlePageChange="initTableData"
@handleRowClick="handleEdit"
@order="initTableData" @order="initTableData"
@filter="search" @filter="search"
ref="table"> ref="table">
@ -66,15 +65,28 @@
prop="num" prop="num"
sortable sortable
:label="$t('commons.id')" :label="$t('commons.id')"
min-width="80"/> min-width="80">
<template v-slot:default="scope">
<el-tooltip :content="$t('commons.edit')">
<a style="cursor:pointer" @click="handleEdit(scope.row)"> {{ scope.row.num }} </a>
</el-tooltip>
</template>
</ms-table-column>
<ms-table-column <ms-table-column
v-if="item.id === 'num' && customNum" v-if="item.id === 'num' && customNum"
:field="item"
:fields-width="fieldsWidth" :fields-width="fieldsWidth"
prop="customNum" prop="customNum"
sortable sortable
:label="$t('commons.id')" :label="$t('commons.id')"
min-width="80"/> min-width="80">
<template v-slot:default="scope">
<el-tooltip :content="$t('commons.edit')">
<a style="cursor:pointer" @click="handleEdit(scope.row)"> {{ scope.row.num }} </a>
</el-tooltip>
</template>
</ms-table-column>
<ms-table-column <ms-table-column
prop="name" prop="name"
@ -866,17 +878,15 @@ export default {
testCaseCreate() { testCaseCreate() {
this.$emit('testCaseEdit'); this.$emit('testCaseEdit');
}, },
handleEdit(testCase, column) { handleEdit(testCase) {
if (column.label !== this.$t('test_track.case.case_desc')) { if (this.publicEnable) {
if (this.publicEnable) { return;
return; } else {
} else { this.$get('test/case/get/' + testCase.id, response => {
this.$get('test/case/get/' + testCase.id, response => { let testCase = response.data;
let testCase = response.data; testCase.trashEnable = this.trashEnable;
testCase.trashEnable = this.trashEnable; this.$emit('testCaseEdit', testCase);
this.$emit('testCaseEdit', testCase); });
});
}
} }
}, },
handleEditPublic(testCase, column) { handleEditPublic(testCase, column) {