fix
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 22s
Docker Build & Deploy / Deploy to Production (push) Successful in 6s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 22s
Docker Build & Deploy / Deploy to Production (push) Successful in 6s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s
This commit is contained in:
@@ -508,6 +508,11 @@ const handleQueryBills = async () => {
|
||||
}
|
||||
|
||||
const percentage = computed(() => {
|
||||
// 优先使用后端返回的 usagePercentage 字段
|
||||
if (props.budget.usagePercentage !== undefined && props.budget.usagePercentage !== null) {
|
||||
return Math.round(props.budget.usagePercentage)
|
||||
}
|
||||
// 降级方案:如果后端没有返回该字段,前端计算
|
||||
if (!props.budget.limit) {
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user