mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
fix: 优化组件渲染方式
This commit is contained in:
@@ -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
@@ -0,0 +1,4 @@
|
||||
export enum ChatCategoryEnum {
|
||||
BAR = '柱状图',
|
||||
PIE = '饼图'
|
||||
}
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user