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']
|
||||
|
||||
const option = echartOptionProfixHandle({
|
||||
const option = {
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: 'item'
|
||||
@@ -17,7 +17,7 @@ const option = echartOptionProfixHandle({
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
radius: ['40%', '65%'],
|
||||
center: ['50%', '60%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
@@ -49,7 +49,7 @@ const option = echartOptionProfixHandle({
|
||||
]
|
||||
}
|
||||
]
|
||||
}, includes)
|
||||
}
|
||||
|
||||
export default class Config extends publicConfig implements CreateComponentType {
|
||||
public key: string = PieCommonConfig.key
|
||||
@@ -57,5 +57,5 @@ export default class Config extends publicConfig implements CreateComponentType
|
||||
public chartConfig = omit(PieCommonConfig, ['node'])
|
||||
|
||||
// 图表配置项
|
||||
public option = option
|
||||
public option = echartOptionProfixHandle(option, includes)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<template>
|
||||
<div>配置项目</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import PieCommon from './index.vue'
|
||||
import Configuration from './config.vue'
|
||||
import image from '@/assets/images/chart/charts/pie.png'
|
||||
import { ConfigType, PackagesCategoryEnum } from '@/packages/index.d'
|
||||
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
|
||||
@@ -10,5 +11,6 @@ export const PieCommonConfig: ConfigType = {
|
||||
categoryName: ChatCategoryEnumName.PIE,
|
||||
package: PackagesCategoryEnum.CHARTS,
|
||||
node: PieCommon,
|
||||
conNode: () => Configuration,
|
||||
image
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user