import Link from 'next/link' import PostItemCard from './PostItemCard' import PostListEmpty from './PostListEmpty' import Swiper from './Swiper' /** * 博文水平列表 * 含封面 * 可以指定是否有模块背景色 * @returns {JSX.Element} * @constructor */ const PostListHorizontal = ({ title, href, posts, hasBg }) => { if (!posts || posts.length === 0) { return } return (
{/* 标题 */}

{title}

{href && ( 查看全部 )}
{/* 列表 */}
{posts?.map((p, index) => { return })}
{href && ( 查看全部 )}
) } export default PostListHorizontal