import { Link } from "react-router"; import { Card } from "antd"; import { AppstoreOutlined, LikeOutlined, FieldTimeOutlined, } from "@ant-design/icons"; import { Space } from "antd"; interface IIconParamListData { label: React.ReactNode; key: string; icon: React.ReactNode; } interface IWidgetIconParamList { data: IIconParamListData[]; } const IconParamList = (prop: IWidgetIconParamList) => { return ( <> {prop.data.map((item, id) => { return ( {item.icon} {item.label} ); })} ); }; export interface ITopArticleCardData { title: string; link: string; like: number; hit: number; updatedAt: string; } interface IWidgetTopArticleCard { data: ITopArticleCardData; } const TopArticleCardWidget = (prop: IWidgetTopArticleCard) => { const items: IIconParamListData[] = [ { label: "经藏", key: "sutta", icon: , }, { label: prop.data.like, key: "like", icon: , }, { label: prop.data.updatedAt, key: "updated", icon: , }, ]; return ( <>

{prop.data.title}

); }; export default TopArticleCardWidget;