feat: add loading when process mails (#364)

This commit is contained in:
Dream Hunter
2024-07-27 22:30:38 +08:00
committed by GitHub
parent 5faae8796d
commit b57d46244a
3 changed files with 11 additions and 0 deletions

View File

@@ -147,6 +147,7 @@ const refresh = async () => {
const { results, count: totalCount } = await props.fetchMailData(
pageSize.value, (page.value - 1) * pageSize.value
);
loading.value = true;
data.value = await Promise.all(results.map(async (item) => {
item.checked = false;
return await processItem(item);
@@ -161,6 +162,8 @@ const refresh = async () => {
} catch (error) {
message.error(error.message || "error");
console.error(error);
} finally {
loading.value = false;
}
};

View File

@@ -26,12 +26,16 @@ const fetchMailData = async () => {
mailId: route.query.mail_id
})
});
loading.value = true;
return await processItem(res);
}
catch (error) {
console.error(error);
return {};
}
finally {
loading.value = false;
}
};
onMounted(async () => {

View File

@@ -8,6 +8,10 @@
创建完成后,我们在 cloudflare 的控制台可以看到 D1 数据库
::: warning 注意
下面输入的是 `db/schema.sql` 的内容
:::
打开 `Console` 标签页,输入 `db/schema.sql` 的内容,点击 `Execute` 执行
![d1](/ui_install/d1-exec.png)