/*! For license information please see 4764.54d30f37.js.LICENSE.txt */ (self.webpackChunk=self.webpackChunk||[]).push([["4764"],{29820:function(n,t,s){"use strict";s.r(t);var a=s("80681");let d=["innerHTML"];t.default={setup:()=>({html:""}),render:()=>((0,a.wg)(),(0,a.iD)("div",{class:"van-doc-markdown-body",innerHTML:'

Card \u5361\u7247

\n

\u4ECB\u7ECD

\n

\u5546\u54C1\u5361\u7247\uFF0C\u7528\u4E8E\u5C55\u793A\u5546\u54C1\u7684\u56FE\u7247\u3001\u4EF7\u683C\u7B49\u4FE1\u606F\u3002

\n

\u5F15\u5165

\n

\u901A\u8FC7\u4EE5\u4E0B\u65B9\u5F0F\u6765\u5168\u5C40\u6CE8\u518C\u7EC4\u4EF6\uFF0C\u66F4\u591A\u6CE8\u518C\u65B9\u5F0F\u8BF7\u53C2\u8003\u7EC4\u4EF6\u6CE8\u518C\u3002

\n
import { createApp } from 'vue';\nimport { Card } from 'vant';\n\nconst app = createApp();\napp.use(Card);\n
\n

\u4EE3\u7801\u6F14\u793A

\n

\u57FA\u7840\u7528\u6CD5

\n
<van-card\n  num="2"\n  price="2.00"\n  desc="\u63CF\u8FF0\u4FE1\u606F"\n  title="\u5546\u54C1\u6807\u9898"\n  thumb="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"\n/>\n
\n

\u8425\u9500\u4FE1\u606F

\n

\u901A\u8FC7 origin-price \u8BBE\u7F6E\u5546\u54C1\u539F\u4EF7\uFF0C\u901A\u8FC7 tag \u8BBE\u7F6E\u5546\u54C1\u5DE6\u4E0A\u89D2\u6807\u7B7E\u3002

\n
<van-card\n  num="2"\n  tag="\u6807\u7B7E"\n  price="2.00"\n  desc="\u63CF\u8FF0\u4FE1\u606F"\n  title="\u5546\u54C1\u6807\u9898"\n  thumb="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"\n  origin-price="10.00"\n/>\n
\n

\u81EA\u5B9A\u4E49\u5185\u5BB9

\n

Card \u7EC4\u4EF6\u63D0\u4F9B\u4E86\u591A\u4E2A\u63D2\u69FD\uFF0C\u53EF\u4EE5\u7075\u6D3B\u5730\u81EA\u5B9A\u4E49\u5185\u5BB9\u3002

\n
<van-card\n  num="2"\n  price="2.00"\n  desc="\u63CF\u8FF0\u4FE1\u606F"\n  title="\u5546\u54C1\u6807\u9898"\n  thumb="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"\n>\n  <template #tags>\n    <van-tag plain type="primary">\u6807\u7B7E</van-tag>\n    <van-tag plain type="primary">\u6807\u7B7E</van-tag>\n  </template>\n  <template #footer>\n    <van-button size="mini">\u6309\u94AE</van-button>\n    <van-button size="mini">\u6309\u94AE</van-button>\n  </template>\n</van-card>\n
\n

API

\n

Props

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\u53C2\u6570\u8BF4\u660E\u7C7B\u578B\u9ED8\u8BA4\u503C
thumb\u5DE6\u4FA7\u56FE\u7247 URLstring-
title\u6807\u9898string-
desc\u63CF\u8FF0string-
tag\u56FE\u7247\u89D2\u6807string-
num\u5546\u54C1\u6570\u91CFnumber | string-
price\u5546\u54C1\u4EF7\u683Cnumber | string-
origin-price\u5546\u54C1\u5212\u7EBF\u539F\u4EF7number | string-
centered\u5185\u5BB9\u662F\u5426\u5782\u76F4\u5C45\u4E2Dbooleanfalse
currency\u8D27\u5E01\u7B26\u53F7string\xa5
thumb-link\u70B9\u51FB\u5DE6\u4FA7\u56FE\u7247\u540E\u8DF3\u8F6C\u7684\u94FE\u63A5\u5730\u5740string-
lazy-load\u662F\u5426\u5F00\u542F\u56FE\u7247\u61D2\u52A0\u8F7D\uFF0C\u987B\u914D\u5408 Lazyload \u7EC4\u4EF6\u4F7F\u7528booleanfalse
\n

Events

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\u4E8B\u4EF6\u540D\u8BF4\u660E\u56DE\u8C03\u53C2\u6570
click\u70B9\u51FB\u65F6\u89E6\u53D1event: MouseEvent
click-thumb\u70B9\u51FB\u81EA\u5B9A\u4E49\u56FE\u7247\u65F6\u89E6\u53D1event: MouseEvent
\n

Slots

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\u540D\u79F0\u8BF4\u660E
title\u81EA\u5B9A\u4E49\u6807\u9898
desc\u81EA\u5B9A\u4E49\u63CF\u8FF0
num\u81EA\u5B9A\u4E49\u6570\u91CF
price\u81EA\u5B9A\u4E49\u4EF7\u683C
origin-price\u81EA\u5B9A\u4E49\u5546\u54C1\u539F\u4EF7
price-top\u81EA\u5B9A\u4E49\u4EF7\u683C\u4E0A\u65B9\u533A\u57DF
bottom\u81EA\u5B9A\u4E49\u4EF7\u683C\u4E0B\u65B9\u533A\u57DF
thumb\u81EA\u5B9A\u4E49\u56FE\u7247
tag\u81EA\u5B9A\u4E49\u56FE\u7247\u89D2\u6807
tags\u81EA\u5B9A\u4E49\u63CF\u8FF0\u4E0B\u65B9\u6807\u7B7E\u533A\u57DF
footer\u81EA\u5B9A\u4E49\u53F3\u4E0B\u89D2\u5185\u5BB9
\n

\u7C7B\u578B\u5B9A\u4E49

\n

\u7EC4\u4EF6\u5BFC\u51FA\u4EE5\u4E0B\u7C7B\u578B\u5B9A\u4E49\uFF1A

\n
import type { CardProps } from 'vant';\n
\n

\u4E3B\u9898\u5B9A\u5236

\n

\u6837\u5F0F\u53D8\u91CF

\n

\u7EC4\u4EF6\u63D0\u4F9B\u4E86\u4E0B\u5217 CSS \u53D8\u91CF\uFF0C\u53EF\u7528\u4E8E\u81EA\u5B9A\u4E49\u6837\u5F0F\uFF0C\u4F7F\u7528\u65B9\u6CD5\u8BF7\u53C2\u8003 ConfigProvider \u7EC4\u4EF6\u3002

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\u540D\u79F0\u9ED8\u8BA4\u503C\u63CF\u8FF0
--van-card-paddingvar(--van-padding-xs) var(--van-padding-md)-
--van-card-font-sizevar(--van-font-size-sm)-
--van-card-text-colorvar(--van-text-color)-
--van-card-backgroundvar(--van-background)-
--van-card-thumb-size88px-
--van-card-thumb-radiusvar(--van-radius-lg)-
--van-card-title-line-height16px-
--van-card-desc-colorvar(--van-text-color-2)-
--van-card-desc-line-heightvar(--van-line-height-md)-
--van-card-price-colorvar(--van-text-color)-
--van-card-origin-price-colorvar(--van-text-color-2)-
--van-card-num-colorvar(--van-text-color-2)-
--van-card-origin-price-font-sizevar(--van-font-size-xs)-
--van-card-price-font-sizevar(--van-font-size-sm)-
--van-card-price-integer-font-sizevar(--van-font-size-lg)-
--van-card-price-fontvar(--van-price-font)-
\n
'},null,8,d))}}}]);