import { Image, View, Text } from "@tarojs/components"; import styles from "./index.module.scss"; import img from "@/config/images"; interface IProps { reload?: () => void; text?: string; errorImg?: string; btnText?: string; btnImg?: string; wrapperHeight?: string; width?: string; height?: string; } const ListLoadError = (props: IProps) => { const { reload, text, errorImg, btnText, btnImg, wrapperHeight="", width = "", height = "" } = props; const handleReload = () => { reload && typeof reload === "function" && reload(); }; return ( {text && {text}} {reload && ( {btnText ? " " + btnText : "重试"} )} ); }; export default ListLoadError;