操作页面跳转添加返回上一级功能
This commit is contained in:
@@ -88,6 +88,7 @@ export default function BalancePage() {
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<div>
|
||||
<Button
|
||||
onClick={() => {
|
||||
router.back()
|
||||
@@ -97,6 +98,7 @@ export default function BalancePage() {
|
||||
返回上一级
|
||||
</Button>
|
||||
<span className="ml-2 text-gray-600">用户会员号: {userPhone}</span>
|
||||
</div>
|
||||
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
||||
<div className="flex flex-wrap items-end gap-4">
|
||||
<Controller
|
||||
|
||||
@@ -107,7 +107,17 @@ export default function BatchPage() {
|
||||
|
||||
return (
|
||||
<Page>
|
||||
{/* 筛选表单 */}
|
||||
<div>
|
||||
<Button
|
||||
onClick={() => {
|
||||
router.back()
|
||||
}}
|
||||
className="gap-2"
|
||||
>
|
||||
返回上一级
|
||||
</Button>
|
||||
<span className="ml-2 text-gray-600">用户会员号: {userPhone}</span>
|
||||
</div>
|
||||
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
||||
<div className="flex flex-wrap items-end gap-4">
|
||||
<Controller
|
||||
|
||||
@@ -157,6 +157,17 @@ export default function BillingPage() {
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<div>
|
||||
<Button
|
||||
onClick={() => {
|
||||
router.back()
|
||||
}}
|
||||
className="gap-2"
|
||||
>
|
||||
返回上一级
|
||||
</Button>
|
||||
<span className="ml-2 text-gray-600">用户会员号: {userPhone}</span>
|
||||
</div>
|
||||
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
||||
<div className="flex flex-wrap items-end gap-4">
|
||||
<Controller
|
||||
|
||||
@@ -107,6 +107,17 @@ export default function ChannelPage() {
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<div>
|
||||
<Button
|
||||
onClick={() => {
|
||||
router.back()
|
||||
}}
|
||||
className="gap-2"
|
||||
>
|
||||
返回上一级
|
||||
</Button>
|
||||
<span className="ml-2 text-gray-600">用户会员号: {userPhone}</span>
|
||||
</div>
|
||||
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
||||
<div className="flex flex-wrap items-end gap-4">
|
||||
<Controller
|
||||
|
||||
@@ -170,8 +170,23 @@ function getTodayUsage(lastAt: Date | null | undefined, daily: number) {
|
||||
}
|
||||
|
||||
export default function ResourcesPage() {
|
||||
const searchParams = useSearchParams()
|
||||
const router = useRouter()
|
||||
const userPhone = searchParams.get("phone")
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<div>
|
||||
<Button
|
||||
onClick={() => {
|
||||
router.back()
|
||||
}}
|
||||
className="gap-2"
|
||||
>
|
||||
返回上一级
|
||||
</Button>
|
||||
<span className="ml-2 text-gray-600">用户会员号: {userPhone}</span>
|
||||
</div>
|
||||
<Tabs defaultValue="short">
|
||||
<TabsList className="bg-card p-1.5 rounded-lg">
|
||||
<TabsTrigger
|
||||
@@ -422,8 +437,7 @@ function ResourceList({ resourceType }: ResourceListProps) {
|
||||
],
|
||||
[isLong, updatingId, handleStatusChange],
|
||||
)
|
||||
const router = useRouter()
|
||||
const userPhone = searchParams.get("phone")
|
||||
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
||||
|
||||
@@ -110,7 +110,17 @@ export default function TradePage() {
|
||||
|
||||
return (
|
||||
<Page>
|
||||
{/* 筛选表单 */}
|
||||
<div>
|
||||
<Button
|
||||
onClick={() => {
|
||||
router.back()
|
||||
}}
|
||||
className="gap-2"
|
||||
>
|
||||
返回上一级
|
||||
</Button>
|
||||
<span className="ml-2 text-gray-600">用户会员号: {userPhone}</span>
|
||||
</div>
|
||||
<form onSubmit={onFilter} className="bg-card p-4 rounded-lg">
|
||||
<div className="flex flex-wrap items-end gap-4">
|
||||
<Controller
|
||||
|
||||
@@ -96,7 +96,10 @@ export function DataTable<T extends Record<string, unknown>>(
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn("flex-auto flex flex-col gap-3", props.classNames?.root)}
|
||||
className={cn(
|
||||
"flex-auto flex flex-col gap-3 overflow-hidden",
|
||||
props.classNames?.root,
|
||||
)}
|
||||
>
|
||||
{/* 数据表 */}
|
||||
<div className="flex-auto overflow-hidden relative">
|
||||
|
||||
Reference in New Issue
Block a user