/** * @author linhd * @date 2024/8/6 10:02 * @description 卡片 */ import React, { FunctionComponent, ReactNode } from 'react'; import './index.scss'; export interface CardItemProps { render?: ReactNode; style?: React.CSSProperties; [name: string]: any; } export interface CardLineNumProps { /** 容器宽度 */ width: number; /** 展示个数 */ size: number; } export interface CardProps { /** 样式class */ className?: string; /** style */ style?: React.CSSProperties; /** 数据源 */ list?: CardItemProps[]; /** box-shadow, 是否带投影 */ boxShadow?: boolean | string; /** border, 是否边框 */ border?: boolean | string; /** 背景图片 */ backgroundImage?: string; /** 宽度与每行个数互斥 默认300px */ width?: string; /** 高度 默认140ox */ height?: string; /** 每行个数与宽度互斥 */ lineNum?: number | CardLineNumProps[]; /** 右间距 默认20px */ marginRight?: string; /** 下间距 默认20px */ marginBottom?: string; /** 是否显示加载更多 */ showMore?: boolean; /** 加载更多内容 */ moreRender?: ReactNode; /** loading */ loadingMoreRender?: ReactNode; /** 加载更多事件 */ onMore?: () => Promise | void; [name: string]: any; } export declare const Card: FunctionComponent; export default Card;