mirror of
https://gitee.com/dromara/go-view.git
synced 2025-04-06 03:58:04 +08:00
fix: 修改左侧图表列表的中文键名问题
This commit is contained in:
parent
d54c9d2388
commit
7262c4af22
@ -1,12 +1,13 @@
|
|||||||
import BarCommon from './index.vue'
|
import BarCommon from './index.vue'
|
||||||
import image from '@/assets/images/chart/charts/bar_x.png'
|
import image from '@/assets/images/chart/charts/bar_x.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const BarCommonConfig: ConfigType = {
|
export const BarCommonConfig: ConfigType = {
|
||||||
key: 'VBarCommon',
|
key: 'VBarCommon',
|
||||||
title: '柱状图',
|
title: '柱状图',
|
||||||
category: ChatCategoryEnum.BAR,
|
category: ChatCategoryEnum.BAR,
|
||||||
|
categoryName: ChatCategoryEnumName.BAR,
|
||||||
node: BarCommon,
|
node: BarCommon,
|
||||||
image: image
|
image: image
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import BarCrossrange from './index.vue'
|
import BarCrossrange from './index.vue'
|
||||||
import image from '@/assets/images/chart/charts/bar_y.png'
|
import image from '@/assets/images/chart/charts/bar_y.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const BarCrossrangefig: ConfigType = {
|
export const BarCrossrangefig: ConfigType = {
|
||||||
key: 'VBarCrossrange',
|
key: 'VBarCrossrange',
|
||||||
title: '横向柱状图',
|
title: '横向柱状图',
|
||||||
category: ChatCategoryEnum.BAR,
|
category: ChatCategoryEnum.BAR,
|
||||||
|
categoryName: ChatCategoryEnumName.BAR,
|
||||||
node: BarCrossrange,
|
node: BarCrossrange,
|
||||||
image: image
|
image: image
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import LineCommon from './index.vue'
|
import LineCommon from './index.vue'
|
||||||
import image from '@/assets/images/chart/charts/line.png'
|
import image from '@/assets/images/chart/charts/line.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const LineCommonConfig: ConfigType = {
|
export const LineCommonConfig: ConfigType = {
|
||||||
key: 'VLineCommon',
|
key: 'VLineCommon',
|
||||||
title: '折线图',
|
title: '折线图',
|
||||||
category: ChatCategoryEnum.LINE,
|
category: ChatCategoryEnum.LINE,
|
||||||
|
categoryName: ChatCategoryEnumName.LINE,
|
||||||
node: LineCommon,
|
node: LineCommon,
|
||||||
image: image
|
image: image
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import LineGradientSingle from './index.vue'
|
import LineGradientSingle from './index.vue'
|
||||||
import image from '@/assets/images/chart/charts/line_gradient_single.png'
|
import image from '@/assets/images/chart/charts/line_gradient_single.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const LineGradientSingleConfig: ConfigType = {
|
export const LineGradientSingleConfig: ConfigType = {
|
||||||
key: 'VLineGradientSingle',
|
key: 'VLineGradientSingle',
|
||||||
title: '折线面积图',
|
title: '折线面积图',
|
||||||
category: ChatCategoryEnum.LINE,
|
category: ChatCategoryEnum.LINE,
|
||||||
|
categoryName: ChatCategoryEnumName.LINE,
|
||||||
node: LineGradientSingle,
|
node: LineGradientSingle,
|
||||||
image: image
|
image: image
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import LineGradients from './index.vue'
|
import LineGradients from './index.vue'
|
||||||
import image from '@/assets/images/chart/charts/line_gradient2.png'
|
import image from '@/assets/images/chart/charts/line_gradient2.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const LineGradientsConfig: ConfigType = {
|
export const LineGradientsConfig: ConfigType = {
|
||||||
key: 'VLineGradientSingle',
|
key: 'VLineGradientSingle',
|
||||||
title: '折线面积图',
|
title: '折线面积图',
|
||||||
category: ChatCategoryEnum.LINE,
|
category: ChatCategoryEnum.LINE,
|
||||||
|
categoryName: ChatCategoryEnumName.LINE,
|
||||||
node: LineGradients,
|
node: LineGradients,
|
||||||
image: image
|
image: image
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import MapChine from './index.vue'
|
import MapChine from './index.vue'
|
||||||
import image from '@/assets/images/chart/charts/map.png'
|
import image from '@/assets/images/chart/charts/map.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const MapChineConfig: ConfigType = {
|
export const MapChineConfig: ConfigType = {
|
||||||
key: 'VMapChine',
|
key: 'VMapChine',
|
||||||
title: '北京地图',
|
title: '北京地图',
|
||||||
category: ChatCategoryEnum.MAP,
|
category: ChatCategoryEnum.MAP,
|
||||||
|
categoryName: ChatCategoryEnumName.MAP,
|
||||||
node: MapChine,
|
node: MapChine,
|
||||||
image: image
|
image: image
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import Funnel from './index.vue'
|
import Funnel from './index.vue'
|
||||||
import image from '@/assets/images/chart/charts/funnel.png'
|
import image from '@/assets/images/chart/charts/funnel.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const FunnelConfig: ConfigType = {
|
export const FunnelConfig: ConfigType = {
|
||||||
key: 'VFunnel',
|
key: 'VFunnel',
|
||||||
title: '漏斗图',
|
title: '漏斗图',
|
||||||
category: ChatCategoryEnum.MORE,
|
category: ChatCategoryEnum.MORE,
|
||||||
|
categoryName: ChatCategoryEnumName.MORE,
|
||||||
node: Funnel,
|
node: Funnel,
|
||||||
image: image
|
image: image
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import Heatmap from './index.vue'
|
import Heatmap from './index.vue'
|
||||||
import image from '@/assets/images/chart/charts/heatmap.png'
|
import image from '@/assets/images/chart/charts/heatmap.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const HeatmapConfig: ConfigType = {
|
export const HeatmapConfig: ConfigType = {
|
||||||
key: 'VHeatmap',
|
key: 'VHeatmap',
|
||||||
title: '热力图',
|
title: '热力图',
|
||||||
category: ChatCategoryEnum.MORE,
|
category: ChatCategoryEnum.MORE,
|
||||||
|
categoryName: ChatCategoryEnumName.MORE,
|
||||||
node: Heatmap,
|
node: Heatmap,
|
||||||
image: image
|
image: image
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import Point from './index.vue'
|
import Point from './index.vue'
|
||||||
import image from '@/assets/images/chart/charts/Point.png'
|
import image from '@/assets/images/chart/charts/Point.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const PointConfig: ConfigType = {
|
export const PointConfig: ConfigType = {
|
||||||
key: 'VPoint',
|
key: 'VPoint',
|
||||||
title: '热力图',
|
title: '热力图',
|
||||||
category: ChatCategoryEnum.MORE,
|
category: ChatCategoryEnum.MORE,
|
||||||
|
categoryName: ChatCategoryEnumName.MORE,
|
||||||
node: Point,
|
node: Point,
|
||||||
image: image
|
image: image
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import Radar from './index.vue'
|
import Radar from './index.vue'
|
||||||
import image from '@/assets/images/chart/charts/radar.png'
|
import image from '@/assets/images/chart/charts/radar.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const RadarConfig: ConfigType = {
|
export const RadarConfig: ConfigType = {
|
||||||
key: 'VRadar',
|
key: 'VRadar',
|
||||||
title: '雷达',
|
title: '雷达',
|
||||||
category: ChatCategoryEnum.MORE,
|
category: ChatCategoryEnum.MORE,
|
||||||
|
categoryName: ChatCategoryEnumName.MORE,
|
||||||
node: Radar,
|
node: Radar,
|
||||||
image: image
|
image: image
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import TreeMap from './index.vue'
|
import TreeMap from './index.vue'
|
||||||
import image from '@/assets/images/chart/charts/tree_map.png'
|
import image from '@/assets/images/chart/charts/tree_map.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const TreeMapConfig: ConfigType = {
|
export const TreeMapConfig: ConfigType = {
|
||||||
key: 'VTreeMap',
|
key: 'VTreeMap',
|
||||||
title: '树形分布',
|
title: '树形分布',
|
||||||
category: ChatCategoryEnum.MORE,
|
category: ChatCategoryEnum.MORE,
|
||||||
|
categoryName: ChatCategoryEnumName.MORE,
|
||||||
node: TreeMap,
|
node: TreeMap,
|
||||||
image: image
|
image: image
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import Variable from './index.vue'
|
import Variable from './index.vue'
|
||||||
import image from '@/assets/images/chart/charts/water_variable.png'
|
import image from '@/assets/images/chart/charts/water_variable.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const VariableConfig: ConfigType = {
|
export const VariableConfig: ConfigType = {
|
||||||
key: 'VVariable',
|
key: 'VVariable',
|
||||||
title: '折线面积图',
|
title: '折线面积图',
|
||||||
category: ChatCategoryEnum.MORE,
|
category: ChatCategoryEnum.MORE,
|
||||||
|
categoryName: ChatCategoryEnumName.MORE,
|
||||||
node: Variable,
|
node: Variable,
|
||||||
image: image
|
image: image
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import PieCommon from './index.vue'
|
import PieCommon from './index.vue'
|
||||||
import image from '@/assets/images/chart/charts/pie.png'
|
import image from '@/assets/images/chart/charts/pie.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const PieCommonConfig: ConfigType = {
|
export const PieCommonConfig: ConfigType = {
|
||||||
key: 'VPieCommon',
|
key: 'VPieCommon',
|
||||||
title: '计量图',
|
title: '计量图',
|
||||||
category: ChatCategoryEnum.PIE,
|
category: ChatCategoryEnum.PIE,
|
||||||
|
categoryName: ChatCategoryEnumName.PIE,
|
||||||
node: PieCommon,
|
node: PieCommon,
|
||||||
image
|
image
|
||||||
}
|
}
|
||||||
|
12
src/packages/components/Chart/index.d.ts
vendored
12
src/packages/components/Chart/index.d.ts
vendored
@ -1,7 +1,15 @@
|
|||||||
export enum ChatCategoryEnum {
|
export enum ChatCategoryEnum {
|
||||||
|
BAR = 'bar',
|
||||||
|
PIE = 'pie',
|
||||||
|
LINE = 'line',
|
||||||
|
MAP = 'map',
|
||||||
|
MORE = 'more'
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum ChatCategoryEnumName {
|
||||||
BAR = '柱状图',
|
BAR = '柱状图',
|
||||||
PIE = '饼图',
|
PIE = '饼图',
|
||||||
LINE = '折线图',
|
LINE = '折线图',
|
||||||
MORE = '更多',
|
MAP = '地图',
|
||||||
MAP = '地图'
|
MORE = '更多'
|
||||||
}
|
}
|
@ -1,12 +1,13 @@
|
|||||||
import Number from './index.vue'
|
import Number from './index.vue'
|
||||||
import image from '@/assets/images/chart/decorates/number.png'
|
import image from '@/assets/images/chart/decorates/number.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum,ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const NumberConfig: ConfigType = {
|
export const NumberConfig: ConfigType = {
|
||||||
key: 'VNumber',
|
key: 'VNumber',
|
||||||
title: '数字翻牌',
|
title: '数字翻牌',
|
||||||
category: ChatCategoryEnum.MORE,
|
category: ChatCategoryEnum.MORE,
|
||||||
|
categoryName: ChatCategoryEnumName.MORE,
|
||||||
node: Number,
|
node: Number,
|
||||||
image
|
image
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import Time from './index.vue'
|
import Time from './index.vue'
|
||||||
import image from '@/assets/images/chart/decorates/time.png'
|
import image from '@/assets/images/chart/decorates/time.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum,ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const TimeConfig: ConfigType = {
|
export const TimeConfig: ConfigType = {
|
||||||
key: 'VTime',
|
key: 'VTime',
|
||||||
title: '时间',
|
title: '时间',
|
||||||
category: ChatCategoryEnum.MORE,
|
category: ChatCategoryEnum.MORE,
|
||||||
|
categoryName: ChatCategoryEnumName.MORE,
|
||||||
node: Time,
|
node: Time,
|
||||||
image
|
image
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import Weather from './index.vue'
|
import Weather from './index.vue'
|
||||||
import image from '@/assets/images/chart/decorates/weather.png'
|
import image from '@/assets/images/chart/decorates/weather.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum,ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const WeatherConfig: ConfigType = {
|
export const WeatherConfig: ConfigType = {
|
||||||
key: 'VWeather',
|
key: 'VWeather',
|
||||||
title: '天气',
|
title: '天气',
|
||||||
category: ChatCategoryEnum.MORE,
|
category: ChatCategoryEnum.MORE,
|
||||||
|
categoryName: ChatCategoryEnumName.MORE,
|
||||||
node: Weather,
|
node: Weather,
|
||||||
image
|
image
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import WeatherTime from './index.vue'
|
import WeatherTime from './index.vue'
|
||||||
import image from '@/assets/images/chart/decorates/weather_time.png'
|
import image from '@/assets/images/chart/decorates/weather_time.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum,ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const WeatherTimeConfig: ConfigType = {
|
export const WeatherTimeConfig: ConfigType = {
|
||||||
key: 'VWeatherTime',
|
key: 'VWeatherTime',
|
||||||
title: '天气和时间',
|
title: '天气和时间',
|
||||||
category: ChatCategoryEnum.MORE,
|
category: ChatCategoryEnum.MORE,
|
||||||
|
categoryName: ChatCategoryEnumName.MORE,
|
||||||
node: WeatherTime,
|
node: WeatherTime,
|
||||||
image
|
image
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import BorderCommon from './index.vue'
|
import BorderCommon from './index.vue'
|
||||||
import image from '@/assets/images/chart/decorates/border.png'
|
import image from '@/assets/images/chart/decorates/border.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum,ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const BorderCommonConfig: ConfigType = {
|
export const BorderCommonConfig: ConfigType = {
|
||||||
key: 'VBorderCommon',
|
key: 'VBorderCommon',
|
||||||
title: '边框',
|
title: '边框',
|
||||||
category: ChatCategoryEnum.BORDER,
|
category: ChatCategoryEnum.BORDER,
|
||||||
|
categoryName: ChatCategoryEnumName.BORDER,
|
||||||
node: BorderCommon,
|
node: BorderCommon,
|
||||||
image
|
image
|
||||||
}
|
}
|
||||||
|
5
src/packages/components/Decorate/index.d.ts
vendored
5
src/packages/components/Decorate/index.d.ts
vendored
@ -1,4 +1,9 @@
|
|||||||
export enum ChatCategoryEnum {
|
export enum ChatCategoryEnum {
|
||||||
|
BORDER = 'BORDER',
|
||||||
|
MORE = 'MORE'
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum ChatCategoryEnumName {
|
||||||
BORDER = '边框',
|
BORDER = '边框',
|
||||||
MORE = '更多'
|
MORE = '更多'
|
||||||
}
|
}
|
@ -1,12 +1,13 @@
|
|||||||
import Image from './index.vue'
|
import Image from './index.vue'
|
||||||
import image from '@/assets/images/chart/informations/photo.png'
|
import image from '@/assets/images/chart/informations/photo.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum,ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const ImageConfig: ConfigType = {
|
export const ImageConfig: ConfigType = {
|
||||||
key: 'VImage',
|
key: 'VImage',
|
||||||
title: '图片',
|
title: '图片',
|
||||||
category: ChatCategoryEnum.MORE,
|
category: ChatCategoryEnum.MORE,
|
||||||
|
categoryName: ChatCategoryEnumName.MORE,
|
||||||
node: Image,
|
node: Image,
|
||||||
image
|
image
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import TextCloud from './index.vue'
|
import TextCloud from './index.vue'
|
||||||
import image from '@/assets/images/chart/informations/words_cloud.png'
|
import image from '@/assets/images/chart/informations/words_cloud.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum,ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const TextCloudConfig: ConfigType = {
|
export const TextCloudConfig: ConfigType = {
|
||||||
key: 'VTextCloud',
|
key: 'VTextCloud',
|
||||||
title: '词云',
|
title: '词云',
|
||||||
category: ChatCategoryEnum.MORE,
|
category: ChatCategoryEnum.MORE,
|
||||||
|
categoryName: ChatCategoryEnumName.MORE,
|
||||||
node: TextCloud,
|
node: TextCloud,
|
||||||
image
|
image
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import TextCommon from './index.vue'
|
import TextCommon from './index.vue'
|
||||||
import image from '@/assets/images/chart/informations/text_static.png'
|
import image from '@/assets/images/chart/informations/text_static.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum,ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const TextCommonConfig: ConfigType = {
|
export const TextCommonConfig: ConfigType = {
|
||||||
key: 'VText',
|
key: 'VText',
|
||||||
title: '文字',
|
title: '文字',
|
||||||
category: ChatCategoryEnum.TEXT,
|
category: ChatCategoryEnum.TEXT,
|
||||||
|
categoryName: ChatCategoryEnumName.TEXT,
|
||||||
node: TextCommon,
|
node: TextCommon,
|
||||||
image
|
image
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import TitleBevelAngle from './index.vue'
|
import TitleBevelAngle from './index.vue'
|
||||||
import image from '@/assets/images/chart/informations/title_diamond2.png'
|
import image from '@/assets/images/chart/informations/title_diamond2.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum,ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const TitleBevelAngleConfig: ConfigType = {
|
export const TitleBevelAngleConfig: ConfigType = {
|
||||||
key: 'VTitleBevelAngle',
|
key: 'VTitleBevelAngle',
|
||||||
title: '斜角标题',
|
title: '斜角标题',
|
||||||
category: ChatCategoryEnum.TITLE,
|
category: ChatCategoryEnum.TITLE,
|
||||||
|
categoryName: ChatCategoryEnumName.TITLE,
|
||||||
node: TitleBevelAngle,
|
node: TitleBevelAngle,
|
||||||
image
|
image
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import TitleCommon from './index.vue'
|
import TitleCommon from './index.vue'
|
||||||
import image from '@/assets/images/chart/informations/title_diamond.png'
|
import image from '@/assets/images/chart/informations/title_diamond.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum,ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const TitleCommonConfig: ConfigType = {
|
export const TitleCommonConfig: ConfigType = {
|
||||||
key: 'VText',
|
key: 'VText',
|
||||||
title: '普通标题',
|
title: '普通标题',
|
||||||
category: ChatCategoryEnum.TITLE,
|
category: ChatCategoryEnum.TITLE,
|
||||||
|
categoryName: ChatCategoryEnumName.TITLE,
|
||||||
node: TitleCommon,
|
node: TitleCommon,
|
||||||
image
|
image
|
||||||
}
|
}
|
@ -1,12 +1,13 @@
|
|||||||
import TitlePro from './index.vue'
|
import TitlePro from './index.vue'
|
||||||
import image from '@/assets/images/chart/informations/title_main.png'
|
import image from '@/assets/images/chart/informations/title_main.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../../index.d'
|
import { ChatCategoryEnum,ChatCategoryEnumName } from '../../index.d'
|
||||||
|
|
||||||
export const TitleProConfig: ConfigType = {
|
export const TitleProConfig: ConfigType = {
|
||||||
key: 'VTitlePro',
|
key: 'VTitlePro',
|
||||||
title: '中心标题',
|
title: '中心标题',
|
||||||
category: ChatCategoryEnum.TITLE,
|
category: ChatCategoryEnum.TITLE,
|
||||||
|
categoryName: ChatCategoryEnumName.TITLE,
|
||||||
node: TitlePro,
|
node: TitlePro,
|
||||||
image
|
image
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,10 @@
|
|||||||
export enum ChatCategoryEnum {
|
export enum ChatCategoryEnum {
|
||||||
|
TEXT = 'TEXT',
|
||||||
|
TITLE = 'TITLE',
|
||||||
|
MORE = 'MORE'
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum ChatCategoryEnumName {
|
||||||
TEXT = '文本',
|
TEXT = '文本',
|
||||||
TITLE = '标题',
|
TITLE = '标题',
|
||||||
MORE = '更多'
|
MORE = '更多'
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import TableCategory from './index.vue'
|
import TableCategory from './index.vue'
|
||||||
import image from '@/assets/images/chart/Tables/tables_categary.png'
|
import image from '@/assets/images/chart/Tables/tables_categary.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../index.d'
|
import { ChatCategoryEnum, ChatCategoryEnumName } from '../index.d'
|
||||||
|
|
||||||
export const TableCategoryConfig: ConfigType = {
|
export const TableCategoryConfig: ConfigType = {
|
||||||
key: 'VTableCategory',
|
key: 'VTableCategory',
|
||||||
title: '归类表格',
|
title: '归类表格',
|
||||||
category: ChatCategoryEnum.table,
|
category: ChatCategoryEnum.TABLE,
|
||||||
|
categoryName: ChatCategoryEnumName.TABLE,
|
||||||
node: TableCategory,
|
node: TableCategory,
|
||||||
image
|
image
|
||||||
}
|
}
|
7
src/packages/components/Table/index.d.ts
vendored
Normal file
7
src/packages/components/Table/index.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
export enum ChatCategoryEnum {
|
||||||
|
TABLE = 'TABLE',
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum ChatCategoryEnumName {
|
||||||
|
TABLE = '表格',
|
||||||
|
}
|
@ -1,12 +1,13 @@
|
|||||||
import TableCommon from './index.vue'
|
import TableCommon from './index.vue'
|
||||||
import image from '@/assets/images/chart/Tables/tables.png'
|
import image from '@/assets/images/chart/Tables/tables.png'
|
||||||
import { ConfigType } from '@/packages/index.d'
|
import { ConfigType } from '@/packages/index.d'
|
||||||
import { ChatCategoryEnum } from '../index.d'
|
import { ChatCategoryEnum, ChatCategoryEnumName } from '../index.d'
|
||||||
|
|
||||||
export const TableCommonConfig: ConfigType = {
|
export const TableCommonConfig: ConfigType = {
|
||||||
key: 'VTableCommon',
|
key: 'VTableCommon',
|
||||||
title: '表格',
|
title: '表格',
|
||||||
category: ChatCategoryEnum.table,
|
category: ChatCategoryEnum.TABLE,
|
||||||
|
categoryName: ChatCategoryEnumName.TABLE,
|
||||||
node: TableCommon,
|
node: TableCommon,
|
||||||
image
|
image
|
||||||
}
|
}
|
3
src/packages/components/Tables/index.d.ts
vendored
3
src/packages/components/Tables/index.d.ts
vendored
@ -1,3 +0,0 @@
|
|||||||
export enum ChatCategoryEnum {
|
|
||||||
table = '表格',
|
|
||||||
}
|
|
1
src/packages/index.d.ts
vendored
1
src/packages/index.d.ts
vendored
@ -5,6 +5,7 @@ export type ConfigType = {
|
|||||||
key: string
|
key: string
|
||||||
title: string
|
title: string
|
||||||
category: string
|
category: string
|
||||||
|
categoryName: string
|
||||||
node: Component
|
node: Component
|
||||||
image: string | (() => Promise<typeof import('*.png')>)
|
image: string | (() => Promise<typeof import('*.png')>)
|
||||||
[T: string]: unknown
|
[T: string]: unknown
|
||||||
|
@ -2,7 +2,7 @@ import { PackagesCategoryEnum, PackagesType } from '@/packages/index.d'
|
|||||||
import { ChartList } from '@/packages/components/Chart/index'
|
import { ChartList } from '@/packages/components/Chart/index'
|
||||||
import { DecorateList } from '@/packages/components/Decorate/index'
|
import { DecorateList } from '@/packages/components/Decorate/index'
|
||||||
import { InformationList } from '@/packages/components/Information/index'
|
import { InformationList } from '@/packages/components/Information/index'
|
||||||
import { TableList } from '@/packages/components/Tables/index'
|
import { TableList } from '@/packages/components/Table/index'
|
||||||
|
|
||||||
// 所有图表
|
// 所有图表
|
||||||
let packagesList: PackagesType = {
|
let packagesList: PackagesType = {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<!-- 每个小模块的公共样式 -->
|
||||||
<div class="go-content-box" :class="[`bg-depth${depth}`, flex && 'flex']">
|
<div class="go-content-box" :class="[`bg-depth${depth}`, flex && 'flex']">
|
||||||
<div v-if="showTop" class="top go-mt-0 go-flex-no-wrap">
|
<div v-if="showTop" class="top go-mt-0 go-flex-no-wrap">
|
||||||
<n-space class="go-flex-no-wrap" :size="5">
|
<n-space class="go-flex-no-wrap" :size="5">
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<!-- 每一项组件的渲染 -->
|
||||||
<div class="item-box" v-for="(item, index) in menuOptions" :key="index">
|
<div class="item-box" v-for="(item, index) in menuOptions" :key="index">
|
||||||
<div class="list-header">
|
<div class="list-header">
|
||||||
<AppleControlBtn :mini="true" :disabled="true"></AppleControlBtn>
|
<AppleControlBtn :mini="true" :disabled="true"></AppleControlBtn>
|
||||||
@ -40,7 +41,7 @@ $centerHeight: 100px;
|
|||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border: 1px solid rgba(0, 0, 0, 0);
|
border: 1px solid rgba(0, 0, 0, 0);
|
||||||
@include filter-bg-color("background-color2");
|
@include filter-bg-color('background-color2');
|
||||||
@extend .go-transition;
|
@extend .go-transition;
|
||||||
&:hover {
|
&:hover {
|
||||||
@include hover-border-color('background-color4');
|
@include hover-border-color('background-color4');
|
||||||
@ -53,7 +54,7 @@ $centerHeight: 100px;
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 2px 15px;
|
padding: 2px 15px;
|
||||||
@include filter-bg-color("background-color3");
|
@include filter-bg-color('background-color3');
|
||||||
&-text {
|
&-text {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
import { reactive, ref, watch } from 'vue'
|
|
||||||
import { ConfigType } from '@/packages/index.d'
|
|
||||||
|
|
||||||
export const useHandleOptions = (packages) => {
|
|
||||||
watch(
|
|
||||||
// @ts-ignore
|
|
||||||
() => props.selectOptions,
|
|
||||||
(newData: { list: ConfigType[] }) => {
|
|
||||||
if (!newData) return
|
|
||||||
newData.list.forEach((e: ConfigType) => {
|
|
||||||
const value: ConfigType[] = (packages.categorys as any)[e.category]
|
|
||||||
// @ts-ignore
|
|
||||||
packages.categorys[e.category] =
|
|
||||||
value && value.length ? [...value, e] : [e]
|
|
||||||
})
|
|
||||||
for (const val in packages.categorys) {
|
|
||||||
packages.menuOptions.push({
|
|
||||||
key: val,
|
|
||||||
label: val
|
|
||||||
})
|
|
||||||
}
|
|
||||||
selectValue.value = packages.menuOptions[0]['key']
|
|
||||||
},
|
|
||||||
{
|
|
||||||
deep: true,
|
|
||||||
immediate: true
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<!-- 侧边栏和数据分发处理 -->
|
||||||
<div class="go-chart-common">
|
<div class="go-chart-common">
|
||||||
<n-menu
|
<n-menu
|
||||||
v-show="hidePackageOneCategory"
|
v-show="hidePackageOneCategory"
|
||||||
@ -48,8 +49,11 @@ let packages = reactive<{
|
|||||||
selectOptions: {},
|
selectOptions: {},
|
||||||
// 分类归档
|
// 分类归档
|
||||||
categorys: {
|
categorys: {
|
||||||
// 全部
|
// todo 先用中文, 后面需要换成关键key
|
||||||
'全部': []
|
all: []
|
||||||
|
},
|
||||||
|
categoryNames: {
|
||||||
|
all: '所有'
|
||||||
},
|
},
|
||||||
// 分类归档数量
|
// 分类归档数量
|
||||||
categorysNum: 0,
|
categorysNum: 0,
|
||||||
@ -76,17 +80,19 @@ watch(
|
|||||||
newData.list.forEach((e: ConfigType) => {
|
newData.list.forEach((e: ConfigType) => {
|
||||||
const value: ConfigType[] = (packages.categorys as any)[e.category]
|
const value: ConfigType[] = (packages.categorys as any)[e.category]
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
packages.categorys[e.category] = (value && value.length ? [...value, e] : [e])
|
packages.categorys[e.category] = value && value.length ? [...value, e] : [e]
|
||||||
packages.categorys['全部'].push(e)
|
packages.categoryNames[e.category] = e.categoryName
|
||||||
|
packages.categorys['all'].push(e)
|
||||||
})
|
})
|
||||||
for (const val in packages.categorys) {
|
for (const val in packages.categorys) {
|
||||||
packages.categorysNum += 1
|
packages.categorysNum += 1
|
||||||
packages.menuOptions.push({
|
packages.menuOptions.push({
|
||||||
key: val,
|
key: val,
|
||||||
label: val
|
label: packages.categoryNames[val]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
setSelectOptions(packages.categorys)
|
setSelectOptions(packages.categorys)
|
||||||
|
// 默认选中处理
|
||||||
selectValue.value = packages.menuOptions[0]['key']
|
selectValue.value = packages.menuOptions[0]['key']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -105,13 +111,13 @@ const clickItemHandle = (key: string) => {
|
|||||||
/* 此高度与 ContentBox 组件关联*/
|
/* 此高度与 ContentBox 组件关联*/
|
||||||
$topHeight: 36px;
|
$topHeight: 36px;
|
||||||
$menuWidth: 65px;
|
$menuWidth: 65px;
|
||||||
@include go("chart-common") {
|
@include go('chart-common') {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: calc(100vh - #{$--header-height} - #{$topHeight});
|
height: calc(100vh - #{$--header-height} - #{$topHeight});
|
||||||
.chart-menu-width {
|
.chart-menu-width {
|
||||||
width: $menuWidth;
|
width: $menuWidth;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
@include filter-bg-color("background-color2-shallow");
|
@include filter-bg-color('background-color2-shallow');
|
||||||
}
|
}
|
||||||
.chart-content-list {
|
.chart-content-list {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<!-- 左侧所有组件的展示列表 -->
|
||||||
<ContentBox
|
<ContentBox
|
||||||
class="go-content-charts"
|
class="go-content-charts"
|
||||||
:class="{ scoped: !getCharts }"
|
:class="{ scoped: !getCharts }"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user