fix: 手动触发
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m15s

This commit is contained in:
sexygoat
2026-04-28 11:14:13 +08:00
parent b88f2d185e
commit fb10b72760
9 changed files with 462 additions and 205 deletions

View File

@@ -4,6 +4,7 @@
<AssetSearchCard
ref="assetSearchCardRef"
:has-card-info="!!cardInfo"
:refresh-disabled="refreshDisabled"
@search="handleSearch"
@refresh="handleRefresh"
/>
@@ -266,6 +267,9 @@
await updatePollingStatus(val)
})
// ========== 刷新按钮状态 ==========
const refreshDisabled = ref(false)
// ========== 事件处理 ==========
/**
@@ -301,7 +305,14 @@
*/
const handleRefresh = async () => {
if (!cardInfo.value) return
await refreshAsset(cardInfo.value.identifier, cardInfo.value.asset_type)
const success = await refreshAsset(cardInfo.value.identifier, cardInfo.value.asset_type)
if (!success) {
// 如果刷新失败429错误禁用刷新按钮30秒
refreshDisabled.value = true
setTimeout(() => {
refreshDisabled.value = false
}, 30000)
}
}
/**