Source List

带标题的来源列表,以标签或行展示,并带有“显示更多”切换。也可折叠为一个带堆叠标记和数量的标签,点击即可打开列表。

可用框架
  • Angular: 可用
  • Vue: 可用
  • React: 可用
  • React Native: 暂不可用

用法

Sources
Harbour Lane kickoff · Mar 3Pricing review · Mar 5Team retro · Mar 9
Sources5
  • Harbour Lane kickoffMar 3
  • Pricing reviewMar 5
  • Team retroMar 9

导入

ts
import {
  SoneSourceListComponent,
  SoneSourceListItemDirective,
  SoneSourceListTriggerComponent,
} from "@surface-one/angular/source-list";

API 参考

SoneSourceListComponent组件

选择器
sone-source-list
输入
名称类型 默认值
itemsreadonly T[][]
trackBy必填(item: T) => string—
variantSourceListVariant"row"
sizeSourceListSize"default"
labelstring""
ariaLabelstring | nullnull
showCountbooleanfalse
limitnumber | nullnull
columns1 | 21
listboolean | nullnull

SoneSourceListItemDirective指令

选择器
ng-template[soneSourceListItem]
输入
名称类型 默认值
soneSourceListItemOfreadonly T[] | null | undefinedundefined

SoneSourceListTriggerComponent组件

`button[soneSourceListTrigger]` — the sources behind an answer folded into one small chip: up to three stacked marks (projected: favicons, `<sone-avatar>`s, marks) and a count (“6 sources”). It is a plain button: open the full `<sone-source-list>` from it (a popover, a sheet or a disclosure) and wire `aria-expanded` / `aria-controls` for what it opens.

选择器
button[soneSourceListTrigger]
输入
名称类型 默认值
count

How many sources there are (the count on the chip).

number0