fix(mail): 修复 vue-tsc -b 构建类型错误(表格行类型断言与残留导入)
Mailbox/MailAdmin 模板内 DefaultRow 类型断言为 JmapEmail/MailAdminItem,清理无用 dateNow 与 buildBasicToken 残留引用
This commit is contained in:
1 parent
5e8b603e22
commit
5da9dd04eb
2 files changed
+5
-7
No files matched your search
@@ -75,7 +75,7 @@ async function disable(row: MailAdminItem): Promise<void> {
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-button v-if="row.Status === 1" text type="danger" size="small" @click="disable(row)">禁用</el-button>
|
||||
<el-button v-if="row.Status === 1" text type="danger" size="small" @click="disable(row as MailAdminItem)">禁用</el-button>
|
||||
<span v-else class="disabled-text">已禁用</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
import { ref, computed, onMounted, nextTick } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mailApi, type MailboxInfo, type MailSessionConfig } from '@/api/mail'
|
||||
import { JmapClient, buildBasicToken, type JmapMailbox, type JmapEmail } from '@/utils/jmap'
|
||||
import { JmapClient, type JmapMailbox, type JmapEmail } from '@/utils/jmap'
|
||||
|
||||
// === 状态 ===
|
||||
|
||||
@@ -274,8 +274,6 @@ const emailBodyText = computed(() => {
|
||||
return '(无正文内容)'
|
||||
})
|
||||
|
||||
const dateNow = Date.now()
|
||||
|
||||
// 打开邮箱详情页时挂载邮箱列表
|
||||
async function openMailbox(): Promise<void> {
|
||||
loginVisible.value = true
|
||||
@@ -330,7 +328,7 @@ async function openMailbox(): Promise<void> {
|
||||
<el-button text type="danger" @click="logoutMail">退出邮箱</el-button>
|
||||
</div>
|
||||
|
||||
<el-table v-loading="emailsLoading" :data="emails" class="email-table" @row-click="(row: JmapEmail) => openDetail(row)">
|
||||
<el-table v-loading="emailsLoading" :data="emails" class="email-table" @row-click="(row: any) => openDetail(row as JmapEmail)">
|
||||
<el-table-column width="50">
|
||||
<template #default="{ row }">
|
||||
<span v-if="!row.keywords?.$seen" class="unread-dot" />
|
||||
@@ -338,7 +336,7 @@ async function openMailbox(): Promise<void> {
|
||||
</el-table-column>
|
||||
<el-table-column prop="from" :width="260">
|
||||
<template #default="{ row }">
|
||||
<span :class="{ 'unread-text': !row.keywords?.$seen }">{{ formatSender(row) }}</span>
|
||||
<span :class="{ 'unread-text': !row.keywords?.$seen }">{{ formatSender(row as JmapEmail) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="subject" min-width="240">
|
||||
@@ -353,7 +351,7 @@ async function openMailbox(): Promise<void> {
|
||||
<template #default="{ row }">
|
||||
<div class="email-date">
|
||||
<span>{{ formatDate(row.receivedAt || row.date) }}</span>
|
||||
<el-button text type="danger" size="small" @click.stop="deleteEmail(row)">删除</el-button>
|
||||
<el-button text type="danger" size="small" @click.stop="deleteEmail(row as JmapEmail)">删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
Reference in new issue
Block a user