123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <template>
- <div class="m-card" :class="shadowClass">
- <div class="m-card__header" v-if="$slots.header || header">
- <slot name="header">{{ header }}</slot>
- </div>
- <div class="m-card__body" :style="bodyStyle">
- <slot></slot>
- </div>
- </div>
- </template>
- <script>
- export default {
- name: "mCard"
- };
- </script>
- <script setup>
- import { computed } from 'vue-demi';
- const props = defineProps({
- header: {
- type: String,
- default: '',
- },
- bodyStyle: Object,
- shadow: {
- type: String,
- default: 'always'
- }
- })
- const shadowClass = computed(() => {
- return {
- [`is-shadow-${props.shadow}`]: props.shadow
- }
- })
- </script>
- <style lang="scss" scoped>
- @import '../../styles/components/card.scss';
- </style>
|