spz-filter
When to Use
When filtering and sorting album merchandise is needed, typically used on album pages.
Code Demonstration
Basic Usage
In the selector, we can use simple identifiers to implement some behaviors. The supported identifiers are as follows:
- Use
role="content"to denote the element containing filtering content (required). - Inside the filter content element, the
spz-renderelement with theas="default"attribute represents the default template (required).- If we want a separate
spz-renderfor a particular filtering dimension, change theasattribute's value to the last element of the array split by the.symbol from theparam_nameattribute in the filter data. For example, to display the price dimensionparam_name="filter.v.price"separately, change theasvalue toprice.
- If we want a separate
- Within the filter content element, the
spz-rendertemplate content supports the following behaviors (when the corresponding role attribute is configured, the component will implement the behavior according to the value of the role):role="reset"identifies the reset button of the current template (optional)role="items"identifies elements for multiple selection (optional), for example:spz-selector,select;role="price-min"identifies the input box for the minimum price in a price range (optional), usually aninputbox;role="price-max"identifies the input box for the maximum price in a price range (optional), usually aninputbox;role="selectedCount"indicates the number of options currently selected in the template; the number updates automatically when more/fewer options are selected (optional)role="sortBy"identifies the sorting element (optional), for example:select;role="applyAll"identifies the button to apply all selections/inputs, typically used in the mobile filter popup;
- Within the filter result element, the
spz-rendertemplate'sasattribute rules are consistent with those inside the filter content element, but the supported behaviors are different. The behaviors supported by thespz-rendertemplate in the filter result element are:role="delete"identifies the delete button (optional)role="clearAll"identifies the button to delete all filter results (optional)
Properties
Methods
apply
clearAll
Clears all filter results, no parameters needed.
AI Summary (LLM Ready)
- Component ID:
spz-filter - One-line purpose: Album merchandise selector.
- Detected attribute rows: 0
- Detected method subsections: 2
- Detected event subsections: 0
- Top attribute names: none (needs manual completion)
- Top method names:
apply,clearAll - 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/