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
+14 -2
View File
@@ -4,11 +4,23 @@ import { Component } from '@/router/types'
export type ConfigType = {
key: string
title: string
category: string
node: Component
image: string
[T: string]: unknown
}
export type PackagesType = {
Charts: ConfigType[]
export enum PackagesCategoryEnum {
CHARTS = 'CHARTS',
TABLES = 'TABLES',
TEXTS = 'TEXTS',
DECORATES = 'DECORATES'
}
export type PackagesType = {
[PackagesCategoryEnum.CHARTS]: ConfigType[]
[PackagesCategoryEnum.TEXTS]: ConfigType[]
[PackagesCategoryEnum.TABLES]: ConfigType[]
[PackagesCategoryEnum.DECORATES]: ConfigType[]
}