1. EmptyState 默认 emoji 📭 → serif 首字圆形图标(影响 23 处使用)
2. 预约页英文副标题 "Appointment" 移除
3. consultation 页技术错误信息直接渲染到 UI → 用户友好提示
4. auth store restore() 增加 fallback:secureGet 失败时读 wx.getStorageSync
5. request.ts 新增 safeGet():token/tenantId 读取容错
6. doctor/consultation useMemo 自引用死循环 → Math.ceil(total/20)
7. doctor/alerts 同样自引用 bug 修复
8. doctor/patients 死代码 totalPages + useMemo import 清理
36 lines
909 B
TypeScript
36 lines
909 B
TypeScript
import React from 'react';
|
|
import { View, Text } from '@tarojs/components';
|
|
import './index.scss';
|
|
|
|
interface EmptyStateProps {
|
|
icon?: string;
|
|
text: string;
|
|
hint?: string;
|
|
actionText?: string;
|
|
onAction?: () => void;
|
|
}
|
|
|
|
export default React.memo(function EmptyState({
|
|
icon,
|
|
text,
|
|
hint,
|
|
actionText,
|
|
onAction,
|
|
}: EmptyStateProps) {
|
|
const displayChar = icon || text.charAt(0);
|
|
return (
|
|
<View className='empty-state'>
|
|
<View className='empty-state-icon-wrap'>
|
|
<Text className='empty-state-icon-char'>{displayChar}</Text>
|
|
</View>
|
|
<Text className='empty-state-text'>{text}</Text>
|
|
{hint && <Text className='empty-state-hint'>{hint}</Text>}
|
|
{actionText && onAction && (
|
|
<View className='empty-state-action' onClick={onAction}>
|
|
<Text className='empty-state-action-text'>{actionText}</Text>
|
|
</View>
|
|
)}
|
|
</View>
|
|
);
|
|
});
|