refactor(mp): 统一空状态为 EmptyState 组件 + 清理旧 Tab CSS
- 4 个页面的内联空状态替换为共享 EmptyState 组件 (messages / action-inbox / pkg-health/alerts / mall) - 清理 10 个页面的旧 Tab CSS(迁移到 SegmentTabs 后不再需要) - 清理 elder-mode 中已删除的 mall-empty-state 引用
This commit is contained in:
@@ -105,34 +105,3 @@
|
||||
color: $tx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.alerts-empty {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 120px 0;
|
||||
}
|
||||
|
||||
.alerts-empty-text {
|
||||
font-size: var(--tk-font-num);
|
||||
color: var(--tk-text-secondary);
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.alerts-empty-hint {
|
||||
font-size: var(--tk-font-h1);
|
||||
color: var(--tk-text-secondary);
|
||||
}
|
||||
|
||||
.alerts-empty-action {
|
||||
margin-top: 24px;
|
||||
padding: 16px 48px;
|
||||
background: $pri;
|
||||
border-radius: $r-pill;
|
||||
}
|
||||
|
||||
.alerts-empty-action-text {
|
||||
color: $card;
|
||||
font-size: var(--tk-font-body-lg);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import { listPatientAlerts, type Alert } from '@/services/alert';
|
||||
import { useAuthStore } from '@/stores/auth';
|
||||
import Loading from '@/components/Loading';
|
||||
import ErrorState from '@/components/ErrorState';
|
||||
import EmptyState from '@/components/EmptyState';
|
||||
import SegmentTabs from '@/components/SegmentTabs';
|
||||
import { useElderClass } from '../../../hooks/useElderClass';
|
||||
import './index.scss';
|
||||
@@ -98,7 +99,7 @@ export default function PatientAlerts() {
|
||||
<SegmentTabs tabs={STATUS_TABS} activeKey={status} onChange={handleTabChange} variant="pill" />
|
||||
|
||||
{alerts.length === 0 && !loading ? (
|
||||
<ErrorState text='暂无告警记录' hint='您的各项指标正常' />
|
||||
<EmptyState text='暂无告警记录' hint='您的各项指标正常' />
|
||||
) : (
|
||||
<View className='alerts-list'>
|
||||
{alerts.map((item) => {
|
||||
|
||||
@@ -45,29 +45,6 @@
|
||||
padding: 0 32px 28px;
|
||||
}
|
||||
|
||||
.trange-tab {
|
||||
padding: 12px 32px;
|
||||
border-radius: $r-pill;
|
||||
background: $card;
|
||||
box-shadow: $shadow-sm;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.trange-tab-active {
|
||||
background: $pri;
|
||||
box-shadow: $shadow-md;
|
||||
}
|
||||
|
||||
.trange-tab-text {
|
||||
font-size: var(--tk-font-h2);
|
||||
color: $tx2;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.trange-tab-text-active {
|
||||
color: $white;
|
||||
}
|
||||
|
||||
/* ── chart card ── */
|
||||
.trend-chart-card {
|
||||
margin: 0 24px 20px;
|
||||
|
||||
Reference in New Issue
Block a user