From 5381a970e6dcbecfb071efc36ec6f7080293b7e0 Mon Sep 17 00:00:00 2001 From: ycy <2861518472@qq.com> Date: Tue, 9 Apr 2024 16:42:45 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=88=20style:=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/echarts/bar.vue | 6 ++++++ src/components/echarts/line.vue | 3 +++ src/components/echarts/pie.vue | 1 + 3 files changed, 10 insertions(+) diff --git a/src/components/echarts/bar.vue b/src/components/echarts/bar.vue index b4a916b..7d94e15 100644 --- a/src/components/echarts/bar.vue +++ b/src/components/echarts/bar.vue @@ -12,26 +12,32 @@ import { onMounted, ref } from "vue"; const barChartRef = ref(null); const { categories, seriesData, title, legendList } = defineProps({ + // 横坐标 categories: { type: Array, required: true, }, + // 纵坐标 seriesData: { type: Array, required: true, }, + // 标题 title: { type: String, required: true, }, + // 图例 legendList: { type: Array, required: true, }, + // 宽度 width: { type: String, default: "100%", }, + // 高度 height: { type: String, default: "100%", diff --git a/src/components/echarts/line.vue b/src/components/echarts/line.vue index 4875089..3e21e69 100644 --- a/src/components/echarts/line.vue +++ b/src/components/echarts/line.vue @@ -14,10 +14,12 @@ import { onMounted, ref } from "vue"; const lineChartRef = ref(null); const { categories, seriesData, titleP, legendList } = defineProps({ + // 横坐标 categories: { type: Array, required: true, }, + // 纵坐标 seriesData: { type: Array, required: true, @@ -26,6 +28,7 @@ const { categories, seriesData, titleP, legendList } = defineProps({ type: String, default: "示例折线图", }, + // 图例 legendList: { type: Array, required: true, diff --git a/src/components/echarts/pie.vue b/src/components/echarts/pie.vue index a34ecbb..8343c39 100644 --- a/src/components/echarts/pie.vue +++ b/src/components/echarts/pie.vue @@ -12,6 +12,7 @@ import { onMounted, ref } from "vue"; const pieChartRef = ref(null); const { titleP, dataP } = defineProps({ + // 图表数据 dataP: { type: Array, default: () => [],