Skip to content

Select ​

VSelect is the low-level Base Kit select component for forms, filters, and secondary business wrappers. The H5 / full Vue wrapper and the native Registry component installed by --target weapp target different runtimes; use the API section for the version you consume.

Demo ​

Default fulfillment centerAffects inventory and shipping fees
Current center
Hangzhou center

H5 / Full Vue Wrapper ​

The H5 Registry entry and full Vue wrapper use picker mode by default. Their controlled contract uses v-model:value, value, update:value, and valueChange.

Multiple Selection And Confirm ​

Multiple selection confirms draft changes by default. Set :confirmable="false" to apply selections immediately.

Search And Dropdown ​

Use filterable to type and filter local options directly in the Select field; the open panel does not render a second search input. Use mode="dropdown" for dropdown presentation.

Readonly And Disabled ​

readonly keeps the component operable: it can still open, close, and browse options, but it never updates the selected value or emits clear or multiple-confirm commits. Switching to readonly while a panel is open also discards an unconfirmed draft. disabled blocks opening and value mutation and does not provide a readonly browsing entry.

On H5, a readonly filterable field uses the native readonly input contract.

Props ​

PropTypeDefaultDescription
valuestring | number | Array<string | number>undefinedSelected value
optionsVSelectOption[][]Options
mode'picker' | 'dropdown''picker'Presentation mode
placeholderstring'请选择'Placeholder text
disabledbooleanfalseDisabled state
readonlybooleanfalseReadonly state
clearablebooleanfalseShows a clear action
multiplebooleanfalseEnables multiple selection
maxnumberundefinedMaximum selected count
filterablebooleanfalseFilters local options directly from the Select field
confirmablebooleantrueConfirms draft changes in multiple mode
filterOption(query, option) => booleanundefinedCustom local filter
loadingbooleanfalseLoading display
emptyTextstring'暂无数据'Empty state text

Events ​

EventPayloadDescription
update:valuestring | number | Array<string | number> | undefinedSelected value updated
valueChangestring | number | Array<string | number> | undefinedSelected value changed
clearvoidCleared
openvoidOpened
closevoidClosed
confirmArray<string | number>Multiple selection confirmed
cancelvoidCancelled
searchstringSearch input changed
limit{ max: number }Maximum selected count exceeded

Native Registry Weapp ​

--target weapp installs the native Wevu SFC at src/components/ui/select.vue with a smaller runtime contract. readonly can still open, close, and browse options, but it does not update the selected value; the clear action and filter input are unavailable. Because a native mini-program input cannot reliably express the same readonly contract, filterable + readonly uses the button-style trigger.

Multiple selection has no draft or confirmation commit: every option click updates the value immediately. The bottom completion (完成) button only closes the panel; it does not commit again or emit a confirmation event.

Reopening a filterable field keeps the selected label until typing starts; clearing the search does not clear the selection. Tapping outside closes the panel and restores the selected label. In single-selection mode, choosing any enabled option closes the panel, including the current option; an unchanged value does not emit a duplicate value update.

While open, the selected label uses the muted text color until search input starts. Typing or closing the panel restores the normal text color; borders, icons, and focus indicators retain their opacity.

Props ​

PropTypeDefaultDescription
valuestring | number | Array<string | number>undefinedSelected value
optionsArray<{ label: string; value: string | number; disabled?: boolean }>[]Native options
placeholderstring'请选择'Placeholder text
disabledbooleanfalseBlocks opening and value changes
readonlybooleanfalseAllows browsing but blocks value changes, clearing, and filter input
clearablebooleanfalseShows the clear action for an editable selected value after click or focus opens the panel; hides it when closed
multiplebooleanfalseEnables multiple selection with immediate per-option commits
filterablebooleanfalsePerforms a local label-contains match and emits search input

Events ​

EventPayloadDescription
update:valuestring | number | Array<string | number> | undefinedSelected value updated
changestring | number | Array<string | number> | undefinedEmitted with each value update
clearvoidSelection cleared
searchstringFilter input changed

Native Registry Weapp does not provide mode, max, confirmable, filterOption, loading, or emptyText, and it does not emit valueChange, open, close, confirm, cancel, or limit.

Wrapper boundary

Grouped options, remote search, and async paging belong in secondary wrappers. Business components should wrap VSelect to create UserSelect, DepartmentSelect, CitySelect, and ProductSelect.