增加前端格式检查配置

This commit is contained in:
yml2213
2026-06-08 06:40:33 +08:00
parent 79ea3a476c
commit 500f511185
150 changed files with 7254 additions and 4013 deletions
@@ -2,7 +2,11 @@
import { ElMessage } from 'element-plus'
import { onMounted, ref } from 'vue'
import { fetchNotifications, markNotificationRead, type NotificationItem } from '@/features/auth/api/notifications'
import {
fetchNotifications,
markNotificationRead,
type NotificationItem,
} from '@/features/auth/api/notifications'
import { formatDateTime } from '@/utils/time'
const loading = ref(false)
@@ -46,7 +50,12 @@ async function markRead(id: number) {
<el-empty v-if="!loading && notifications.length === 0" description="暂无站内信" />
<div v-else v-loading="loading" class="notification-list">
<div v-for="item in notifications" :key="item.id" class="notification-item" :class="{ unread: !item.read_at }">
<div
v-for="item in notifications"
:key="item.id"
class="notification-item"
:class="{ unread: !item.read_at }"
>
<div>
<span>{{ item.type }}</span>
<h2>{{ item.title }}</h2>
@@ -54,10 +63,15 @@ async function markRead(id: number) {
<small>{{ formatDateTime(item.created_at) }}</small>
</div>
<div class="notification-actions">
<RouterLink v-if="item.biz_type === 'order' && item.biz_id" :to="`/orders/${item.biz_id}`">
<RouterLink
v-if="item.biz_type === 'order' && item.biz_id"
:to="`/orders/${item.biz_id}`"
>
<el-button size="small">查看订单</el-button>
</RouterLink>
<el-button v-if="!item.read_at" size="small" type="primary" @click="markRead(item.id)">已读</el-button>
<el-button v-if="!item.read_at" size="small" type="primary" @click="markRead(item.id)"
>已读</el-button
>
</div>
</div>
</div>