25 lines
693 B
TypeScript
25 lines
693 B
TypeScript
import { View } from "@tarojs/components"
|
|
import Loading from "@/components/loading"
|
|
import style from "./index.module.scss"
|
|
import { memo } from "react";
|
|
|
|
type Params = {
|
|
styleLoading?: Object,
|
|
title?: string,
|
|
loadingIcon?: false|true
|
|
}
|
|
export default memo(({
|
|
styleLoading = {},
|
|
title = "加载中...", //显示的文字
|
|
loadingIcon = true //是否显示加载图标
|
|
}:Params) => {
|
|
console.log('loadingCard:::')
|
|
return (
|
|
<>
|
|
<View className={style.loadingCard_main}>
|
|
{loadingIcon&&<Loading/>}
|
|
<View className={style.loading_text}>{title}</View>
|
|
</View>
|
|
</>
|
|
)
|
|
}) |