<tap-list-index>
长列表的字母索引栏,类似 iOS 通讯录,点击或滑动时将目标滚动到可见区域。
默认目标是 data-list-index 属性匹配的元素。
Example
html`
<section data-list-index="A">...</section>
<section data-list-index="B">...</section>
<tap-list-index .items=${['A', 'B']}></tap-list-index>
`;API
Shadow DOM; Extends GemElement
Instance Properties
| Property(Attribute) | Reactive | Type |
|---|---|---|
items |
Yes | ListIndexSource<T>[] |
getTarget |
Yes | (item: ListIndexItem<T>) => Element | null | undefined |
select |
Emitter<T | string> |
Other
| Type | Value |
|---|---|
| Event | select |
| Part | item, current, bubble |
