手机端适配页面样式调整

This commit is contained in:
Eamon-meng
2025-06-11 14:40:43 +08:00
parent 0bd615654a
commit 9c4ed61977
5 changed files with 24 additions and 23 deletions

View File

@@ -28,7 +28,7 @@ export async function listInitialization(props: {
}
type listAccountReq = {
resource_no: number
resource_no: string
create_after: Date
create_before: Date
}

View File

@@ -206,10 +206,10 @@ export default function LoginPage(props: LoginPageProps) {
`h-screen w-screen xl:pr-64 bg-cover bg-left`,
`flex justify-center xl:justify-end items-center`,
)}>
<Image src={bg} alt="背景图" fill priority className="absolute -z-10 object-cover"/>
<Image src={bg} alt="背景图" fill priority className="absolute -z-20 object-cover"/>
<Link href="/">
<Image src={logo} alt="logo" priority height={64} className="absolute top-8 left-8"/>
<Image src={logo} alt="logo" priority height={64} className="absolute top-8 left-8 -z-10"/>
</Link>
{/* 登录表单 */}

View File

@@ -42,7 +42,7 @@ export default function Charts() {
]
const formSchema = zod.object({
resource_no: zod.number().min(11, '请输入正确的套餐编号').max(11, '请输入正确的套餐编号').optional(),
resource_no: zod.string().min(11, '请输入正确的套餐编号').max(11, '请输入正确的套餐编号').optional(),
create_after: zod.date().optional(),
create_before: zod.date().optional(),
})
@@ -55,8 +55,9 @@ export default function Charts() {
})
const handler = form.handleSubmit(
async (value) => {
console.log(value, 'value')
const res = {
resource_no: value.resource_no ?? 0,
resource_no: value.resource_no ?? '',
create_after: value.create_after ?? new Date(),
create_before: value.create_before ?? new Date(),
}
@@ -69,7 +70,7 @@ export default function Charts() {
let time = new Date()
time = addDays(time, i)
return {
time: format(time, `MM/dd`),
time: format(time, `YYYY年-MM月-dd`),
count: Math.floor(Math.random() * 100) + 1,
}
})
@@ -88,13 +89,11 @@ export default function Charts() {
<TabsTrigger value="static" className="data-[state=active]:text-primary"> IP </TabsTrigger>
</TabsList>
<Form<FormValues> className={merge(`flex items-end gap-4 flex-wrap`)} handler={handler} form={form} >
<div>
<FormField name="resource_no" label={<span className="text-sm"></span>} >
{({field}) => (
<Input {...field} className="w-52 "/>
)}
</FormField>
</div>
<FormField name="resource_no" label={<span className="text-sm"></span>}>
{({field}) => (
<Input {...field} className="h-9"/>
)}
</FormField>
<div className="flex flex-col gap-2">
<Label className="text-sm"></Label>
<div className="flex items-center">
@@ -119,11 +118,13 @@ export default function Charts() {
/>
)}
</FormField>
<Button className="h-9 w-20" type="submit">
<span></span>
</Button>
</div>
</div>
<div className="flex gap-4">
<Button className="h-9" type="submit">
<span></span>
</Button>
</div>
</Form>
<TabsContent value="dynamic" className="overflow-hidden">
{submittedData && <DashboardChart data={submittedData}/>}

View File

@@ -182,21 +182,21 @@ export default function RechargeModal(props: RechargeModelProps) {
value="20"
label="20元"
compare={String(field.value)}
className="flex-1"
className="flex-1 max-sm:text-sm max-sm:px-0"
/>
<FormOption
id={`${id}-50`}
value="50"
label="50元"
compare={String(field.value)}
className="flex-1"
className="flex-1 max-sm:text-sm max-sm:px-0"
/>
<FormOption
id={`${id}-100`}
value="100"
label="100元"
compare={String(field.value)}
className="flex-1"
className="flex-1 max-sm:text-sm max-sm:px-0"
/>
</div>
@@ -206,21 +206,21 @@ export default function RechargeModal(props: RechargeModelProps) {
value="200"
label="200元"
compare={String(field.value)}
className="flex-1"
className="flex-1 max-sm:text-sm max-sm:px-0"
/>
<FormOption
id={`${id}-500`}
value="500"
label="500元"
compare={String(field.value)}
className="flex-1"
className="flex-1 max-sm:text-sm max-sm:px-0"
/>
<FormOption
id={`${id}-1000`}
value="1000"
label="1000元"
compare={String(field.value)}
className="flex-1"
className="flex-1 max-sm:text-sm max-sm:px-0"
/>
</div>
</RadioGroup>

View File

@@ -30,7 +30,7 @@ function Alert({
<div
data-slot="alert"
role="alert"
className={merge(alertVariants({variant}), className)}
className={merge(alertVariants({variant}), className, 'py-0')}
{...props}
/>
)