Commit 6d090ebf6a9fbc4f485c6b0139ac0a413ee58a7a
1 parent
fb8a7b3f
style(card): padding with number
Showing
2 changed files
with
6 additions
and
7 deletions
Show diff stats
examples/routers/card.vue
src/components/card/card.vue
... | ... | @@ -22,10 +22,7 @@ |
22 | 22 | type: Boolean, |
23 | 23 | default: false |
24 | 24 | }, |
25 | - padding: { | |
26 | - type: Boolean, | |
27 | - default: true | |
28 | - } | |
25 | + padding: Number | |
29 | 26 | }, |
30 | 27 | data () { |
31 | 28 | return { |
... | ... | @@ -54,9 +51,11 @@ |
54 | 51 | return `${prefixCls}-body`; |
55 | 52 | }, |
56 | 53 | bodyStyles () { |
57 | - if (!this.padding) { | |
54 | + let padding = this.padding | |
55 | + if (this.padding !== undefined) { | |
56 | + padding += 'px' | |
58 | 57 | return { |
59 | - padding: 0 | |
58 | + padding | |
60 | 59 | }; |
61 | 60 | } |
62 | 61 | return ''; | ... | ... |