import BLOG from '@/blog.config' import BlogPostListScroll from './components/BlogPostListScroll' import BlogPostListPage from './components/BlogPostListPage' import LayoutBase from './LayoutBase' import TagItemMini from '../next/components/TagItemMini' import PaginationNumber from './PaginationNumber' import BlogPostListEmpty from './BlogPostListEmpty' export const LayoutTag = (props) => { const currentTag = props.tags.find((t) => { return t.name === props.tag }) const totalPage = Math.ceil(props.postCount / BLOG.POSTS_PER_PAGE) const showPagination = props.postCount >= BLOG.POSTS_PER_PAGE props.headerSlot =
// 空文章处理 if (!props.postToShow || props.postToShow.length === 0) { return } const page = 1 return
{ props.postToShow && props.postToShow.length > 0 ? (<> {BLOG.POST_LIST_STYLE === 'page' ? (
{ showPagination && }
) : }= ) : () }
}