Expand description
表单控件组件。 表单控件组件
提供登录、注册、评论等页面共享的输入框、按钮与提示框样式常量与组件。
Re-exports§
pub use FormSelect_completions::Component::FormSelect;pub use FormInput_completions::Component::FormInput;pub use FormLabel_completions::Component::FormLabel;pub use AlertBox_completions::Component::AlertBox;
Structs§
- Alert
BoxProps - Properties for the
AlertBoxcomponent. - Form
Input Props - Properties for the
FormInputcomponent. - Form
Label Props - Properties for the
FormLabelcomponent. - Form
Select Props - Properties for the
FormSelectcomponent.
Constants§
- BUTTON_
PRIMARY_ CLASS - 主按钮 CSS 类,用于表单提交等主操作按钮。
- FORM_
SELECT_ COMPACT_ CLASS - FormSelect 紧凑触发器样式:工具栏内联小下拉(自动刷新、导出格式等)。 自动宽度 + text-sm + 小圆角,chevron 与面板样式与默认表单款一致。
- INPUT_
CLASS - 输入框基础 CSS 类,统一文本框、邮箱框、URL 框等样式。
- INPUT_
INLINE_ CLASS - 内联输入框 CSS 类:与
INPUT_CLASS同主题,但用flex-1 min-w-0取代w-full, 用于与按钮并排、需填充剩余宽度的场景(搜索栏、URL 输入栏等)。
Statics§
- FORM_
SELECT_ 🔒ID - FormSelect 实例 id 计数器(跨泛型单例化全局唯一)。
Functions§
- Alert
Box - 提示框组件,用于显示成功、错误等状态消息。
- Form
Input - 表单输入框组件。
- Form
Label - 表单标签组件。
- Form
Select - 下拉选择框组件(自定义弹层,全主题化)。
- should_
flip 🔒 - 面板应向上展开的条件:视口下方空间不足,且上方空间比下方更宽余。
- wrap_
index 🔒 - 键盘导航的循环索引:在
len个选项中从cur移动delta(±1),越界回绕。