Compare commits

..

2 Commits

3 changed files with 10 additions and 0 deletions

View File

@ -12,26 +12,32 @@ import { onMounted, ref } from "vue";
const barChartRef = ref(null); const barChartRef = ref(null);
const { categories, seriesData, title, legendList } = defineProps({ const { categories, seriesData, title, legendList } = defineProps({
//
categories: { categories: {
type: Array, type: Array,
required: true, required: true,
}, },
//
seriesData: { seriesData: {
type: Array, type: Array,
required: true, required: true,
}, },
//
title: { title: {
type: String, type: String,
required: true, required: true,
}, },
//
legendList: { legendList: {
type: Array, type: Array,
required: true, required: true,
}, },
//
width: { width: {
type: String, type: String,
default: "100%", default: "100%",
}, },
//
height: { height: {
type: String, type: String,
default: "100%", default: "100%",

View File

@ -14,10 +14,12 @@ import { onMounted, ref } from "vue";
const lineChartRef = ref(null); const lineChartRef = ref(null);
const { categories, seriesData, titleP, legendList } = defineProps({ const { categories, seriesData, titleP, legendList } = defineProps({
//
categories: { categories: {
type: Array, type: Array,
required: true, required: true,
}, },
//
seriesData: { seriesData: {
type: Array, type: Array,
required: true, required: true,
@ -26,6 +28,7 @@ const { categories, seriesData, titleP, legendList } = defineProps({
type: String, type: String,
default: "示例折线图", default: "示例折线图",
}, },
//
legendList: { legendList: {
type: Array, type: Array,
required: true, required: true,

View File

@ -12,6 +12,7 @@ import { onMounted, ref } from "vue";
const pieChartRef = ref(null); const pieChartRef = ref(null);
const { titleP, dataP } = defineProps({ const { titleP, dataP } = defineProps({
//
dataP: { dataP: {
type: Array, type: Array,
default: () => [], default: () => [],