Skip to content

SListItem <s-list-item> ​

Một mục bên trong danh sách có thứ tự hoặc không thứ tự. SListItem là Vue 3 wrapper có type cho web component <s-list-item> của Shopify Polaris.

ts
import { SListItem } from 'polaris-vue-elements'

Ví dụ ​

Free shipping over $5030-day returns24/7 customer supportAdd items to your cartReview your orderConfirm and check out
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 ​

PropKiểuMô tả
childrenanyNội dung được hiển thị bên trong list item, đại diện cho một mục trong danh sách có thứ tự hoặc không có thứ tự.
idstring | undefinedĐịnh danh duy nhất của phần tử.

Slots ​

SlotMô tả
defaultNội dung được hiển thị bên trong list item, đại diện cho một mục trong danh sách có thứ tự hoặc không có thứ tự.

Phát hành theo giấy phép MIT. Logo Vue của Evan You, CC BY-NC-SA 4.0.