bixi
Version:
企业级中后台前端解决方案
33 lines (27 loc) • 1.49 kB
Markdown
---
type: Basic
title: Form
subtitle: 表单
cols: 2
order: 3
---
```ts
import { BixiFormModule } from '@bixi/core/form';
```
## API
### bixi-form-item
对 [nz-form-item](https://ng-zorro.gitee.io/components/form/zh#api) 的简易封装
| 参数 | 说明 | 类型 | 默认值 |
|----|----|----|-----|
| `[required]` | 当前项是否为必填,仅影响样式 | `boolean` | `false` |
| `[noColon]` | 是否不显示 label 后面的冒号 | `boolean` | `false` |
| `[for]` | label 标签的 for 属性 | `string` | - |
| `[validateStatus]` | 会根据传入的 FormControl 或 NgModel 自动生成校验状态 | `'success' | 'warning' | 'error' | 'validating'` | 第一个 FormControl 的状态 |
| `[hasFeedback]` | 配合 nzValidateStatus 属性使用,展示校验状态图标 | `boolean` | `false` |
| `[extra]` | 用于显示表单额外提示信息 | `string | TemplateRef<void>` | - |
| `[successTip]` | 校验状态 success 时提示信息 | `string | TemplateRef<{ $implicit: FormControl | NgModel }>` | - |
| `[warningTip]` | 校验状态 warning 时提示信息 | `string | TemplateRef<{ $implicit: FormControl | NgModel }>` | - |
| `[errorTip]` | 校验状态 error 时提示信息 | `string | TemplateRef<{ $implicit: FormControl | NgModel }>` | - |
| `[validatingTip]` | 正在校验时提示信息 | `string | TemplateRef<{ $implicit: FormControl | NgModel }>` | - |
| `[ls]` | Label 的 Span 值 | `number` | `6` |
| `[cs]` | Control 的 Span 值 | `number` | `18` |