mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-06-15 20:40:42 +08:00
fix: 修复存量类型警告
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user