mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
featr: 新增图层选中的样式
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { getUUID } from '@/utils'
|
||||
import { BarCommonConfig } from './index'
|
||||
import { ConfigType } from '@/packages/index.d'
|
||||
import { ConfigType, CreateComponentType } from '@/packages/index.d'
|
||||
import omit from 'lodash/omit'
|
||||
|
||||
export default class Config {
|
||||
private id: string = getUUID()
|
||||
private key: string = BarCommonConfig.key
|
||||
export default class Config implements CreateComponentType {
|
||||
public id: string = getUUID()
|
||||
public key: string = BarCommonConfig.key
|
||||
|
||||
chartData: Exclude<ConfigType, ['node']> = omit(BarCommonConfig, ['node'])
|
||||
public chartData: Exclude<ConfigType, ['node']> = omit(BarCommonConfig, ['node'])
|
||||
|
||||
public attr = { x: 0, y: 0, w: 500, h: 300 }
|
||||
|
||||
|
||||
Vendored
+13
-1
@@ -1,6 +1,6 @@
|
||||
import { Component } from '@/router/types'
|
||||
|
||||
// import { ConfigType } from '@/packages/index.d'
|
||||
// 组件配置
|
||||
export type ConfigType = {
|
||||
key: string
|
||||
title: string
|
||||
@@ -12,6 +12,16 @@ export type ConfigType = {
|
||||
[T: string]: unknown
|
||||
}
|
||||
|
||||
// 组件实例类
|
||||
export interface CreateComponentType {
|
||||
id: string
|
||||
key: string
|
||||
chartData: ConfigType
|
||||
config: object
|
||||
setPosition: Function
|
||||
}
|
||||
|
||||
// 包分类枚举
|
||||
export enum PackagesCategoryEnum {
|
||||
CHARTS = 'Charts',
|
||||
TABLES = 'Tables',
|
||||
@@ -19,6 +29,7 @@ export enum PackagesCategoryEnum {
|
||||
DECORATES = 'Decorates'
|
||||
}
|
||||
|
||||
// 包分类名称
|
||||
export enum PackagesCategoryName {
|
||||
CHARTS = '图表',
|
||||
TABLES = '表格',
|
||||
@@ -26,6 +37,7 @@ export enum PackagesCategoryName {
|
||||
DECORATES = '小组件'
|
||||
}
|
||||
|
||||
// 图表包类型
|
||||
export type PackagesType = {
|
||||
[PackagesCategoryEnum.CHARTS]: ConfigType[]
|
||||
[PackagesCategoryEnum.INFORMATION]: ConfigType[]
|
||||
|
||||
Reference in New Issue
Block a user