fix: 修复存量类型警告

This commit is contained in:
digua
2026-04-23 00:04:27 +08:00
parent 0cdaa8ff4f
commit b270eccea1
4 changed files with 6 additions and 20 deletions
@@ -34,16 +34,6 @@ const props = defineProps<{
timeFilter?: TimeFilter
}>()
const weekdayNames = computed(() => [
t('common.weekday.mon'),
t('common.weekday.tue'),
t('common.weekday.wed'),
t('common.weekday.thu'),
t('common.weekday.fri'),
t('common.weekday.sat'),
t('common.weekday.sun'),
])
// ==================== 核心数字 ====================
const totalMessages = computed(() => props.messageTypes.reduce((sum, item) => sum + item.count, 0))
+5
View File
@@ -3,6 +3,11 @@ import { useToast as useNuxtToast } from '@nuxt/ui/composables'
interface AppToastOptions {
description?: string
duration?: number
actions?: Array<{
label: string
icon?: string
onClick: () => void
}>
}
interface AppToastPayload extends AppToastOptions {
@@ -109,16 +109,6 @@ const timeRangeString = computed(() => {
const heroTextMaxWidthClass = computed(() => (locale.value.startsWith('en') ? 'max-w-[420px]' : 'max-w-[320px]'))
function getOverallLabel(): string {
if (!stats.value || stats.value.totalSessions <= 3) {
return t('views.relationship.labels.distantBond')
}
const ratio = overallInitiateRatio.value
if (ratio >= 40 && ratio <= 60) return t('views.relationship.labels.mutualPursuit')
if (ratio >= 80 || ratio <= 20) return t('views.relationship.labels.devotedHeart')
return t('views.relationship.labels.silentGuardian')
}
// 确保进度条视觉上可区分(至少 5% 最小宽度)
function clampBarWidth(ratio: number): number {
if (ratio <= 0) return 0
@@ -38,6 +38,7 @@ watch(
if (val) {
if (isManageMode.value && props.manageSource) {
formData.value = {
name: props.manageSource.name || '',
baseUrl: props.manageSource.baseUrl,
token: props.manageSource.token,
intervalMinutes: props.manageSource.intervalMinutes,