docs: Field docs

This commit is contained in:
luoxiao 2024-08-22 16:59:45 +08:00 committed by luoxiaozero
parent fb98d608ae
commit d50ff53e7e
5 changed files with 42 additions and 14 deletions

View file

@ -38,7 +38,10 @@ view! {
### CheckboxGroup Props
| Name | Type | Default | Description |
| -------- | ------------------------ | -------------------- | ------------------------------------- |
| --- | --- | --- | --- |
| class | `MaybeProp<String>` | `Default::default()` | |
| id | `MaybeProp<String>` | `Default::default()` | |
| name | `MaybeProp<String>` | `Default::default()` | A string specifying a name for the input control. This name is submitted along with the control's value when the form data is submitted. |
| rules | `Vec<CheckboxGroupRule>` | `vec![]` | The rules to validate Field. |
| value | `Model<HashSet<String>>` | `Default::default()` | Sets the value of the checkbox group. |
| children | `Children` | | |

View file

@ -80,6 +80,9 @@ view! {
| Name | Type | Default | Desciption |
| --- | --- | --- | --- |
| class | `MaybeProp<String>` | `Default::default()` | |
| id | `MaybeProp<String>` | `Default::default()` | |
| name | `MaybeProp<String>` | `Default::default()` | A string specifying a name for the input control. This name is submitted along with the control's value when the form data is submitted. |
| rules | `Vec<ComboboxRule>` | `vec![]` | The rules to validate Field. |
| value | `Model<String>` | `Default::default()` | |
| selected_options | `VecModel<String>` | `Default::default()` | Selected option. |
| disabled | `MaybeSignal<bool>` | `false` | Whether the input is disabled. |

View file

@ -106,3 +106,19 @@ view! {
</form>
}
```
### Field Props
| Name | Type | Default | Desciption |
| --- | --- | --- | --- |
| class | `MaybeProp<String>` | `Default::default()` | |
| label | `MaybeProp<String>` | `Default::default()` | The label associated with the field. |
| name | `MaybeProp<String>` | `Default::default()` | A string specifying a name for the input control. This name is submitted along with the control's value when the form data is submitted. |
| orientation | `MaybeSignal<FieldOrientation>` | `FieldOrientation::Vertical` | The orientation of the label relative to the field component. |
| children | `Children` | | |
### FieldContextProvider Props
| Name | Type | Default | Desciption |
| -------- | ---------- | ------- | ---------- |
| children | `Children` | | |

View file

@ -35,8 +35,11 @@ view! {
### RadioGroup Props
| Name | Type | Default | Description |
| -------- | --------------------- | -------------------- | -------------------------------------- |
| --- | --- | --- | --- |
| class | `MaybeProp<String>` | `Default::default()` | |
| id | `MaybeProp<String>` | `Default::default()` | |
| name | `MaybeProp<String>` | `Default::default()` | A string specifying a name for the input control. This name is submitted along with the control's value when the form data is submitted. |
| rules | `Vec<RadioGroupRule>` | `vec![]` | The rules to validate Field. |
| value | `OptionModel<String>` | `Default::default()` | The selected Radio item in this group. |
| name | `MaybeProp<String>` | `None` | The name of this radio group. |
| children | `Children` | | |

View file

@ -17,6 +17,9 @@ view! {
## TimePicker Props
| Name | Type | Default | Description |
| ----- | ------------------------ | -------------------- | ------------------------- |
| --- | --- | --- | --- |
| class | `MaybeProp<String>` | `Default::default()` | |
| id | `MaybeProp<String>` | `Default::default()` | |
| name | `MaybeProp<String>` | `Default::default()` | A string specifying a name for the input control. This name is submitted along with the control's value when the form data is submitted. |
| rules | `Vec<TimePickerRule>` | `vec![]` | The rules to validate Field. |
| value | `OptionModel<NaiveTime>` | `Default::default()` | Set the TimePicker value. |