feat: 优化刷新逻辑,移除不必要的加载状态,简化数据获取流程
This commit is contained in:
@@ -5,15 +5,13 @@ import { client, safeClient } from "@/api";
|
||||
const { t } = useI18n();
|
||||
const { vibrate } = useHaptics();
|
||||
|
||||
const loading = ref(true);
|
||||
|
||||
const { data } = safeClient(client.api.earnings.pending.get());
|
||||
const { data, execute } = safeClient(client.api.earnings.pending.get());
|
||||
|
||||
async function handleRefresh(event: RefresherCustomEvent) {
|
||||
vibrate();
|
||||
useTimeoutFn(() => {
|
||||
await execute().finally(() => {
|
||||
event.target.complete();
|
||||
}, 800);
|
||||
});
|
||||
}
|
||||
|
||||
function getStatusColor(status?: string) {
|
||||
|
||||
Reference in New Issue
Block a user