spz-selector
When to use
- When you need to scroll the currently selected content into the visible area after selection.
- When you need to save the selection record, and it does not return to the initial value after refreshing the page.
Code demonstration
Basic usage
The most basic usage, defaulting to select the first option.
Maintain selected status
Maintain the status of the last selection after refreshing the page.
Mouse hover on option
Display the value of the option hovered over by the mouse.
Scroll into the viewport visible range
Select the button, switch the option being selected, scroll to the visible range of the viewport when the current option is not in the viewport.
Properties
Option properties
Methods
toggle
Events
event object data
select
- In single selection mode, this event is automatically triggered when an option changes from unselected to selected.
- In multiple selection mode, this event is automatically triggered when the selected status of an option changes.
mouseover
This event is automatically triggered when the mouse hovers over an option.
mouseout
This event is automatically triggered when the mouse moves out of an option.
AI Summary (LLM Ready)
- Component ID:
spz-selector - One-line purpose: Select from a group of lists.
- Detected attribute rows: 0
- Detected method subsections: 1
- Detected event subsections: 4
- Top attribute names: none (needs manual completion)
- Top method names:
toggle - Top event names:
select,mouseover,mouseout - Reading order: start from usage/examples, then verify attributes, methods, and events.
- Related docs: /en/guide/actions-and-events/ , /en/guide/layouts/