diff --git a/frontend/src/components/common/DataTable.vue b/frontend/src/components/common/DataTable.vue index 52029119..4357bb9b 100644 --- a/frontend/src/components/common/DataTable.vue +++ b/frontend/src/components/common/DataTable.vue @@ -257,9 +257,10 @@ const sortKey = ref('') const sortOrder = ref<'asc' | 'desc'>('asc') const actionsExpanded = ref(false) -// 数据/列/展开状态变化时重新检查滚动状态 +// 数据/列变化时重新检查滚动状态 +// 注意:不能监听 actionsExpanded,因为 checkActionsColumnWidth 会临时修改它,会导致无限循环 watch( - [() => props.data.length, () => props.columns, actionsExpanded], + [() => props.data.length, () => props.columns], async () => { await nextTick() checkScrollable() @@ -268,6 +269,12 @@ watch( { flush: 'post' } ) +// 单独监听展开状态变化,只更新滚动状态 +watch(actionsExpanded, async () => { + await nextTick() + checkScrollable() +}) + const handleSort = (key: string) => { if (sortKey.value === key) { sortOrder.value = sortOrder.value === 'asc' ? 'desc' : 'asc' diff --git a/frontend/src/i18n/locales/en.ts b/frontend/src/i18n/locales/en.ts index 6e185ef7..0996432a 100644 --- a/frontend/src/i18n/locales/en.ts +++ b/frontend/src/i18n/locales/en.ts @@ -1351,12 +1351,12 @@ export default { port: 'SMTP Port', portPlaceholder: '587', username: 'SMTP Username', - usernamePlaceholder: 'your-email@gmail.com', + usernamePlaceholder: "your-email{'@'}gmail.com", password: 'SMTP Password', passwordPlaceholder: '********', passwordHint: 'Leave empty to keep existing password', fromEmail: 'From Email', - fromEmailPlaceholder: 'noreply@example.com', + fromEmailPlaceholder: "noreply{'@'}example.com", fromName: 'From Name', fromNamePlaceholder: 'Sub2API', useTls: 'Use TLS', @@ -1366,7 +1366,7 @@ export default { title: 'Send Test Email', description: 'Send a test email to verify your SMTP configuration', recipientEmail: 'Recipient Email', - recipientEmailPlaceholder: 'test@example.com', + recipientEmailPlaceholder: "test{'@'}example.com", sendTestEmail: 'Send Test Email', sending: 'Sending...', enterRecipientHint: 'Please enter a recipient email address' diff --git a/frontend/src/i18n/locales/zh.ts b/frontend/src/i18n/locales/zh.ts index 5eac5307..483edd07 100644 --- a/frontend/src/i18n/locales/zh.ts +++ b/frontend/src/i18n/locales/zh.ts @@ -1549,12 +1549,12 @@ export default { port: 'SMTP 端口', portPlaceholder: '587', username: 'SMTP 用户名', - usernamePlaceholder: 'your-email@gmail.com', + usernamePlaceholder: "your-email{'@'}gmail.com", password: 'SMTP 密码', passwordPlaceholder: '********', passwordHint: '留空以保留现有密码', fromEmail: '发件人邮箱', - fromEmailPlaceholder: 'noreply@example.com', + fromEmailPlaceholder: "noreply{'@'}example.com", fromName: '发件人名称', fromNamePlaceholder: 'Sub2API', useTls: '使用 TLS', @@ -1564,7 +1564,7 @@ export default { title: '发送测试邮件', description: '发送测试邮件以验证 SMTP 配置', recipientEmail: '收件人邮箱', - recipientEmailPlaceholder: 'test@example.com', + recipientEmailPlaceholder: "test{'@'}example.com", sendTestEmail: '发送测试邮件', sending: '发送中...', enterRecipientHint: '请输入收件人邮箱地址' diff --git a/frontend/src/views/admin/AccountsView.vue b/frontend/src/views/admin/AccountsView.vue index 2c389d5c..44bb82e3 100644 --- a/frontend/src/views/admin/AccountsView.vue +++ b/frontend/src/views/admin/AccountsView.vue @@ -165,7 +165,7 @@ - +