dashboard (#6)

* feat(dashboard): 增加dashboard示例

* feat(chart-ui): 增加图表UI组件库

* feat(dashboard): 完善dashboard示例
This commit is contained in:
jinmao88
2024-06-23 13:41:02 +08:00
committed by GitHub
parent 303a200427
commit 6f0c05dd50
16 changed files with 690 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
<script lang="ts" setup>
import { chart } from '@vben/chart-ui';
defineOptions({ name: 'ChartCard' });
import type { ChartItem } from './typings';
import { onMounted, ref } from 'vue';
interface Props {
item: ChartItem;
}
const chartRef = ref();
onMounted(() => {
chartRef.value.setChart(props.item.option);
});
const props = withDefaults(defineProps<Props>(), {});
</script>
<template>
<div class="rounded-lg border-2 border-solid">
<div class="">
{{ item.title }}
</div>
<chart ref="chartRef" />
</div>
</template>