手机端适配页面样式调整

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

@@ -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}/>}