<template>
|
<div class="data-board-card-wrapper">
|
<div class="data-board-card-title">{{ title }}</div>
|
<div class="data-board-card-content" :class="contentBetween && 'content-between'">
|
<slot></slot>
|
</div>
|
</div>
|
</template>
|
|
<script setup lang="ts">
|
defineOptions({
|
name: 'DataBoardCard',
|
});
|
|
type Props = {
|
title?: string;
|
contentBetween?: boolean;
|
};
|
|
const props = withDefaults(defineProps<Props>(), {
|
contentBetween: false,
|
});
|
</script>
|
|
<style lang="scss" scoped>
|
@use '@/style/common.scss' as *;
|
|
.data-board-card-wrapper {
|
display: flex;
|
padding: 16px;
|
border: 1px solid var(--el-border-color-light);
|
border-radius: 4px;
|
background-color: #ffffff;
|
flex-direction: column;
|
|
.data-board-card-title {
|
margin-bottom: 12px;
|
font-size: 16px;
|
color: getCssVar('text-color', 'primary');
|
}
|
|
.data-board-card-content {
|
flex: 1;
|
min-height: 0;
|
|
&.content-between {
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
}
|
}
|
}
|
</style>
|