Skip to content

Object Component

The subForm component (also known as object component) allows nesting sub-forms within forms, making it easier to organize and manage complex form structures. Group components are very suitable for forms that need to be processed in blocks, such as user detailed information, addresses, etc.

Note

Component linkage within sub-forms is recommended to be implemented using Component Linkage or Computing Component Rules.

When operating components within sub-forms, you need to use the sub-form's API. In the parent form, you can get the operation interface of the specified sub-form through the api.getSubForm method.

Example

Listening to Component Events in Sub-form

This example shows how to listen to component events in sub-forms.

Configuration

props

Parameter NameDescriptionTypeDefault Value
rule (Required)Sub-form generation rulesRule[]-
optionsSub-form option configurationObject{submitBtn: false,resetBtn: false}
modelValue (v-model)Sub-form valueObject-
disabledWhether disabledBooleanfalse

events

Event NameDescriptionReturn Value
changeTriggered after value changes-
itemMountedTriggered after sub-form initialization is complete-
[field-eventName]Listen to sub-form emit events, format is sub-form field name concatenated with event name-

FormCreate is an open-source project released under the MIT License. Free for personal and commercial use.