update Card
@muei 更新了一下
This commit is contained in:
parent
b0a9eb4e2c
commit
19d4135239
2 changed files with 11 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<Card style="width:350px" v-bind:padding="0">
|
||||
<Card style="width:350px">
|
||||
<p slot="title">
|
||||
<Icon type="ios-film-outline"></Icon>
|
||||
经典电影
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
</template>
|
||||
<script>
|
||||
const prefixCls = 'ivu-card';
|
||||
const defaultPadding = 16;
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
@ -22,7 +23,10 @@
|
|||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
padding: Number
|
||||
padding: {
|
||||
type: Number,
|
||||
default: defaultPadding
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
@ -51,14 +55,13 @@
|
|||
return `${prefixCls}-body`;
|
||||
},
|
||||
bodyStyles () {
|
||||
let padding = this.padding;
|
||||
if (this.padding !== undefined) {
|
||||
padding += 'px';
|
||||
if (this.padding !== defaultPadding) {
|
||||
return {
|
||||
padding,
|
||||
};
|
||||
padding: `${this.padding}px`
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
|
|
Loading…
Add table
Reference in a new issue