fix: 优化组件渲染方式

This commit is contained in:
MTrun
2022-01-14 22:07:02 +08:00
parent 02c3f7478d
commit 3e511069b5
35 changed files with 359 additions and 232 deletions
@@ -0,0 +1,12 @@
import node from './index.vue'
import image from '@/assets/images/chart/pie.png'
import { ConfigType } from '@/packages/index.d'
import { ChatCategoryEnum } from '../../index.d'
export const pieCommonConfig: ConfigType = {
key: 'PieCommon',
title: '饼图',
category: ChatCategoryEnum.PIE,
node: node,
image: image
}
@@ -0,0 +1,13 @@
<template>
<div>
饼图渲染
</div>
</template>
<script setup lang="ts">
</script>
<style lang="scss" scoped>
</style>
@@ -0,0 +1,3 @@
import { pieCommonConfig } from './PieCommon/index'
export default [pieCommonConfig]
@@ -1,11 +1,13 @@
import barCommon from './index.vue'
import barImg from '@/assets/images/chart/bar_y.png'
import image from '@/assets/images/chart/bar_y.png'
import { ConfigType } from '@/packages/index.d'
import { ChatCategoryEnum } from '../../index.d'
// 柱状图
export const barCommonConfig: ConfigType = {
key: 'Bar',
key: 'BarCommon',
title: '基础',
category: ChatCategoryEnum.BAR,
node: barCommon,
image: barImg
image: image
}
@@ -0,0 +1,3 @@
import { barCommonConfig } from './BarCommon/index'
export default [barCommonConfig]
+4
View File
@@ -0,0 +1,4 @@
export enum ChatCategoryEnum {
BAR = '柱状图',
PIE = '饼图'
}
+3 -2
View File
@@ -1,3 +1,4 @@
import { barCommonConfig } from './bar/barCommon/index'
import Bar from './Bar'
import Pie from './Pie'
export const BarList = [barCommonConfig]
export const ChartList = [...Bar, ...Pie]
@@ -1,11 +1,12 @@
import BorderCommon from './index.vue'
import barImg from '@/assets/images/chart/bar_y.png'
import image from '@/assets/images/chart/static.png'
import { ConfigType } from '@/packages/index.d'
import { ChatCategoryEnum } from '../../index.d'
// 柱状图
export const barCommonConfig: ConfigType = {
export const borderCommonConfig: ConfigType = {
key: 'Border',
title: '柱状图',
title: '边框',
category: ChatCategoryEnum.Border,
node: BorderCommon,
coverGraph: barImg
image: image
}
@@ -1,6 +1,6 @@
<template>
<div>
柱状图组件渲染
边框
</div>
</template>
@@ -0,0 +1,3 @@
import { borderCommonConfig } from './BorderCommon/index'
export default [borderCommonConfig]
+3
View File
@@ -0,0 +1,3 @@
export enum ChatCategoryEnum {
Border = '边框',
}
+2 -2
View File
@@ -1,3 +1,3 @@
import { barCommonConfig } from './border/borderCommon/index'
import Border from './Border'
export const BarList = [barCommonConfig]
export const DecorateList = [...Border]