mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-26 08:19:15 +08:00
[bugfix] Card: centered prop not work (#2589)
This commit is contained in:
parent
d9da76677c
commit
905a5891c9
@ -53,6 +53,7 @@ Use slot to custom content.
|
|||||||
| num | Number | `String | Number` | - |
|
| num | Number | `String | Number` | - |
|
||||||
| price | Price | `String | Number` | - |
|
| price | Price | `String | Number` | - |
|
||||||
| origin-price | Origin price | `String | Number` | - |
|
| origin-price | Origin price | `String | Number` | - |
|
||||||
|
| centered | Whether content vertical centered | `String` | `false` |
|
||||||
| currency | Currency symbol | `String` | `¥` |
|
| currency | Currency symbol | `String` | `¥` |
|
||||||
| thumb-link | Thumb link URL | `String` | - |
|
| thumb-link | Thumb link URL | `String` | - |
|
||||||
| lazy-load | Whether to enable thumb lazy load,should register [Lazyload](#/en-US/lazyload) component | `Boolean` | `false` |
|
| lazy-load | Whether to enable thumb lazy load,should register [Lazyload](#/en-US/lazyload) component | `Boolean` | `false` |
|
||||||
|
@ -9,6 +9,7 @@ export default sfc({
|
|||||||
desc: String,
|
desc: String,
|
||||||
thumb: String,
|
thumb: String,
|
||||||
title: String,
|
title: String,
|
||||||
|
centered: Boolean,
|
||||||
lazyLoad: Boolean,
|
lazyLoad: Boolean,
|
||||||
thumbLink: String,
|
thumbLink: String,
|
||||||
num: [Number, String],
|
num: [Number, String],
|
||||||
@ -67,7 +68,7 @@ export default sfc({
|
|||||||
<div class={bem()}>
|
<div class={bem()}>
|
||||||
<div class={bem('header')}>
|
<div class={bem('header')}>
|
||||||
{Thumb}
|
{Thumb}
|
||||||
<div class={bem('content')}>
|
<div class={bem('content', { centered: this.centered })}>
|
||||||
{Title}
|
{Title}
|
||||||
{Desc}
|
{Desc}
|
||||||
{slots.tags}
|
{slots.tags}
|
||||||
|
@ -13,12 +13,6 @@
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&--center,
|
|
||||||
&__thumb {
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__header {
|
&__header {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
@ -29,6 +23,8 @@
|
|||||||
height: 90px;
|
height: 90px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
flex: none;
|
flex: none;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
border: none;
|
border: none;
|
||||||
@ -39,9 +35,15 @@
|
|||||||
|
|
||||||
&__content {
|
&__content {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
display: flex;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 90px;
|
height: 90px;
|
||||||
|
flex-direction: column;
|
||||||
min-width: 0; /* hack for flex box ellipsis */
|
min-width: 0; /* hack for flex box ellipsis */
|
||||||
|
|
||||||
|
&--centered {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__title,
|
&__title,
|
||||||
|
@ -53,6 +53,7 @@ Vue.use(Card);
|
|||||||
| num | 商品数量 | `String | Number` | - | - |
|
| num | 商品数量 | `String | Number` | - | - |
|
||||||
| price | 商品价格 | `String | Number` | - | - |
|
| price | 商品价格 | `String | Number` | - | - |
|
||||||
| origin-price | 商品划线原价 | `String | Number` | - | 1.3.6 |
|
| origin-price | 商品划线原价 | `String | Number` | - | 1.3.6 |
|
||||||
|
| centered | 内容是否垂直居中 | `String` | `false` | - |
|
||||||
| currency | 货币符号 | `String` | `¥` | - |
|
| currency | 货币符号 | `String` | `¥` | - |
|
||||||
| thumb-link | 点击左侧图片后的跳转链接 | `String` | - | 1.3.4 |
|
| thumb-link | 点击左侧图片后的跳转链接 | `String` | - | 1.3.4 |
|
||||||
| lazy-load | 是否开启图片懒加载,须配合 [Lazyload](#/zh-CN/lazyload) 组件使用 | `Boolean` | `false` | 1.5.0 |
|
| lazy-load | 是否开启图片懒加载,须配合 [Lazyload](#/zh-CN/lazyload) 组件使用 | `Boolean` | `false` | 1.5.0 |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user