优化邮件列表改为虚拟滚动列表

This commit is contained in:
eoao
2026-01-15 19:46:00 +08:00
parent 5c11d16bdf
commit ec3bd76666
13 changed files with 250 additions and 154 deletions

View File

@@ -539,12 +539,6 @@ const emailService = {
const conditions = [];
if (timeSort) {
conditions.push(gt(email.emailId, emailId));
} else {
conditions.push(lt(email.emailId, emailId));
}
if (type === 'send') {
conditions.push(eq(email.type, emailConst.type.SEND));
}
@@ -586,6 +580,12 @@ const emailService = {
const countConditions = [...conditions];
if (timeSort) {
conditions.unshift(gt(email.emailId, emailId));
} else {
conditions.unshift(lt(email.emailId, emailId));
}
const query = orm(c).select({ ...email, userEmail: user.email })
.from(email)
.leftJoin(user, eq(email.userId, user.userId))