feat: 添加短剧筛选功能和自定义Panel容器组件
1. 新增DramaQuery类型扩展分页查询参数,支持标题、状态、类型筛选 2. 重构usePageData hook,支持自定义查询类型和筛选状态管理 3. 新建Panel通用容器组件替代原生Card 4. 为短剧管理页面添加搜索筛选UI和逻辑 5. 统一所有页面的分页查询默认参数 6. 调整布局样式优化后台管理界面展示
This commit is contained in:
22
src/components/Panel/index.tsx
Normal file
22
src/components/Panel/index.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
type PanelProps = {
|
||||
title?: ReactNode;
|
||||
extra?: ReactNode;
|
||||
children: ReactNode;
|
||||
className?: string;
|
||||
};
|
||||
|
||||
export function Panel({ title, extra, children, className = "" }: PanelProps) {
|
||||
return (
|
||||
<div className={`rounded-xl border border-line/60 bg-white shadow-sm ${className}`}>
|
||||
{(title || extra) && (
|
||||
<div className="flex items-center justify-between border-b border-line/60 px-5 py-4">
|
||||
{title && <h3 className="m-0 text-[15px] font-semibold text-ink">{title}</h3>}
|
||||
{extra && <div>{extra}</div>}
|
||||
</div>
|
||||
)}
|
||||
<div className="p-5">{children}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user