feat: type抽离
parent
a62929a8da
commit
8b4fa1aa21
@ -0,0 +1,52 @@
|
||||
export type ComponentName =
|
||||
| 'Radio'
|
||||
| 'RadioButton'
|
||||
| 'Checkbox'
|
||||
| 'CheckboxButton'
|
||||
| 'Input'
|
||||
| 'Autocomplete'
|
||||
| 'InputNumber'
|
||||
| 'Select'
|
||||
| 'Cascader'
|
||||
| 'Switch'
|
||||
| 'Slider'
|
||||
| 'TimePicker'
|
||||
| 'DatePicker'
|
||||
| 'Rate'
|
||||
| 'ColorPicker'
|
||||
| 'Transfer'
|
||||
| 'Divider'
|
||||
| 'TimeSelect'
|
||||
| 'SelectV2'
|
||||
| 'InputPassword'
|
||||
| 'Editor'
|
||||
|
||||
export type ColProps = {
|
||||
span?: number
|
||||
xs?: number
|
||||
sm?: number
|
||||
md?: number
|
||||
lg?: number
|
||||
xl?: number
|
||||
tag?: string
|
||||
}
|
||||
|
||||
export type ComponentOptions = {
|
||||
label?: string
|
||||
value?: FormValueType
|
||||
disabled?: boolean
|
||||
key?: string | number
|
||||
children?: ComponentOptions[]
|
||||
options?: ComponentOptions[]
|
||||
} & Recordable
|
||||
|
||||
export type ComponentOptionsAlias = {
|
||||
labelField?: string
|
||||
valueField?: string
|
||||
}
|
||||
|
||||
export type ComponentProps = {
|
||||
optionsAlias?: ComponentOptionsAlias
|
||||
options?: ComponentOptions[]
|
||||
optionsSlot?: boolean
|
||||
} & Recordable
|
||||
@ -0,0 +1,4 @@
|
||||
import { ElementPlusSize } from './elementPlus'
|
||||
export interface ConfigGlobalTypes {
|
||||
size?: ElementPlusSize
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
export type contextMenuSchema = {
|
||||
disabled?: boolean
|
||||
divided?: boolean
|
||||
icon?: string
|
||||
label: string
|
||||
command?: (item: contextMenuSchema) => void
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
declare interface DescriptionsSchema {
|
||||
export interface DescriptionsSchema {
|
||||
span?: number // 占多少分
|
||||
field: string // 字段名
|
||||
label?: string // label名
|
||||
@ -0,0 +1,3 @@
|
||||
export type ElementPlusSize = 'default' | 'small' | 'large'
|
||||
|
||||
export type ElementPlusInfoType = 'success' | 'info' | 'warning' | 'danger'
|
||||
@ -1,4 +1,4 @@
|
||||
declare interface IconTypes {
|
||||
export interface IconTypes {
|
||||
size?: number
|
||||
color?: string
|
||||
icon: string
|
||||
@ -1,4 +1,4 @@
|
||||
declare interface TipSchema {
|
||||
export interface TipSchema {
|
||||
label: string
|
||||
keys?: string[]
|
||||
}
|
||||
@ -1,9 +1,9 @@
|
||||
declare interface Language {
|
||||
export interface Language {
|
||||
el: Recordable
|
||||
name: string
|
||||
}
|
||||
|
||||
declare interface LocaleDropdownType {
|
||||
export interface LocaleDropdownType {
|
||||
lang: LocaleType
|
||||
name?: string
|
||||
elLocale?: Language
|
||||
@ -1,4 +1,4 @@
|
||||
declare interface QrcodeLogo {
|
||||
export interface QrcodeLogo {
|
||||
src?: string
|
||||
logoSize?: number
|
||||
bgColor?: string
|
||||
@ -1,3 +0,0 @@
|
||||
declare interface ConfigGlobalTypes {
|
||||
size?: ElememtPlusSize
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
declare type contextMenuSchema = {
|
||||
disabled?: boolean
|
||||
divided?: boolean
|
||||
icon?: string
|
||||
label: string
|
||||
command?: (item: contextMenuSchema) => viod
|
||||
}
|
||||
Loading…
Reference in New Issue