import React from 'react' import { View, Text } from '@tarojs/components' interface LoadingProps { /** 提示文字,默认"加载中..." */ text?: string /** 是否全屏居中显示 */ fullscreen?: boolean /** 自定义样式类名 */ className?: string } /** * 统一加载状态组件 * - 小程序兼容(无 CSS transition / animation 依赖) * - 支持内嵌和全屏两种模式 */ const Loading: React.FC = ({ text = '加载中...', fullscreen = false, className = '', }) => { const content = ( {/* 简单的旋转加载指示器 */} {text} ) // 全屏模式需要外层容器 if (fullscreen) { return <>{content} } return content } export default Loading