goview_vue/src/packages/index.d.ts

35 lines
809 B
TypeScript
Raw Normal View History

2022-01-14 16:17:14 +08:00
import { Component } from '@/router/types'
// import { ConfigType } from '@/packages/index.d'
export type ConfigType = {
key: string
title: string
2022-01-14 22:07:02 +08:00
category: string
categoryName: string
2022-01-25 11:09:32 +08:00
package: string
2022-01-14 16:17:14 +08:00
node: Component
2022-01-15 21:54:04 +08:00
image: string | (() => Promise<typeof import('*.png')>)
2022-01-14 16:17:14 +08:00
[T: string]: unknown
}
2022-01-14 22:07:02 +08:00
export enum PackagesCategoryEnum {
2022-01-25 11:09:32 +08:00
CHARTS = 'Charts',
TABLES = 'Tables',
INFORMATION = 'Informations',
DECORATES = 'Decorates',
2022-01-15 21:54:04 +08:00
}
export enum PackagesCategoryName {
CHARTS = '图表',
TABLES = '表格',
INFORMATION = '信息',
DECORATES = '小组件',
2022-01-14 16:17:14 +08:00
}
2022-01-14 22:07:02 +08:00
export type PackagesType = {
[PackagesCategoryEnum.CHARTS]: ConfigType[]
2022-01-15 12:50:00 +08:00
[PackagesCategoryEnum.INFORMATION]: ConfigType[]
2022-01-14 22:07:02 +08:00
[PackagesCategoryEnum.TABLES]: ConfigType[]
[PackagesCategoryEnum.DECORATES]: ConfigType[]
2022-01-15 21:54:04 +08:00
}