Represents a scrollable picker. It contains one or more scrollable lists, each displaying distinct values.
Since: 1.0.0
Attributes
| Name | Type | Default Value | Mandatory | Description |
|---|---|---|---|---|
| mode | string | selector | No | Picker type. - selector: common picker - multiSelector: multi-column picker - time: time selector - data: date selector - region: region picker |
| disabled | boolean | false | No | Whether the component is disabled. |
| bindcancel | eventhandle | - | No | Event triggered when the selection is canceled. |
In addition to the preceding common properties, picker has different properties for different modes.
mode = selector: common picker
| Name | Type | Default Value | Description |
|---|---|---|---|
| range | Array<string> | Array<Object> | [] | Value range. Valid when mode is set to selector or multiSelector. |
| range-key | string | - | When range is an object array, you can use range-key to specify the key value in the object as the content to be displayed in the selector. |
| value | number | 0 | Index of the selected item within the range. The index is zero-based. |
| bindchange | eventhandle | - | Event triggered when value changes. The format is event.detail = {value}. |
mode = multiSelector: multi-column picker
| Name | Type | Default Value | Description |
|---|---|---|---|
| range | Array<string> | Array<Object> | [] | Value range. Valid when mode is set to selector or multiSelector. |
| range-key | string | - | When range is an object array, you can use range-key to specify the key value in the object as the content to be displayed in the selector. |
| value | Array<number> | [] | Index of the selected item within the range. The index is zero-based. |
| bindchange | eventhandle | - | Event triggered when value changes. The format is event.detail = {value}. |
| bindcolumnchange | eventhandle | - | Event triggered when the column is changed. |
mode = time: time picker
| Name | Type | Description |
|---|---|---|
| value | string | Selected time. Format: hh:mm. |
| start | string | Start time of the valid time range. Format: hh:mm. |
| end | string | End time of the valid time range. Format: hh:mm. |
| bindchange | eventhandle | Event triggered when the value changes. |
mode = date: date picker
| Name | Type | Default Value | Description |
|---|---|---|---|
| value | string | Current day | Selected date. Format: YYYY-MM-DD. |
| start | string | - | Start date of the valid date range. Format: YYYY-MM-DD. |
| end | string | - | End date of the valid date range. Format: YYYY-MM-DD. |
| bindchange | eventhandle | - | Event triggered when value changes. The format is event.detail = {value}. |