I18nFormField I18N Form Field
业务组件
I18N Form Field — 面向 ERP/企业场景的业务组件。
何时使用
适用于I18N Form Field相关场景。
代码示例
基础用法
tsx
import { I18nFormField } from "@chaos_team/chaos-ui/business"
export function Basic() {
return <I18nFormField />
}API / Props
I18nFormField
| Prop | Type | Default | 说明 |
|---|---|---|---|
className | string | — | 自定义样式类名 |
fieldKey | string | — | Field key / identifier. |
label | string | — | Field label. |
translations | LocaleTranslation[] | — | Translations for each locale. |
onTranslationChange | () => void | — | On translation change. |
multiline | boolean | false | Textarea mode for long text. |
maxLength | number | — | Max character limit. |
readOnly | boolean | false | Read-only mode. |
| ...rest | React.HTMLAttributes | — | 透传原生 DOM 属性 |
注意事项
- Client Component: 使用
"use client",依赖 React hooks/状态,需在客户端渲染。
📘 完整交互式示例与控件属性请查看 Storybook 文档。