mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
feat: 新增图表独立配置混合
This commit is contained in:
@@ -5,7 +5,7 @@ import omit from 'lodash/omit'
|
||||
|
||||
export const includes = ['legend', 'xAxis', 'yAxis']
|
||||
|
||||
const options = echartOptionProfixHandle({
|
||||
const option = {
|
||||
legend: {
|
||||
show: true,
|
||||
},
|
||||
@@ -23,18 +23,13 @@ const options = echartOptionProfixHandle({
|
||||
name: 'data1',
|
||||
type: 'line',
|
||||
data: [120, 200, 150, 80, 70, 110, 130]
|
||||
},
|
||||
{
|
||||
name: 'data2',
|
||||
type: 'line',
|
||||
data: [130, 130, 312, 268, 155, 117, 160]
|
||||
}
|
||||
]
|
||||
}, includes)
|
||||
}
|
||||
|
||||
export default class Config extends publicConfig implements CreateComponentType {
|
||||
public key: string = LineCommonConfig.key
|
||||
public chartConfig = omit(LineCommonConfig, ['node'])
|
||||
// 图表配置项
|
||||
public option = options
|
||||
public option = echartOptionProfixHandle(option, includes)
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
<template>
|
||||
<div>配置项目</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import LineCommon from './index.vue'
|
||||
import Configuration from './config.vue'
|
||||
import image from '@/assets/images/chart/charts/line.png'
|
||||
import { ConfigType, PackagesCategoryEnum } from '@/packages/index.d'
|
||||
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
|
||||
@@ -10,5 +11,6 @@ export const LineCommonConfig: ConfigType = {
|
||||
categoryName: ChatCategoryEnumName.LINE,
|
||||
package: PackagesCategoryEnum.CHARTS,
|
||||
node: LineCommon,
|
||||
conNode: () => Configuration,
|
||||
image: image
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user