fix(接口管理):修复接口管理页面显示的问题
--bug=1037824 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001037824 --bug=1037926 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001037926
This commit is contained in:
parent
ecac585d31
commit
33b110cd22
|
@ -315,7 +315,7 @@
|
||||||
case ResponseAssertionType.RESPONSE_TIME:
|
case ResponseAssertionType.RESPONSE_TIME:
|
||||||
assertions.value.push({
|
assertions.value.push({
|
||||||
...tmpObj,
|
...tmpObj,
|
||||||
expectedValue: 100,
|
expectedValue: 200,
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case ResponseAssertionType.VARIABLE:
|
case ResponseAssertionType.VARIABLE:
|
||||||
|
|
|
@ -10,7 +10,15 @@
|
||||||
<template #label="{ tab }">
|
<template #label="{ tab }">
|
||||||
<div class="response-tab">
|
<div class="response-tab">
|
||||||
<div v-if="tab.defaultFlag" class="response-tab-default-icon"></div>
|
<div v-if="tab.defaultFlag" class="response-tab-default-icon"></div>
|
||||||
{{ t(tab.name || tab.label) }}({{ tab.statusCode }})
|
<a-tooltip
|
||||||
|
v-if="getTextWidth(t(tab.name || tab.label)) > 200"
|
||||||
|
:content="t(tab.name || tab.label) + '(' + tab.statusCode + ')'"
|
||||||
|
>
|
||||||
|
<span class="one-line-text" style="max-width: 200px"
|
||||||
|
>{{ t(tab.name || tab.label) }}({{ tab.statusCode }})</span
|
||||||
|
>
|
||||||
|
</a-tooltip>
|
||||||
|
<span v-else>{{ t(tab.name || tab.label) }}({{ tab.statusCode }})</span>
|
||||||
<MsMoreAction
|
<MsMoreAction
|
||||||
:list="
|
:list="
|
||||||
tab.defaultFlag
|
tab.defaultFlag
|
||||||
|
@ -309,6 +317,16 @@
|
||||||
emit('change');
|
emit('change');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getTextWidth(text: string) {
|
||||||
|
const canvas = document.createElement('canvas');
|
||||||
|
const context = canvas.getContext('2d');
|
||||||
|
if (context != null) {
|
||||||
|
const metrics = context.measureText(text);
|
||||||
|
return metrics.width;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// const jsonSchemaColumns: FormTableColumn[] = [
|
// const jsonSchemaColumns: FormTableColumn[] = [
|
||||||
// {
|
// {
|
||||||
// title: 'apiTestManagement.paramName',
|
// title: 'apiTestManagement.paramName',
|
||||||
|
|
Loading…
Reference in New Issue