fix: ui
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 2m10s

This commit is contained in:
luo
2026-08-05 15:23:58 +08:00
parent 1891ea1e0d
commit 9f07f9d0ef
9 changed files with 122 additions and 70 deletions

View File

@@ -7,7 +7,10 @@
</button>
</view>
<view v-if="notifications.length === 0 && !loading" class="empty-state">
<view v-if="!notificationsLoaded || (loading && notifications.length === 0)" class="loading-state">
<up-loading-icon text="加载中" size="30"></up-loading-icon>
</view>
<view v-else-if="notifications.length === 0" class="empty-state">
<image src="/static/notification.png" mode="aspectFit" class="empty-icon" />
<view class="empty-title">暂无通知</view>
<view class="empty-desc">当前没有可查看的业务通知</view>
@@ -47,6 +50,7 @@
const total = ref(0);
const unreadCount = ref(0);
const loading = ref(false);
const notificationsLoaded = ref(false);
const noMore = ref(false);
const formatDate = (value) => {
@@ -107,6 +111,7 @@
console.error('加载通知列表失败', error);
} finally {
loading.value = false;
notificationsLoaded.value = true;
}
};
@@ -165,6 +170,7 @@
.notification-footer { margin-top: var(--space-md); }
.notification-meta, .notification-time { color: var(--text-tertiary); font-size: 22rpx; }
.empty-state { display: flex; flex-direction: column; align-items: center; padding: 140rpx 40rpx; }
.loading-state { display: flex; align-items: center; justify-content: center; min-height: 400rpx; }
.empty-icon { width: 100rpx; height: 100rpx; opacity: 0.6; margin-bottom: 24rpx; }
.empty-title { color: var(--text-primary); font-size: 30rpx; font-weight: 600; }
.empty-desc { color: var(--text-tertiary); font-size: 24rpx; margin-top: 12rpx; }