SListItem <s-list-item>
有序或无序列表中的一个列表项。 SListItem 是 Shopify Polaris <s-list-item> web component 的带类型 Vue 3 wrapper。
ts
import { SListItem } from 'polaris-vue-elements'示例
vue
<script setup>
import { SUnorderedList, SOrderedList, SListItem, SStack } from 'polaris-vue-elements'
</script>
<template>
<SStack direction="inline" gap="large-500" alignItems="start">
<SUnorderedList>
<!-- SListItem is the only accepted child of SUnorderedList/SOrderedList. -->
<SListItem>Free shipping over $50</SListItem>
<SListItem>30-day returns</SListItem>
<SListItem>24/7 customer support</SListItem>
</SUnorderedList>
<SOrderedList>
<SListItem>Add items to your cart</SListItem>
<SListItem>Review your order</SListItem>
<SListItem>Confirm and check out</SListItem>
</SOrderedList>
</SStack>
</template>Props
| Prop | 类型 | 说明 |
|---|---|---|
children | any | 列表项中显示的内容。列表项表示有序或无序列表中的单个条目。 |
id | string | undefined | 元素的唯一标识符。 |
Slots
| Slot | 说明 |
|---|---|
default | 列表项中显示的内容。列表项表示有序或无序列表中的单个条目。 |