Updated on 2025-03-24 GMT+08:00

select

Configuration Item Description

Table 1 Configuration item description

Parameter

Type

Mandatory

Example

Description

type

String

Yes

type: "select"

Configuration item type.

value

String

No

value: "defaultValue"

Default value.

name

String

Yes

name: "commProps.myString"

The value of this field is bidirectionally bound to the value of commProps.myString in advanceEditvm.

label

Object

No

label: {"zh_CN": "Chinese label", "en_US": "En label"}

Label of a configuration item, which needs to be internationalized.

tip

Object

No

tip: {zh_CN: "Chinese tip," en_US: "English tip"}

Tip icon. When a configuration item is complex, you can add some tip content.

noToolTip

Boolean

No

noToolTip: false

Whether the tag has el-tooltip. The default value is false.

disabled

Function | Boolean

No

disabled: true or (data, field, vm) => boolean

Whether to disable the function. You can customize the function to determine whether to disable the function based on the values of other options. If true is returned, the function is disabled.

showFunc

Function

No

showFunc: function(vm) { return vm.commProps.showTitle; }

Whether to display the configuration item. You can customize the function to determine whether to display the configuration item based on the values of other options. If true is returned, the function definition is displayed.

options

Objet

Yes

options: [{"label": {"zh_CN": "Enable","en_US": "Enable"},"value": "primary"},{"label": {"zh_CN": "dashed","en_US": "dashed"},"value": "primary"}]

Options.

placeholder

Object

No

placeholder: {"zh_CN": "Please select","en_US": "Please select"}

Placeholder.

filterable

Boolean

No

filterable: false

Whether filtering is enabled. The default value is false.

allowCreate

Boolean

No

allowCreate: false

Whether to allow users to create items. This parameter must be used together with filterable. The default value is false.

multiple

Boolean

No

multiple: false

Whether to enable multi-choice. The default value is false.

noClearable

Boolean

No

noClearable: true

Whether to allow clearing.

remote

Boolean

No

remote: false

Whether remote filtering is used.

fetchData

Function

No

() => ()

Remote filtering method.

Event

Table 2 Events

Event Name

Method In Configuration Item

Description

Callback Parameter

change

change

Triggered when the value changes.

(value, data, field)

Configuration Example

The following is an example of the select configuration. The configuration effect is shown in Figure 1.

{
	type: 'select',
	name: 'commProps.mySelect',
	value: 'Border',
	label: {
		zh_CN: 'Border',
		en_US: 'Border'
	},
	options: [{
			value: 'Full',
			label: {
				zh_CN: 'Full',
				en_US: 'Full'
			}
		},
		{
			value: 'Corner',
			label: {
				zh_CN: 'Corner',
				en_US: 'Corner'
			}
		},
		{
			value: 'No Border',
			label: {
				zh_CN: 'No border',
				en_US: 'No Border'
			}
		}
	]
}
Figure 1 Effect