fix(用例管理): 修复功能用例点击多选框下拉框等会打开抽屉的缺陷

This commit is contained in:
teukkk 2024-04-19 11:16:26 +08:00 committed by Craftsman
parent c0d9e96e3c
commit 11ea1ab153
3 changed files with 15 additions and 10 deletions

View File

@ -44,11 +44,13 @@
<MsCheckbox <MsCheckbox
v-if="attrs.selectorType === 'checkbox'" v-if="attrs.selectorType === 'checkbox'"
:value="props.selectedKeys.has(record[rowKey || 'id'])" :value="props.selectedKeys.has(record[rowKey || 'id'])"
@click.stop
@change="rowSelectChange(record[rowKey || 'id'])" @change="rowSelectChange(record[rowKey || 'id'])"
/> />
<a-radio <a-radio
v-else-if="attrs.selectorType === 'radio'" v-else-if="attrs.selectorType === 'radio'"
v-model:model-value="record.tableChecked" v-model:model-value="record.tableChecked"
@click.stop
@change="(val) => handleRadioChange(val as boolean, record)" @change="(val) => handleRadioChange(val as boolean, record)"
/> />
<div v-if="attrs.showPagination && props.showSelectorAll" class="w-[16px]"></div> <div v-if="attrs.showPagination && props.showSelectorAll" class="w-[16px]"></div>
@ -145,6 +147,7 @@
ref="currentInputRef" ref="currentInputRef"
v-model="record[item.dataIndex as string]" v-model="record[item.dataIndex as string]"
:max-length="255" :max-length="255"
@click.stop
@blur="handleEditInputBlur(record, item.dataIndex as string, true)" @blur="handleEditInputBlur(record, item.dataIndex as string, true)"
@keydown.enter="handleEditInputBlur(record, item.dataIndex as string, false)" @keydown.enter="handleEditInputBlur(record, item.dataIndex as string, false)"
/> />
@ -172,7 +175,7 @@
class="ml-2 cursor-pointer" class="ml-2 cursor-pointer"
:class="{ 'ms-table-edit-active': editActiveKey === rowIndex }" :class="{ 'ms-table-edit-active': editActiveKey === rowIndex }"
type="icon-icon_edit_outlined" type="icon-icon_edit_outlined"
@click="handleEdit(item.dataIndex as string, rowIndex, record)" @click.stop="handleEdit(item.dataIndex as string, rowIndex, record)"
/> />
</div> </div>
<div> <div>

View File

@ -122,14 +122,9 @@
<template #subText> <template #subText>
<div class="flex"> <div class="flex">
{{ t('apiTestManagement.importSwaggerFileTip1') }} {{ t('apiTestManagement.importSwaggerFileTip1') }}
<a <span class="text-[rgb(var(--warning-6))]" @click.stop="openLink">{{
class="text-[rgb(var(--warning-6))]" t('apiTestManagement.importSwaggerFileTip2')
href="https://converter.swagger.io/" }}</span>
target="_blank"
@click.stop
>
{{ t('apiTestManagement.importSwaggerFileTip2') }}
</a>
{{ t('apiTestManagement.importSwaggerFileTip3') }} {{ t('apiTestManagement.importSwaggerFileTip3') }}
</div> </div>
</template> </template>
@ -651,6 +646,10 @@
return false; return false;
} }
} }
function openLink() {
window.open('https://converter.swagger.io/', '_blank');
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

View File

@ -63,6 +63,7 @@
:placeholder="t('common.pleaseSelect')" :placeholder="t('common.pleaseSelect')"
class="param-input w-full" class="param-input w-full"
size="mini" size="mini"
@click.stop
@change="() => handleStatusChange(record)" @change="() => handleStatusChange(record)"
> >
<template #label> <template #label>
@ -204,6 +205,7 @@
:placeholder="t('common.pleaseSelect')" :placeholder="t('common.pleaseSelect')"
class="param-input w-full" class="param-input w-full"
size="mini" size="mini"
@click.stop
@change="() => handleStatusChange(record)" @change="() => handleStatusChange(record)"
> >
<template #label> <template #label>
@ -231,6 +233,7 @@
}, },
}" }"
size="mini" size="mini"
@click.stop
@change="(value) => handleChangeModule(record, value)" @change="(value) => handleChangeModule(record, value)"
> >
<template #tree-slot-title="node"> <template #tree-slot-title="node">
@ -240,7 +243,7 @@
</template> </template>
</a-tree-select> </a-tree-select>
<a-tooltip v-else :content="getModules(record.moduleId)" position="top"> <a-tooltip v-else :content="getModules(record.moduleId)" position="top">
<span class="one-line-text inline-block" @click="record.showModuleTree = true">{{ <span class="one-line-text inline-block" @click.stop="record.showModuleTree = true">{{
getModules(record.moduleId) getModules(record.moduleId)
}}</span> }}</span>
</a-tooltip> </a-tooltip>