Card 组件增加 centered 属性 (#54)

This commit is contained in:
neverland
2017-07-18 10:01:00 +08:00
committed by 张敏
parent 97739c9026
commit 570cd24b6b
2 changed files with 5 additions and 2 deletions
+4 -2
View File
@@ -1,5 +1,5 @@
<template>
<div :class="['van-card', { 'van-card--center': !$slots.footer }]">
<div :class="['van-card', { 'van-card--center': centered }]">
<div class="van-card__thumb">
<slot name="thumb">
<img :src="thumb" class="van-card__img" />
@@ -21,10 +21,12 @@
<script>
export default {
name: 'van-card',
props: {
thumb: String,
title: String,
desc: String
desc: String,
centered: Boolean
}
};
</script>