import React from 'react'; import { View, Text } from '@tarojs/components'; import './index.scss'; interface ErrorStateProps { text?: string; onRetry?: () => void; } export default React.memo(function ErrorState({ text = '加载失败,请稍后重试', onRetry, }: ErrorStateProps) { return ( ⚠️ {text} {onRetry && ( 重新加载 )} ); });