style: 优化类命名,格式化代码结构,优化注释

This commit is contained in:
奔跑的面条
2022-09-12 00:28:13 +08:00
parent 27020b2920
commit ee1b55cad9
39 changed files with 88 additions and 95 deletions
@@ -1,4 +1,4 @@
import { echartOptionProfixHandle, publicConfig } from '@/packages/public'
import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public'
import { BarCommonConfig } from './index'
import { CreateComponentType } from '@/packages/index.d'
import cloneDeep from 'lodash/cloneDeep'
@@ -39,7 +39,7 @@ export const option = {
series: [seriesItem, seriesItem]
}
export default class Config extends publicConfig implements CreateComponentType {
export default class Config extends PublicConfigClass implements CreateComponentType {
public key = BarCommonConfig.key
public chartConfig = cloneDeep(BarCommonConfig)
// 图表配置项
@@ -1,4 +1,4 @@
import { echartOptionProfixHandle, publicConfig } from '@/packages/public'
import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public'
import { BarCrossrangeConfig } from './index'
import { CreateComponentType } from '@/packages/index.d'
import cloneDeep from 'lodash/cloneDeep'
@@ -39,7 +39,7 @@ export const option = {
series: [seriesItem, seriesItem]
}
export default class Config extends publicConfig implements CreateComponentType {
export default class Config extends PublicConfigClass implements CreateComponentType {
public key = BarCrossrangeConfig.key
public chartConfig = cloneDeep(BarCrossrangeConfig)
// 图表配置项
@@ -1,4 +1,4 @@
import { echartOptionProfixHandle, publicConfig } from '@/packages/public'
import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public'
import { LineCommonConfig } from './index'
import { CreateComponentType } from '@/packages/index.d'
import { defaultTheme, chartColorsSearch } from '@/settings/chartThemes/index'
@@ -41,7 +41,7 @@ export const option = {
series: [seriesItem, seriesItem]
}
export default class Config extends publicConfig implements CreateComponentType {
export default class Config extends PublicConfigClass implements CreateComponentType {
public key: string = LineCommonConfig.key
public chartConfig = LineCommonConfig
// 图表配置项
@@ -1,4 +1,4 @@
import { echartOptionProfixHandle, publicConfig } from '@/packages/public'
import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public'
import { LineGradientSingleConfig } from './index'
import { CreateComponentType } from '@/packages/index.d'
import { graphic } from 'echarts/core'
@@ -20,7 +20,7 @@ const options = {
},
xAxis: {
show: true,
type: 'category',
type: 'category'
},
yAxis: {
show: true,
@@ -52,8 +52,7 @@ const options = {
]
}
export default class Config extends publicConfig
implements CreateComponentType {
export default class Config extends PublicConfigClass implements CreateComponentType {
public key: string = LineGradientSingleConfig.key
public chartConfig = LineGradientSingleConfig
// 图表配置项
@@ -1,4 +1,4 @@
import { echartOptionProfixHandle, publicConfig } from '@/packages/public'
import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public'
import { LineGradientsConfig } from './index'
import { CreateComponentType } from '@/packages/index.d'
import { graphic } from 'echarts/core'
@@ -20,7 +20,7 @@ const option = {
},
xAxis: {
show: true,
type: 'category',
type: 'category'
},
yAxis: {
show: true,
@@ -33,7 +33,7 @@ const option = {
smooth: false,
lineStyle: {
width: 3,
type: 'solid',
type: 'solid'
},
areaStyle: {
opacity: 0.8,
@@ -47,7 +47,7 @@ const option = {
color: 'rgba(0,0,0,0)'
}
])
},
}
},
{
type: 'line',
@@ -69,13 +69,12 @@ const option = {
color: 'rgba(0,0,0,0)'
}
])
},
}
}
]
}
export default class Config extends publicConfig
implements CreateComponentType {
export default class Config extends PublicConfigClass implements CreateComponentType {
public key: string = LineGradientsConfig.key
public chartConfig = LineGradientsConfig
// 图表配置项
@@ -1,4 +1,4 @@
import { echartOptionProfixHandle, publicConfig } from '@/packages/public'
import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public'
import { LineLinearSingleConfig } from './index'
import { CreateComponentType } from '@/packages/index.d'
import { defaultTheme, chartColorsSearch } from '@/settings/chartThemes/index'
@@ -19,7 +19,7 @@ export const option = {
},
xAxis: {
show: true,
type: 'category',
type: 'category'
},
yAxis: {
show: true,
@@ -49,13 +49,12 @@ export const option = {
shadowColor: chartColorsSearch[defaultTheme][2],
shadowBlur: 10,
shadowOffsetY: 20
},
}
}
]
}
export default class Config extends publicConfig
implements CreateComponentType {
export default class Config extends PublicConfigClass implements CreateComponentType {
public key: string = LineLinearSingleConfig.key
public chartConfig = LineLinearSingleConfig
// 图表配置项
@@ -1,4 +1,4 @@
import { echartOptionProfixHandle, publicConfig } from '@/packages/public'
import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public'
import { MapChinaConfig } from './index'
import { chartInitConfig } from '@/settings/designSetting'
import { CreateComponentType } from '@/packages/index.d'
@@ -60,7 +60,7 @@ export const option = {
}
]
}
export default class Config extends publicConfig implements CreateComponentType {
export default class Config extends PublicConfigClass implements CreateComponentType {
public key: string = MapChinaConfig.key
public attr = { ...chartInitConfig, w: 750, h: 800, zIndex: -1 }
public chartConfig = MapChinaConfig
@@ -1,4 +1,4 @@
import { echartOptionProfixHandle, publicConfig } from '@/packages/public'
import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public'
import { FunnelConfig } from './index'
import { CreateComponentType } from '@/packages/index.d'
import cloneDeep from 'lodash/cloneDeep'
@@ -53,7 +53,7 @@ export const option = {
]
}
export default class Config extends publicConfig implements CreateComponentType {
export default class Config extends PublicConfigClass implements CreateComponentType {
public key: string = FunnelConfig.key
public chartConfig = cloneDeep(FunnelConfig)
@@ -1,4 +1,4 @@
import { publicConfig } from '@/packages/public'
import { PublicConfigClass } from '@/packages/public'
import { CreateComponentType } from '@/packages/index.d'
import { ProcessConfig } from './index'
import { chartInitConfig } from '@/settings/designSetting'
@@ -53,7 +53,7 @@ export const option = {
offsetDegree: 0
}
export default class Config extends publicConfig implements CreateComponentType {
export default class Config extends PublicConfigClass implements CreateComponentType {
public key = ProcessConfig.key
public attr = { ...chartInitConfig, h: 500, zIndex: -1 }
public chartConfig = cloneDeep(ProcessConfig)
@@ -1,4 +1,4 @@
import { echartOptionProfixHandle, publicConfig } from '@/packages/public'
import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public'
import { RadarConfig } from './index'
import { CreateComponentType } from '@/packages/index.d'
import cloneDeep from 'lodash/cloneDeep'
@@ -43,7 +43,7 @@ export const option = {
]
}
export default class Config extends publicConfig implements CreateComponentType {
export default class Config extends PublicConfigClass implements CreateComponentType {
public key = RadarConfig.key
public chartConfig = cloneDeep(RadarConfig)
// 图表配置项
@@ -1,4 +1,4 @@
import { echartOptionProfixHandle, publicConfig } from '@/packages/public'
import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public'
import { CreateComponentType } from '@/packages/index.d'
import { WaterPoloConfig } from './index'
import cloneDeep from 'lodash/cloneDeep'
@@ -89,7 +89,7 @@ export const option = {
]
}
export default class Config extends publicConfig implements CreateComponentType
export default class Config extends PublicConfigClass implements CreateComponentType
{
public key = WaterPoloConfig.key
public chartConfig = cloneDeep(WaterPoloConfig)
@@ -1,4 +1,4 @@
import { echartOptionProfixHandle, publicConfig } from '@/packages/public'
import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public'
import { PieCircleConfig } from './index'
import { CreateComponentType } from '@/packages/index.d'
@@ -54,7 +54,7 @@ const option = {
]
}
export default class Config extends publicConfig implements CreateComponentType {
export default class Config extends PublicConfigClass implements CreateComponentType {
public key: string = PieCircleConfig.key
public chartConfig = PieCircleConfig
@@ -1,4 +1,4 @@
import { echartOptionProfixHandle, publicConfig } from '@/packages/public'
import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public'
import { PieCommonConfig } from './index'
import { CreateComponentType } from '@/packages/index.d'
import dataJson from './data.json'
@@ -44,7 +44,7 @@ const option = {
]
}
export default class Config extends publicConfig implements CreateComponentType {
export default class Config extends PublicConfigClass implements CreateComponentType {
public key: string = PieCommonConfig.key
public chartConfig = PieCommonConfig