fix(接口测试): 修复接口测试场景关联模块多选项目切换重置bug
This commit is contained in:
parent
22d62b4ccd
commit
d1558051f4
|
@ -17,7 +17,11 @@
|
||||||
<div class="w-[300px] border-r p-[16px]">
|
<div class="w-[300px] border-r p-[16px]">
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<div class="mb-[12px] flex items-center gap-[8px] overflow-hidden">
|
<div class="mb-[12px] flex items-center gap-[8px] overflow-hidden">
|
||||||
<MsProjectSelect v-model:project="currentProject" class="flex-1 overflow-hidden" @change="resetModule" />
|
<MsProjectSelect
|
||||||
|
v-model:project="currentProject"
|
||||||
|
class="flex-1 overflow-hidden"
|
||||||
|
@change="handleChangeProject"
|
||||||
|
/>
|
||||||
<a-select
|
<a-select
|
||||||
v-if="activeKey !== 'scenario'"
|
v-if="activeKey !== 'scenario'"
|
||||||
v-model:model-value="protocol"
|
v-model:model-value="protocol"
|
||||||
|
@ -473,11 +477,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetModule() {
|
function resetModule() {
|
||||||
clearSelected();
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
moduleTreeRef.value?.init(activeKey.value);
|
moduleTreeRef.value?.init(activeKey.value);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleChangeProject() {
|
||||||
|
clearSelected();
|
||||||
|
resetModule();
|
||||||
|
}
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
await initProtocolList();
|
await initProtocolList();
|
||||||
const localProtocol = getLocalStorage<string>(ProtocolKeyEnum.API_SCENARIO_IMPORT_PROTOCOL);
|
const localProtocol = getLocalStorage<string>(ProtocolKeyEnum.API_SCENARIO_IMPORT_PROTOCOL);
|
||||||
|
|
Loading…
Reference in New Issue