feat: 新增数据校验,数据导入导出

This commit is contained in:
mtruning
2022-03-19 23:28:33 +08:00
parent 80c5856732
commit 285fff6add
11 changed files with 270 additions and 66 deletions
@@ -2,8 +2,9 @@ import { echartOptionProfixHandle, publicConfig } from '@/packages/public'
import { BarCommonConfig } from './index'
import { CreateComponentType } from '@/packages/index.d'
import cloneDeep from 'lodash/cloneDeep'
import dataJson from './data.json'
export const includes = ['legend', 'xAxis', 'yAxis', 'dataset']
export const includes = ['legend', 'xAxis', 'yAxis']
export const option = {
tooltip: {
@@ -25,6 +26,7 @@ export const option = {
show: true,
type: 'value'
},
dataset: { ...dataJson },
series: [
{
type: 'bar',
@@ -43,6 +43,7 @@ use([
])
const option = computed(() => {
return setData(mergeTheme(props.chartConfig.option, props.themeSetting, includes), dataJson)
// TODO dataset的数据要设计一下,不能这样把数据进行监听,太耗性能
return mergeTheme(props.chartConfig.option, props.themeSetting, includes)
})
</script>