main.vue 493 B

1234567891011121314151617181920212223
  1. <template>
  2. <div class="el-card" :class="shadow ? 'is-' + shadow + '-shadow' : 'is-always-shadow'">
  3. <div class="el-card__header" v-if="$slots.header || header">
  4. <slot name="header">{{ header }}</slot>
  5. </div>
  6. <div class="el-card__body" :style="bodyStyle">
  7. <slot></slot>
  8. </div>
  9. </div>
  10. </template>
  11. <script>
  12. export default {
  13. name: 'ElCard',
  14. props: {
  15. header: {},
  16. bodyStyle: {},
  17. shadow: {
  18. type: String
  19. }
  20. }
  21. };
  22. </script>