fix: 函数名重复导致报错

This commit is contained in:
rd
2025-07-28 09:52:07 +08:00
parent db523230b9
commit 533d453afd
3 changed files with 8 additions and 10 deletions

View File

@ -40,7 +40,7 @@ export default defineComponent({
</Doption> </Doption>
); );
}; };
const renderSyncBtn = () => { const renderUpdateBtn = () => {
return ( return (
<Button type="outline" size="mini" onClick={() => emit('syncData', props.item)}> <Button type="outline" size="mini" onClick={() => emit('syncData', props.item)}>
@ -75,7 +75,7 @@ export default defineComponent({
), ),
}} }}
></Dropdown> ></Dropdown>
{renderSyncBtn()} {renderUpdateBtn()}
</> </>
); );
}; };
@ -104,13 +104,15 @@ export default defineComponent({
</> </>
); );
}; };
// 异常情况
const renderAbnormal = () => { const renderAbnormal = () => {
const { error_status } = props.item; const { error_status } = props.item;
const isMissing = error_status === EnumErrorStatus.MISSING; const isMissing = error_status === EnumErrorStatus.MISSING;
const isUnauthorized = error_status === EnumErrorStatus.UNAUTHORIZED; const isUnauthorized = error_status === EnumErrorStatus.UNAUTHORIZED;
const renderSyncBtn = () => { const renderSyncBtn = () => {
if (isMissing) { if (isMissing) {
renderSyncBtn(); return renderUpdateBtn();
} else if ([EnumErrorStatus.REQUEST, EnumErrorStatus.FREEZE].includes(error_status)) { } else if ([EnumErrorStatus.REQUEST, EnumErrorStatus.FREEZE].includes(error_status)) {
return ( return (
<Tooltip content={statusInfo.value.disabledBtnTooltip}> <Tooltip content={statusInfo.value.disabledBtnTooltip}>

View File

@ -195,7 +195,7 @@ const tipLabel = computed(() => {
{ count: too_many_requests_number, label: '请求频繁' }, { count: too_many_requests_number, label: '请求频繁' },
{ count: account_frozen_number, label: '账号被封' }, { count: account_frozen_number, label: '账号被封' },
{ count: miss_data_number, label: '数据缺失' }, { count: miss_data_number, label: '数据缺失' },
{ count: abnormal_number, label: '其他异常' }, // { count: abnormal_number, label: '其他异常' },
]; ];
// 过滤出有异常的项并格式化 // 过滤出有异常的项并格式化

View File

@ -72,9 +72,7 @@ export const getStatusInfo = (
const target = errorStatusMap.get(error_status); const target = errorStatusMap.get(error_status);
statusInfo.tooltip = target?.tooltip ?? ''; statusInfo.tooltip = target?.tooltip ?? '';
statusInfo.disabledBtnTooltip = target?.btnTooltip ?? ''; statusInfo.disabledBtnTooltip = target?.btnTooltip ?? '';
} } else if (status === EnumStatus.NORMAL) {
if (status === EnumStatus.NORMAL) {
if (to_be_expire_for_cookie === EnumExpireForCookie.NORMAL) { if (to_be_expire_for_cookie === EnumExpireForCookie.NORMAL) {
statusInfo.color = normalStyle.color; statusInfo.color = normalStyle.color;
statusInfo.background = normalStyle.background; statusInfo.background = normalStyle.background;
@ -84,9 +82,7 @@ export const getStatusInfo = (
statusInfo.background = abnormalStyle.background; statusInfo.background = abnormalStyle.background;
statusInfo.label = '即将过期'; statusInfo.label = '即将过期';
} }
} } else if (status === EnumStatus.PAUSE) {
if (status === EnumStatus.PAUSE) {
statusInfo.color = pauseStyle.color; statusInfo.color = pauseStyle.color;
statusInfo.background = pauseStyle.background; statusInfo.background = pauseStyle.background;
statusInfo.label = '暂停同步'; statusInfo.label = '暂停同步';