style(接口测试): 协议为空时弹出气泡
This commit is contained in:
parent
c5c8717878
commit
4a7c429048
|
@ -182,6 +182,11 @@
|
|||
@apply hidden;
|
||||
}
|
||||
}
|
||||
.ms-pop-confirm--hidden-confirm {
|
||||
.arco-btn-primary {
|
||||
@apply hidden;
|
||||
}
|
||||
}
|
||||
.ms-pop-confirm--hidden-icon {
|
||||
.arco-popconfirm-icon {
|
||||
@apply !hidden;
|
||||
|
|
|
@ -21,17 +21,31 @@
|
|||
</a-tooltip>
|
||||
<!-- 协议icon -->
|
||||
<a-dropdown v-model:popup-visible="visible" :hide-on-select="false">
|
||||
<a-tooltip :content="t('ms.paramsInput.protocol')">
|
||||
<MsButton
|
||||
v-show="!props.notShowOperation"
|
||||
type="icon"
|
||||
status="secondary"
|
||||
:class="`!mr-[4px] p-[4px] ${visible ? 'bg-[rgb(var(--primary-1))] !text-[rgb(var(--primary-4))]' : ''}`"
|
||||
@click="visible = !visible"
|
||||
>
|
||||
<MsIcon type="icon-icon_protocol" />
|
||||
</MsButton>
|
||||
</a-tooltip>
|
||||
<a-popconfirm
|
||||
:popup-visible="protocolIsEmptyVisible"
|
||||
class="ms-pop-confirm--hidden-confirm"
|
||||
:cancel-text="t('common.gotIt')"
|
||||
position="bottom"
|
||||
@cancel="protocolIsEmptyVisible = false"
|
||||
>
|
||||
<a-tooltip :content="t('ms.paramsInput.protocol')">
|
||||
<MsButton
|
||||
v-show="!props.notShowOperation"
|
||||
type="icon"
|
||||
status="secondary"
|
||||
:class="`!mr-[4px] p-[4px] ${visible ? 'bg-[rgb(var(--primary-1))] !text-[rgb(var(--primary-4))]' : ''}`"
|
||||
@click="visible = !visible"
|
||||
>
|
||||
<MsIcon type="icon-icon_protocol" />
|
||||
</MsButton>
|
||||
</a-tooltip>
|
||||
<template #content>
|
||||
<div class="flex flex-col gap-[8px]">
|
||||
<div class="font-medium">{{ t('apiTestManagement.protocolIsEmpty') }}</div>
|
||||
<div class="text-[var(--color-text-2)]">{{ t('apiTestManagement.protocolEmptyTip') }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</a-popconfirm>
|
||||
<template #content>
|
||||
<a-checkbox
|
||||
class="checkbox-all"
|
||||
|
@ -93,6 +107,7 @@
|
|||
const appStore = useAppStore();
|
||||
|
||||
const visible = ref(false);
|
||||
const protocolIsEmptyVisible = ref(false);
|
||||
const allProtocolList = ref<string[]>([]); // 全部
|
||||
const isCheckedAll = computed(() => {
|
||||
return selectedProtocols.value.length === allProtocolList.value.length;
|
||||
|
@ -134,6 +149,7 @@
|
|||
(val) => {
|
||||
setLocalStorage(props.protocolKey, val);
|
||||
emit('selectedProtocolsChange');
|
||||
protocolIsEmptyVisible.value = !val.length;
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -166,6 +166,8 @@ export default {
|
|||
'apiTestManagement.requestTypeTip': 'Note: Batch request type changes apply only to HTTP requests.',
|
||||
'apiTestManagement.autoMake': 'Auto Generate',
|
||||
'apiTestManagement.pleaseInputJsonSchema': 'Please enter Schema first before automatically generating it.',
|
||||
'apiTestManagement.protocolIsEmpty': 'The protocol is empty',
|
||||
'apiTestManagement.protocolEmptyTip': 'List display data is empty, please select protocol',
|
||||
'case.execute.selectEnv': 'Select Environment',
|
||||
'case.execute.defaultEnv': 'Default Environment',
|
||||
'case.execute.newEnv': 'New Environment',
|
||||
|
|
|
@ -159,6 +159,8 @@ export default {
|
|||
'apiTestManagement.requestTypeTip': '注:批量修改请求类型仅对HTTP协议的请求生效',
|
||||
'apiTestManagement.autoMake': '自动生成',
|
||||
'apiTestManagement.pleaseInputJsonSchema': '请先输入 Schema 后再进行自动生成',
|
||||
'apiTestManagement.protocolIsEmpty': '接口协议为空',
|
||||
'apiTestManagement.protocolEmptyTip': '列表展示数据为空,请选择协议',
|
||||
'case.execute.selectEnv': '环境选择',
|
||||
'case.execute.defaultEnv': '默认环境',
|
||||
'case.execute.newEnv': '新环境',
|
||||
|
|
Loading…
Reference in New Issue