feat: 新增主题色选项

This commit is contained in:
MTrun
2022-02-06 01:04:05 +08:00
parent 7b24b90fbc
commit 314daede24
51 changed files with 698 additions and 174 deletions
@@ -26,6 +26,10 @@ export default class Config extends publicConfig implements CreateComponentType
{
data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar'
},
{
data: [130, 130, 312, 268, 155, 117, 160],
type: 'bar'
}
]
})
@@ -1,11 +1,11 @@
<template>
<VChart theme="dark" :option="option" autoresize />
<VChart :theme="themeData" :option="option" autoresize />
</template>
<script setup lang="ts">
import { computed, PropType } from 'vue'
import VChart from 'vue-echarts'
import { use, graphic } from 'echarts/core'
import { use } from 'echarts/core'
import { CanvasRenderer } from 'echarts/renderers'
import { BarChart } from 'echarts/charts'
import {
@@ -16,6 +16,11 @@ import {
import config from './config'
const props = defineProps({
themeData: {
type: Object || String,
default: 'dark',
required: true
},
chartData: {
type: Object as PropType<config>,
required: true