diff --git a/packages/card/en-US.md b/packages/card/en-US.md index 90a879e10..96451a01a 100644 --- a/packages/card/en-US.md +++ b/packages/card/en-US.md @@ -22,7 +22,8 @@ Vue.use(Card); ``` #### Advanced Usage -Use `slot` to custom content. + +Use slot to custom content. ```html {slots.thumb || (this.lazyLoad ? ( @@ -44,17 +49,17 @@ export default sfc({ const Desc = slots.desc || (this.desc &&
{this.desc}
); - const Price = (slots.price || isDef(this.price)) && ( + const Price = showPrice && (
{slots.price || `${this.currency} ${this.price}`}
); - const OriginPrice = isDef(this.originPrice) && ( -
{`${this.currency} ${this.originPrice}`}
+ const OriginPrice = showOriginPrice && ( +
+ {slots['origin-price'] || `${this.currency} ${this.originPrice}`} +
); - const Num = (slots.num || isDef(this.num)) && ( -
{slots.num || `x ${this.num}`}
- ); + const Num = showNum &&
{slots.num || `x ${this.num}`}
; const Footer = slots.footer &&
{slots.footer}
; diff --git a/packages/card/zh-CN.md b/packages/card/zh-CN.md index 2e338ea59..4f7a1d089 100644 --- a/packages/card/zh-CN.md +++ b/packages/card/zh-CN.md @@ -22,7 +22,8 @@ Vue.use(Card); ``` #### 高级用法 -可以通过具名`slot`添加定制内容 + +可以通过具名插槽添加定制内容 ```html