mirror of
https://github.com/dataease/dataease.git
synced 2026-05-16 05:50:45 +08:00
refactor(types): 将边值类型定义移动到共享类型文件
将ShorthandMode枚举和EdgeValues接口从组件背景类型文件移动到核心类型文件,以便其他模块复用
This commit is contained in:
25
core/core-frontend/src/Types.ts
Normal file
25
core/core-frontend/src/Types.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* 简写模式枚举,用于定义不同的边值设置模式
|
||||
*/
|
||||
export enum ShorthandMode {
|
||||
/**
|
||||
* 统一模式,所有边使用相同的值
|
||||
*/
|
||||
Uniform = 'uniform',
|
||||
/**
|
||||
* 轴模式,可能按水平和垂直轴设置值
|
||||
*/
|
||||
Axis = 'axis',
|
||||
/**
|
||||
* 逐边模式,可单独设置每条边的值
|
||||
*/
|
||||
PerEdge = 'per_edge'
|
||||
}
|
||||
|
||||
export interface EdgeValues {
|
||||
mode?: ShorthandMode
|
||||
top?: number
|
||||
right?: number
|
||||
bottom?: number
|
||||
left?: number
|
||||
}
|
||||
@@ -1,34 +1,9 @@
|
||||
import { EdgeValues } from '@/Types'
|
||||
import { COLOR_PANEL } from '@/views/chart/components/editor/util/chart'
|
||||
import type { UploadFile } from 'element-plus-secondary'
|
||||
|
||||
export type BackgroundType = 'outerImage' | 'innerImage'
|
||||
|
||||
/**
|
||||
* 简写模式枚举,用于定义不同的边值设置模式
|
||||
*/
|
||||
export enum ShorthandMode {
|
||||
/**
|
||||
* 统一模式,所有边使用相同的值
|
||||
*/
|
||||
Uniform = 'uniform',
|
||||
/**
|
||||
* 轴模式,可能按水平和垂直轴设置值
|
||||
*/
|
||||
Axis = 'axis',
|
||||
/**
|
||||
* 逐边模式,可单独设置每条边的值
|
||||
*/
|
||||
PerEdge = 'per_edge'
|
||||
}
|
||||
|
||||
export interface EdgeValues {
|
||||
mode?: ShorthandMode
|
||||
top?: number
|
||||
right?: number
|
||||
bottom?: number
|
||||
left?: number
|
||||
}
|
||||
|
||||
export interface CommonBackground {
|
||||
innerPadding?: EdgeValues
|
||||
borderRadius?: number
|
||||
|
||||
Reference in New Issue
Block a user