spz-area
When to Use
When you need to select from a set of related data, such as country, province, and phone area code. It's commonly used on address book pages.
Code Demonstration
Basic Usage
Basic usage. Normally use country, province, and areacode three selection boxes to link together. Instructions for use:
- When it is
provinceorareacode, you need to specify acountry-idto mark and link with elements that have thecountryattribute. - When a user selects a country region, the province selection data will automatically be replaced with the province data of the current country, and the mobile phone area code will automatically switch to the current selected country's mobile phone area code.
- When the country or province corresponding element does not have an
inputhidden field written, thecountryorprovinceattribute will be used as thenameattribute value of theinputto generate a default hidden field, the value being an empty string or the currently selected value.
Attributes
AI Summary (LLM Ready)
- Component ID:
spz-area - One-line purpose: Implement cascading selection.
- Detected attribute rows: 4
- Detected method subsections: 0
- Detected event subsections: 0
- Top attribute names:
country-id,country,province,areacode - Top method names: none (needs manual completion)
- Top event names: none (needs manual completion)
- Reading order: start from usage/examples, then verify attributes, methods, and events.
- Related docs: /en/guide/actions-and-events/ , /en/guide/layouts/