【Vue】VUE-echarts-V3如何设置主题?

想在VUE-echarts-V3中设置主题,请问该如何设置主题

<template>

<div id="echarts" v-show="echartsParams.echartsShow">

<vue-echarts :option="echartsData" :resizable="true" :theme="dark"></vue-echarts>

</div>

</template>

<script type='text/ecmascript-6'>

import vueEcharts from 'vue-echarts-v3'

// let echarts = require('echarts/lib/echarts')

require('echarts/theme/dark')

export default {

name: 'echarts',

components: {vueEcharts},

props: ['echartsData', 'echartsParams']

}

</script>

<style lang='stylus' rel='stylesheet/stylus'>

</style>

【Vue】VUE-echarts-V3如何设置主题?

回答

import IEcharts from 'vue-echarts-v3'

import 'echarts/theme/macarons.js'

<IECharts

:option="option"

theme="macarons"

/>

昨天刚问 https://github.com/xlsdg/vue-...

你试试使用import theme from 'echarts/theme/dark'
调用的时候用theme['dark'],我没有用vue-echarts 所以不知道情况一样不一样

以上是 【Vue】VUE-echarts-V3如何设置主题? 的全部内容, 来源链接: utcz.com/a/76898.html

回到顶部