feat:新增图表

This commit is contained in:
mtruning
2022-01-15 21:54:04 +08:00
parent 81881a8ed4
commit 5843388d0b
30 changed files with 234 additions and 29 deletions
@@ -0,0 +1,12 @@
import Number from './index.vue'
import image from '@/assets/images/chart/decorates/number.png'
import { ConfigType } from '@/packages/index.d'
import { ChatCategoryEnum } from '../../index.d'
export const NumberConfig: ConfigType = {
key: 'Number',
title: '数字翻牌',
category: ChatCategoryEnum.MORE,
node: Number,
image
}
@@ -0,0 +1,13 @@
<template>
<div>
天气
</div>
</template>
<script setup lang="ts">
</script>
<style lang="scss" scoped>
</style>
@@ -0,0 +1,12 @@
import Time from './index.vue'
import image from '@/assets/images/chart/decorates/time.png'
import { ConfigType } from '@/packages/index.d'
import { ChatCategoryEnum } from '../../index.d'
export const TimeConfig: ConfigType = {
key: 'Time',
title: '时间',
category: ChatCategoryEnum.MORE,
node: Time,
image
}
@@ -0,0 +1,13 @@
<template>
<div>
天气
</div>
</template>
<script setup lang="ts">
</script>
<style lang="scss" scoped>
</style>
@@ -0,0 +1,12 @@
import Weather from './index.vue'
import image from '@/assets/images/chart/decorates/weather.png'
import { ConfigType } from '@/packages/index.d'
import { ChatCategoryEnum } from '../../index.d'
export const WeatherConfig: ConfigType = {
key: 'Weather',
title: '天气',
category: ChatCategoryEnum.MORE,
node: Weather,
image
}
@@ -0,0 +1,13 @@
<template>
<div>
天气
</div>
</template>
<script setup lang="ts">
</script>
<style lang="scss" scoped>
</style>
@@ -0,0 +1,12 @@
import WeatherTime from './index.vue'
import image from '@/assets/images/chart/decorates/weather_time.png'
import { ConfigType } from '@/packages/index.d'
import { ChatCategoryEnum } from '../../index.d'
export const WeatherTimeConfig: ConfigType = {
key: 'WeatherTime',
title: '天气和时间',
category: ChatCategoryEnum.MORE,
node: WeatherTime,
image
}
@@ -0,0 +1,13 @@
<template>
<div>
天气
</div>
</template>
<script setup lang="ts">
</script>
<style lang="scss" scoped>
</style>
@@ -0,0 +1,6 @@
import { WeatherConfig } from './Weather/index'
import { TimeConfig } from './Time/index'
import { WeatherTimeConfig } from './WeatherTime/index'
import { NumberConfig } from './Number/index'
export default [WeatherConfig, TimeConfig, WeatherTimeConfig, NumberConfig]
@@ -6,7 +6,7 @@ import { ChatCategoryEnum } from '../../index.d'
export const BorderCommonConfig: ConfigType = {
key: 'BorderCommon',
title: '边框',
category: ChatCategoryEnum.Border,
category: ChatCategoryEnum.BORDER,
node: BorderCommon,
image
}
+2 -3
View File
@@ -1,5 +1,4 @@
export enum ChatCategoryEnum {
Border = '边框',
Title = '标题',
Else = '其它'
BORDER = '边框',
MORE = '更多'
}
+2 -1
View File
@@ -1,3 +1,4 @@
import Borders from './Borders'
import Mores from './Mores'
export const DecorateList = [...Borders]
export const DecorateList = [...Borders, ...Mores]
@@ -0,0 +1,12 @@
import TextCloud from './index.vue'
import image from '@/assets/images/chart/informations/words_cloud.png'
import { ConfigType } from '@/packages/index.d'
import { ChatCategoryEnum } from '../../index.d'
export const TextCloudConfig: ConfigType = {
key: 'TextCloud',
title: '词云',
category: ChatCategoryEnum.MORE,
node: TextCloud,
image
}
@@ -0,0 +1,13 @@
<template>
<div>
词云
</div>
</template>
<script setup lang="ts">
</script>
<style lang="scss" scoped>
</style>
@@ -0,0 +1,3 @@
import { TextCloudConfig } from './TextCloud/index'
export default [TextCloudConfig]
@@ -0,0 +1,12 @@
import TitleBevelAngle from './index.vue'
import image from '@/assets/images/chart/informations/title_diamond2.png'
import { ConfigType } from '@/packages/index.d'
import { ChatCategoryEnum } from '../../index.d'
export const TitleBevelAngleConfig: ConfigType = {
key: 'TitleBevelAngle',
title: '斜角标题',
category: ChatCategoryEnum.TITLE,
node: TitleBevelAngle,
image
}
@@ -0,0 +1,13 @@
<template>
<div>
标题
</div>
</template>
<script setup lang="ts">
</script>
<style lang="scss" scoped>
</style>
@@ -5,8 +5,8 @@ import { ChatCategoryEnum } from '../../index.d'
export const TitleCommonConfig: ConfigType = {
key: 'Text',
title: '标题',
title: '普通标题',
category: ChatCategoryEnum.TITLE,
node: TitleCommon,
image
}
}
@@ -0,0 +1,12 @@
import TitlePro from './index.vue'
import image from '@/assets/images/chart/informations/title_main.png'
import { ConfigType } from '@/packages/index.d'
import { ChatCategoryEnum } from '../../index.d'
export const TitleProConfig: ConfigType = {
key: 'TitlePro',
title: '中心标题',
category: ChatCategoryEnum.TITLE,
node: TitlePro,
image
}
@@ -0,0 +1,13 @@
<template>
<div>
标题
</div>
</template>
<script setup lang="ts">
</script>
<style lang="scss" scoped>
</style>
@@ -1,3 +1,5 @@
import { TitleCommonConfig } from './TitleCommon/index'
import { TitleProConfig } from './TitlePro/index'
import { TitleBevelAngleConfig } from './TitleBevelAngle/index'
export default [TitleCommonConfig]
export default [TitleProConfig, TitleCommonConfig, TitleBevelAngleConfig]
+2 -1
View File
@@ -1,4 +1,5 @@
export enum ChatCategoryEnum {
TEXT = '文本',
TITLE = '标题'
TITLE = '标题',
MORE = '更多'
}
+2 -1
View File
@@ -1,4 +1,5 @@
import Texts from './Texts'
import Titles from './Titles'
import Mores from './Mores'
export const InformationList = [...Texts, ...Titles]
export const InformationList = [...Texts, ...Titles, ...Mores]
+10 -4
View File
@@ -6,16 +6,22 @@ export type ConfigType = {
title: string
category: string
node: Component
image: string | (() => Promise<typeof import("*.png")>),
image: string | (() => Promise<typeof import('*.png')>)
[T: string]: unknown
}
export enum PackagesCategoryEnum {
CHARTS = 'CHARTS',
TABLES = 'TABLES',
INFORMATION = 'INFORMATION',
DECORATES = 'DECORATES'
DECORATES = 'DECORATES',
}
export enum PackagesCategoryName {
CHARTS = '图表',
TABLES = '表格',
INFORMATION = '信息',
DECORATES = '小组件',
}
export type PackagesType = {
@@ -23,4 +29,4 @@ export type PackagesType = {
[PackagesCategoryEnum.INFORMATION]: ConfigType[]
[PackagesCategoryEnum.TABLES]: ConfigType[]
[PackagesCategoryEnum.DECORATES]: ConfigType[]
}
}