fix(全局): 部分 bug 修复

This commit is contained in:
baiqi 2024-06-19 14:18:41 +08:00 committed by 刘瑞斌
parent 2e8e11e13a
commit 2d51739c1c
12 changed files with 34 additions and 32 deletions

View File

@ -392,7 +392,7 @@
//
node.expand();
node.renderTree();
window.minder.layout();
node.layout();
return;
}
// TODO:
@ -440,7 +440,7 @@
node.expand();
// node.renderTree();
window.minder.renderNodeBatch(waitingRenderNodes);
window.minder.layout();
node.layout();
window.minder.execCommand('camera', node, 100);
if (node.data) {
node.data.isLoaded = true;
@ -458,10 +458,10 @@
extraVisible.value = false;
showDetailMenu.value = false;
resetExtractInfo();
if (node.children && node.children.length > 0) {
if (node.children && node.children.length > 0 && node.data?.expandState === 'collapse') {
node.expand();
node.renderTree();
window.minder.layout();
node.layout();
}
}
setPriorityView(true, 'P');

View File

@ -460,8 +460,11 @@
[RunMode.PARALLEL]: 3,
};
function getExecuteMethod(priority: number) {
return priority === 2 ? RunMode.SERIAL : RunMode.PARALLEL;
function getExecuteMethod(data: MinderJsonNodeData) {
if (activePlanSet.value?.data.id === data.id) {
return activePlanSet.value?.data.executeMethod;
}
return data.priority === 2 ? RunMode.SERIAL : RunMode.PARALLEL;
}
/**
@ -740,13 +743,13 @@
...node.data,
id: undefined,
num: nodeIndex,
executeMethod: getExecuteMethod(node.data.priority),
executeMethod: getExecuteMethod(node.data),
});
} else {
tempMinderParams.value.editList.push({
...node.data,
num: nodeIndex,
executeMethod: getExecuteMethod(node.data.priority),
executeMethod: getExecuteMethod(node.data),
});
}
return node.data.level < 2;

View File

@ -63,12 +63,7 @@
<template #tag>
<div v-for="org of orgList" :key="org.orgId" class="mb-[16px]">
<MsTag class="h-[26px]" max-width="100%">
<a-tooltip :content="org.orgName" position="left">
<template #content>
<span>{{ org.orgName }}</span>
</template>
<span>{{ org.orgName }}</span>
</a-tooltip>
<span>{{ org.orgName }}</span>
</MsTag>
<br />
<MsTag
@ -77,12 +72,7 @@
class="!mr-[8px] mt-[8px] !bg-[rgb(var(--primary-1))] !text-[rgb(var(--primary-5))]"
max-width="100%"
>
<a-tooltip :content="project.projectName" position="left">
<template #content>
<span>{{ project.projectName }}</span>
</template>
<span>{{ project.projectName }}</span>
</a-tooltip>
<span>{{ project.projectName }}</span>
</MsTag>
</div>
</template>

View File

@ -151,7 +151,7 @@
}
);
const _specialHeight = props.hasBreadcrumb ? 32 + props.specialHeight : props.specialHeight; // 32
const _specialHeight = props.hasBreadcrumb ? 32 + props.specialHeight : props.specialHeight; // 24+8
// TODO
const cardOverHeight = computed(() => {
@ -169,9 +169,9 @@
}
if (props.hideFooter) {
//
return props.noContentPadding ? 120 + _specialHeight : 168 + _specialHeight;
return props.noContentPadding ? 130 + _specialHeight : 168 + _specialHeight;
}
return 230 + _specialHeight;
return 220 + _specialHeight;
});
const getComputedContentStyle = computed(() => {

View File

@ -38,7 +38,10 @@
{{ tag }}
</MsTag>
<template #overflow="{ number }">
<a-tooltip :content="(Array.isArray(item.value) ? item.value : [item.value]).join('')">
<a-tooltip
:content="(Array.isArray(item.value) ? item.value : [item.value]).join('')"
position="tl"
>
<MsTag
:theme="item.tagTheme || 'outline'"
:type="item.tagType || 'primary'"
@ -98,6 +101,7 @@
<a-tooltip
:content="`${item.value}`"
:disabled="item.value === undefined || item.value === null || item.value?.toString() === ''"
position="tl"
>
<div>
{{

View File

@ -325,7 +325,7 @@
});
}
const shortcutTriggerVisible = ref(false);
// const shortcutTriggerVisible = ref(false);
onMounted(() => {
nextTick(() => {

View File

@ -99,7 +99,7 @@
if (val && node) {
setTimeout(() => {
window.minder.execCommand('camera', node, 100);
}, 0);
}, 100);
}
}
);

View File

@ -854,6 +854,7 @@
requestVModel.value.method = RequestMethods.GET;
}
}
localStorage.setItem('currentProtocol', requestVModel.value.protocol);
handleActiveDebugChange();
}

View File

@ -155,11 +155,12 @@
}
const initDefaultId = `debug-${Date.now()}`;
const localProtocol = localStorage.getItem('currentProtocol');
const defaultDebugParams: RequestParam = {
type: 'api',
id: initDefaultId,
moduleId: 'root',
protocol: 'HTTP',
protocol: localProtocol || 'HTTP',
url: '',
activeTab: RequestComposition.HEADER,
label: t('apiTestDebug.newApi'),
@ -229,11 +230,12 @@
function addDebugTab(defaultProps?: Partial<TabItem>) {
const id = `debug-${Date.now()}`;
const protocol = localStorage.getItem('currentProtocol');
debugTabs.value.push({
...cloneDeep(defaultDebugParams),
id,
isNew: !defaultProps?.id, // tabidid
protocol: activeDebug.value.protocol || defaultDebugParams.protocol, // tab使tab
protocol: protocol || activeDebug.value.protocol || defaultDebugParams.protocol, // tab使tab
...defaultProps,
});
activeDebug.value = debugTabs.value[debugTabs.value.length - 1];

View File

@ -226,12 +226,13 @@
});
const initDefaultId = `definition-${Date.now()}`;
const localProtocol = localStorage.getItem('currentProtocol');
const defaultDefinitionParams: RequestParam = {
type: 'api',
definitionActiveKey: 'definition',
id: initDefaultId,
moduleId: props.activeModule === 'all' ? 'root' : props.activeModule,
protocol: 'HTTP',
protocol: localProtocol || 'HTTP',
tags: [],
status: RequestDefinitionStatus.PROCESSING,
description: '',
@ -299,6 +300,7 @@
function addApiTab(defaultProps?: Partial<TabItem>) {
const id = `definition-${Date.now()}`;
const protocol = localStorage.getItem('currentProtocol');
apiTabs.value.push({
...cloneDeep(defaultDefinitionParams),
moduleId: props.activeModule === 'all' ? 'root' : props.activeModule,
@ -306,7 +308,7 @@
id,
isNew: !defaultProps?.id, // tabidid
definitionActiveKey: !defaultProps ? 'definition' : 'preview',
protocol: activeApiTab.value.protocol || defaultDefinitionParams.protocol, // tab使tab
protocol: protocol || activeApiTab.value.protocol || defaultDefinitionParams.protocol, // tab使tab
...defaultProps,
});
activeApiTab.value = apiTabs.value[apiTabs.value.length - 1];

View File

@ -22,7 +22,7 @@
class="scenario-csv-trigger"
:popup-translate="[-2, 244]"
>
<MsButton type="text" class="!mr-0" @click="handleRecordConfig(record)">
<MsButton type="text" class="!mr-0" size="mini" @click="handleRecordConfig(record)">
{{ t('apiScenario.params.config') }}
</MsButton>
<template #content>

View File

@ -618,8 +618,8 @@
.case-item--active {
@apply relative;
border: 1px solid rgb(var(--primary-5));
background-color: rgb(var(--primary-1));
box-shadow: inset 0 0 0.5px 0.5px rgb(var(--primary-5));
}
}
.case-detail-label {