element/packages/card/src/main.vue

24 lines
493 B
Vue
Raw Normal View History

2016-08-16 10:51:53 +00:00
<template>
<div class="el-card" :class="shadow ? 'is-' + shadow + '-shadow' : 'is-always-shadow'">
2016-10-20 10:46:58 +00:00
<div class="el-card__header" v-if="$slots.header || header">
2016-08-16 10:51:53 +00:00
<slot name="header">{{ header }}</slot>
</div>
<div class="el-card__body" :style="bodyStyle">
<slot></slot>
</div>
</div>
</template>
<script>
export default {
name: 'ElCard',
props: {
header: {},
bodyStyle: {},
shadow: {
type: String
}
}
2016-08-16 10:51:53 +00:00
};
</script>