> For AI agents: the complete documentation index is available at /apps-plugin/docs/llms.txt, the full documentation bundle is available at /apps-plugin/docs/llms-full.txt.

# 确认订单卡

`CheckoutCard` 用于承载商品或服务的订单信息和后续操作，适合交易前的订单核对、下单确认和支付确认。


![CheckoutCard 确认订单卡效果](//lf-flow-web-cdn.doubao.com/obj/flow-doubao/goofy_deploy_edenx/flow/doubao-apps--plugin-doc/static/image/checkout-card.61ee219051.png)

## 示例

```tsx
import { CheckoutCard, type CheckoutCardProductItem } from '@doubao-dev/template';

const productItems: CheckoutCardProductItem[] = [
  {
    key: 'set-001',
    tagText: '新',
    tagTone: 'highlight',
    title: '双人下午茶套餐',
    spec: '2 杯饮品 + 2 款甜点',
    imageSrc: 'https://example.com/afternoon-tea.png',
    price: '¥68',
    quantity: 1
  },
  {
    key: 'coffee-001',
    title: '榛果拿铁',
    spec: '少糖 · 热饮',
    price: '¥28',
    quantity: 2,
    showChevron: false
  }
];

export default function AfternoonTeaCheckoutCard() {
  return (
    <CheckoutCard
      productItems={productItems}
      infoItems={[
        { key: 'store', label: '提单门店', value: '朝阳大悦城店' },
        { key: 'time', label: '预计时间', value: '今天 15:30', valueExtra: '到店自取' }
      ]}
      feeItems={[
        { key: 'discount', label: '优惠', value: '-¥12' },
        { key: 'package', label: '包装费', value: '¥2' },
        { key: 'service', label: '服务费', value: '¥0' }
      ]}
      totalLabel="合计"
      totalPrice="¥126"
      footer={{
        secondaryActionButton: {
          text: '修改',
          onClick: () => console.log('edit')
        },
        primaryActionButton: {
          text: '提交订单',
          onClick: () => console.log('submit')
        }
      }}
    />
  );
}
```

## 主要 Props

| Prop                        | 类型                          | 说明           |
| --------------------------- | --------------------------- | ------------ |
| `header`                    | `TemplateCardHeaderProps`   | 标题栏及右侧操作入口   |
| `productItems`              | `CheckoutCardProductItem[]` | 单个或多个商品摘要    |
| `infoItems`                 | `CheckoutCardInfoItem[]`    | 提单信息列表       |
| `feeItems`                  | `CheckoutCardFeeItem[]`     | 费用明细，也用于优惠信息 |
| `totalLabel` / `totalPrice` | `string` / `TemplateText`   | 合计标签和价格      |
| `footer`                    | `TemplateCardFooterProps`   | 底部主、次操作按钮    |

## 使用说明

- `productItems` 支持单个或多个商品。常用字段包括 `title`、`tagText`、`tagTone`、`spec`、`imageSrc`、`image`、`pricePrefix`、`price`、`quantity`、`showChevron` 和 `onClick`；`tagText` 展示在标题前，`tagTone="highlight"` 使用强调色。
- `image` 只支持直接传入的 `<image />` 或 `<svg />`，优先级高于 `imageSrc`。
- `infoItems` 的 `value` 和 `valueExtra` 均支持 `TemplateText`，使用相同样式并与左侧 label 的首行对齐。
- `feeItems`、`totalLabel` 和 `totalPrice` 作为一个整体配置费用汇总，最多展示两行；优惠信息也通过 `feeItems` 传入。
- 底部按钮使用 `footer.primaryActionButton` 和 `footer.secondaryActionButton`。
