fix(接口测试): 补充场景循环控制器参数值优化参数值展示

This commit is contained in:
xinxin.wu 2024-08-12 18:48:13 +08:00 committed by Craftsman
parent 44c56232d6
commit 42b0850ed0
3 changed files with 32 additions and 43 deletions

View File

@ -28,11 +28,18 @@
:id="props.stepId" :id="props.stepId"
v-model:model-value="innerData.value" v-model:model-value="innerData.value"
size="mini" size="mini"
class="w-[110px] px-[8px]" class="value-input w-[110px] px-[8px]"
:placeholder="t('apiScenario.value')" :placeholder="t('apiScenario.value')"
:disabled="props.disabled" :disabled="props.disabled"
@change="handleInputChange" @change="handleInputChange"
> >
<template #suffix>
<MsIcon
type="icon-icon_full_screen_one"
class="input-suffix-icon ml-[8px]"
@click.stop="emit('quickInput', 'conditionValue')"
/>
</template>
</a-input> </a-input>
</a-tooltip> </a-tooltip>
</div> </div>
@ -63,24 +70,6 @@
innerData.value = props.data; innerData.value = props.data;
}); });
//
const dbClick = inject<
Ref<{
e: MouseEvent | null;
timeStamp: number;
}>
>('dbClick');
watch(
() => dbClick?.value.timeStamp,
() => {
// @ts-ignore
if ((dbClick?.value.e?.target as Element).parentNode?.id.includes(props.stepId)) {
emit('quickInput', 'conditionValue');
}
}
);
function handleInputChange() { function handleInputChange() {
nextTick(() => { nextTick(() => {
emit('change', innerData.value); emit('change', innerData.value);

View File

@ -100,11 +100,18 @@
:id="stepId" :id="stepId"
v-model:model-value="innerData.whileController.msWhileVariable.value" v-model:model-value="innerData.whileController.msWhileVariable.value"
size="mini" size="mini"
class="w-[110px] px-[8px]" class="value-input w-[110px] px-[8px]"
:placeholder="t('apiScenario.value')" :placeholder="t('apiScenario.value')"
:disabled="props.disabled" :disabled="props.disabled"
@change="handleInputChange" @change="handleInputChange"
> >
<template #suffix>
<MsIcon
type="icon-icon_full_screen_one"
class="input-suffix-icon ml-[8px]"
@click.stop="emit('quickInput', 'conditionValue')"
/>
</template>
</a-input> </a-input>
</a-tooltip> </a-tooltip>
</template> </template>
@ -242,29 +249,6 @@
innerData.value = props.data; innerData.value = props.data;
}); });
//
const dbClick = inject<
Ref<{
e: MouseEvent | null;
timeStamp: number;
}>
>('dbClick');
watch(
() => dbClick?.value.timeStamp,
() => {
// @ts-ignore
if ((dbClick?.value.e?.target as Element).parentNode?.uniqueId === props.stepId) {
emit(
'quickInput',
innerData.value.whileController.conditionType === WhileConditionType.CONDITION
? 'msWhileVariableValue'
: 'msWhileVariableScriptValue'
);
}
}
);
function handleInputChange() { function handleInputChange() {
nextTick(() => { nextTick(() => {
emit('change', innerData.value); emit('change', innerData.value);

View File

@ -1473,4 +1473,20 @@
min-height: auto; min-height: auto;
} }
} }
:deep(.value-input) {
.input-suffix-icon {
width: 12px;
height: 12px;
@apply cursor-pointer;
}
.arco-input-suffix {
opacity: 0;
}
&:hover {
.arco-input-suffix {
color: rgb(var(--primary-5));
opacity: 1;
}
}
}
</style> </style>