Skip to content

STableCell <s-table-cell> ​

테이블 행 안의 셀 하나입니다. STableCell은(는) Shopify Polaris <s-table-cell> web component를 위한 타입이 지정된 Vue 3 wrapper입니다.

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

예시 ​

OrderCustomerTotalStatus#1001Alex Morgan$120.00Fulfilled#1002Sam Rivera$45.50Pending#1003Jamie Lee$310.25Cancelled
vue
<script setup>
import {
  STable,
  STableHeaderRow,
  STableHeader,
  STableBody,
  STableRow,
  STableCell,
  SBadge,
} from 'polaris-vue-elements'
</script>

<template>
  <STable variant="auto">
    <STableHeaderRow>
      <STableHeader listSlot="primary">Order</STableHeader>
      <STableHeader listSlot="secondary">Customer</STableHeader>
      <STableHeader format="currency">Total</STableHeader>
      <STableHeader>Status</STableHeader>
    </STableHeaderRow>
    <STableBody>
      <STableRow>
        <!-- STableCell holds one field's value; it can contain any content, including
             other components like SBadge. -->
        <STableCell>#1001</STableCell>
        <STableCell>Alex Morgan</STableCell>
        <STableCell>$120.00</STableCell>
        <STableCell><SBadge tone="success">Fulfilled</SBadge></STableCell>
      </STableRow>
      <STableRow>
        <STableCell>#1002</STableCell>
        <STableCell>Sam Rivera</STableCell>
        <STableCell>$45.50</STableCell>
        <STableCell><SBadge tone="warning">Pending</SBadge></STableCell>
      </STableRow>
      <STableRow>
        <STableCell>#1003</STableCell>
        <STableCell>Jamie Lee</STableCell>
        <STableCell>$310.25</STableCell>
        <STableCell><SBadge tone="critical">Cancelled</SBadge></STableCell>
      </STableRow>
    </STableBody>
  </STable>
</template>

Props ​

Prop타입설명
childrenany테이블 셀 안에 표시되는 콘텐츠로, 테이블 그리드 구조의 단일 데이터 포인트를 나타냅니다.
idstring | undefined요소의 고유 식별자입니다.

Slots ​

Slot설명
default테이블 셀 안에 표시되는 콘텐츠로, 테이블 그리드 구조의 단일 데이터 포인트를 나타냅니다.

MIT 라이선스로 배포됩니다. Vue 로고: Evan You, CC BY-NC-SA 4.0.