Phase 0 基础设施:
- statusTag.ts: getStatusInlineStyle() 移除内联 borderRadius/padding/fontSize,仅返回 {background, color}
- 新增 SEVERITY_COLORS + getSeverityStyle() + getSeverityLabel() 统一告警严重程度样式
- variables.scss: 新增 9 个语义颜色别名 ($success/$danger/$warning/$info 等)
- mixins.scss: 新增 status-inline mixin 统一状态标签样式
- 7 个消费者页面添加 @include status-inline CSS 补偿
Phase 1 HIGH 修复 (4 页面):
- P46 随访管理: 移除 getTypeStyle() 硬编码 fontSize,替换文字 Loading 为组件
- P45 咨询详情医护: 添加 Loading/ErrorState 三态模板 + error ref
- P02 健康数据: 添加 loading ref + Loading 组件 + 错误 toast 提示
- P48 告警中心: 替换本地 SEVERITY_COLORS/SEVERITY_LABELS 为 statusTag.ts 导出
Phase 2 全局一致性:
- 2.1 触控补全: 17 页面为可点击元素添加 min-height: $touch-min
- 2.2 字号替换: 19 文件 31 处硬编码 px → Design Token CSS 变量
- 2.3 颜色替换: 18 文件 ~50 处硬编码十六进制 → SCSS 语义变量
- 2.4 elder-mode.scss: 新增 9 个选择器到触控放大清单
Phase 3 LOW 修复:
- 3.1 统一 Loading: 21 页面旧式文字加载 → <Loading> 组件
- 3.2 useElderClass: 8 页面补全长者模式 class 绑定
- 3.3 零散修复: 按钮 44px→48px,诊断记录添加 scroll-view 无限加载
同时新增 UniApp (Vue 3 + Vite) 小程序完整代码库 (146 文件)
97 lines
1.9 KiB
Vue
97 lines
1.9 KiB
Vue
<template>
|
|
<view class="step-indicator">
|
|
<view v-for="(step, idx) in steps" :key="step.label" class="step-item">
|
|
<view v-if="idx > 0" class="step-line" :class="{ 'step-line-done': idx < current }" />
|
|
<view class="step-dot"
|
|
:class="{ 'step-current': idx === current, 'step-done': idx < current }"
|
|
@tap="idx < current && onChange && onChange(idx)">
|
|
<text v-if="idx < current" class="step-check">✓</text>
|
|
<text v-else class="step-num">{{ idx + 1 }}</text>
|
|
</view>
|
|
<text class="step-label" :class="{ 'step-current': idx === current, 'step-done': idx < current }">
|
|
{{ step.label }}
|
|
</text>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
defineProps<{
|
|
steps: { label: string }[]
|
|
current: number
|
|
onChange?: (index: number) => void
|
|
}>()
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.step-indicator {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: center;
|
|
padding: 16px 0;
|
|
}
|
|
|
|
.step-item {
|
|
@include flex-center;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
flex: 1;
|
|
position: relative;
|
|
}
|
|
|
|
.step-line {
|
|
position: absolute;
|
|
top: 18px;
|
|
left: -50%;
|
|
width: 100%;
|
|
height: 2px;
|
|
background: $bd-l;
|
|
}
|
|
|
|
.step-line-done {
|
|
background: $pri;
|
|
}
|
|
|
|
.step-dot {
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 50%;
|
|
border: 2px solid $bd-l;
|
|
@include flex-center;
|
|
margin-bottom: 8px;
|
|
background: $white;
|
|
}
|
|
|
|
.step-current {
|
|
border-color: $pri;
|
|
|
|
&.step-dot { background: $pri; }
|
|
&.step-label { color: $pri; font-weight: 600; }
|
|
}
|
|
|
|
.step-done {
|
|
border-color: $pri;
|
|
background: $pri;
|
|
|
|
&.step-label { color: $acc; }
|
|
}
|
|
|
|
.step-check {
|
|
color: $white;
|
|
font-size: 18px;
|
|
}
|
|
|
|
.step-num {
|
|
font-size: var(--tk-font-body-sm);
|
|
color: $tx3;
|
|
}
|
|
|
|
.step-label {
|
|
font-size: var(--tk-font-micro);
|
|
color: $tx3;
|
|
text-align: center;
|
|
max-width: 80px;
|
|
white-space: nowrap;
|
|
}
|
|
</style>
|