27 lines
791 B
TypeScript
27 lines
791 B
TypeScript
import { View, Image } from '@tarojs/components'
|
|
import Loading from '@/components/loading'
|
|
import style from './index.module.scss'
|
|
import { memo } from 'react'
|
|
|
|
type Params = {
|
|
title?: string
|
|
loadingIcon?: boolean
|
|
}
|
|
export default memo((props: Params) => {
|
|
console.log(props)
|
|
const {
|
|
title = '加载中...', //显示的文字
|
|
loadingIcon = true, //是否显示加载图标
|
|
} = props
|
|
console.log('loadingCard:::', props)
|
|
return (
|
|
<>
|
|
<View className={style.loadingCard_main}>
|
|
{loadingIcon && <Loading />}
|
|
{!loadingIcon && <Image className={style.pic} mode='aspectFill' lazyLoad src={'https://cdn.zzfzyc.com/empty.png'}></Image>}
|
|
<View className={style.loading_text}>{title}</View>
|
|
</View>
|
|
</>
|
|
)
|
|
})
|