// Copyright 2026 Arctel.net // SPDX-License-Identifier: Apache-2.0 'use client'; import * as React from 'react'; import { Code } from 'lucide-react'; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from '@/components/ui/card'; import { Label } from '@/components/ui/label'; import { Input } from '@/components/ui/input'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '@/components/ui/select'; import { Checkbox } from '@/components/ui/checkbox'; import { Button } from '@/components/ui/button'; export function ControlsTab() { const [formData, setFormData] = React.useState({ name: '', category: 'database', allowNotify: true, channel: 'all', }); return (
任务名称将用于后台执行记录的可读性显示
勾选后,在当前后台任务顺利执行结束时,会关联派发多渠道通知推送。
表单设计规范
1. 统一控件高度与投影:
输入框 (
Input
) 与下拉选择器 (
SelectTrigger
) 的高度应统一限制为小号高度{' '}
h-8
,字体大小使用{' '}
text-xs
,并使用{' '}
shadow-none
{' '}
去除原生的重叠阴影。
2. Checkbox 与文本的对齐:
Checkbox 应在左侧垂直偏上对齐,使用容器{' '}
flex items-start gap-2.5
{' '}
排列。Checkbox 组件本身添加{' '}
mt-0.5
,从而在多行描述文本的情况下依然保持良好的顶对齐,避免出现居中对齐导致的凌乱感。
3. 按钮使用策略:
普通主表单及新增/保存按钮,一律使用默认 Primary 按钮或次要{' '}
{'variant="secondary"'}
{' '}
按钮,小号高度统一采用{' '}
h-8 text-xs
。线框按钮必须带有{' '}
border-dashed shadow-none
{' '}
类。
多行说明内容