forked from element-plus/element-plus
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
235 changed files
with
4,760 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { | ||
ACTION_CLONE, | ||
ACTION_DELETE, | ||
ACTION_EDIT, | ||
ACTION_RUN, | ||
ACTION_UPLOAD, | ||
ACTION_VIEW, | ||
ACTION_VIEW_LOGS, | ||
ACTION_VIEW_DATA, | ||
ACTION_RESTART, | ||
ACTION_COPY, | ||
ACTION_START, | ||
ACTION_STOP, | ||
ACTION_SAVE, | ||
ACTION_BACK, | ||
ACTION_ENABLE, | ||
} from '@/constants/action'; | ||
|
||
export declare global { | ||
type ActionName = | ||
| ACTION_VIEW | ||
| ACTION_EDIT | ||
| ACTION_CLONE | ||
| ACTION_RUN | ||
| ACTION_DELETE | ||
| ACTION_UPLOAD | ||
| ACTION_RESTART | ||
| ACTION_VIEW_LOGS | ||
| ACTION_VIEW_DATA | ||
| ACTION_COPY | ||
| ACTION_START | ||
| ACTION_STOP | ||
| ACTION_SAVE | ||
| ACTION_BACK | ||
| ACTION_ENABLE; | ||
|
||
type GenericAction = ActionName | string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
export declare global { | ||
type Color = | ||
| 'red' | ||
| 'magenta' | ||
| 'purple' | ||
| 'geekBlue' | ||
| 'blue' | ||
| 'cyan' | ||
| 'green' | ||
| 'limeGreen' | ||
| 'yellow' | ||
| 'gold' | ||
| 'orange'; | ||
|
||
type ColorFunc = (m: MetricMeta) => string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export declare global { | ||
type BoolFunc = (data: any) => boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export * from './action'; | ||
export * from './color'; | ||
export * from './dataType'; | ||
export * from './lang'; | ||
export * from './os'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export declare global { | ||
type Lang = 'en' | 'zh'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { OS_WINDOWS, OS_MAC, OS_LINUX } from '@/constants/os'; | ||
|
||
export declare global { | ||
type OS = OS_WINDOWS | OS_MAC | OS_LINUX; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
type ButtonType = 'button' | 'fa-icon' | 'icon' | 'label'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
interface MetricProps { | ||
title?: string; | ||
value?: number | string; | ||
icon?: Icon; | ||
color?: string; | ||
clickable?: boolean; | ||
} | ||
|
||
interface MetricMeta { | ||
name: string; | ||
key: string; | ||
value: number | string; | ||
icon: Icon; | ||
color?: string | ColorFunc; | ||
path?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
interface MetricLineChartProps extends LineChartProps { | ||
metric?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
interface PieChartProps { | ||
config: EChartsConfig; | ||
width?: string; | ||
height?: string; | ||
theme?: string; | ||
labelKey?: string; | ||
valueKey?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
interface ColorPickerProps { | ||
modelValue?: string; | ||
disabled?: boolean; | ||
predefine?: string[]; | ||
showAlpha?: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// import {Placement} from '@popperjs/core/lib/enums'; | ||
// | ||
// declare global { | ||
// interface ContextMenuProps { | ||
// visible?: boolean; | ||
// trigger: HTMLElement | string; | ||
// placement?: Placement; | ||
// } | ||
// } |
3 changes: 3 additions & 0 deletions
3
typings/interfaces/components/context-menu/ContextMenuList.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
interface ContextMenuListProps { | ||
items: ContextMenuItem[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Dayjs } from 'dayjs'; | ||
|
||
export declare global { | ||
interface DateRange { | ||
start: Dayjs; | ||
end: Dayjs; | ||
} | ||
|
||
interface RangeItem { | ||
key: RangeItemKey; | ||
value?: DateRange; | ||
} | ||
|
||
interface RangeItemOption extends SelectOption { | ||
value?: RangeItem; | ||
} | ||
|
||
type RangeItemValue = RangeItemValueFunc | DateRange; | ||
type RangeItemValueFunc = () => DateRange; | ||
type RangeItemKey = 'custom' | string; | ||
type RangePickerType = 'daterange' | 'datetimerange'; | ||
} |
18 changes: 18 additions & 0 deletions
18
typings/interfaces/components/dialog/CreateEditDialog.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Ref } from 'vue'; | ||
|
||
declare global { | ||
type CreateEditDialogType = 'create' | 'edit'; | ||
|
||
type CreateEditTabName = 'single' | 'batch'; | ||
|
||
interface CreateEditDialogActionFunctions { | ||
onClose: () => void; | ||
onConfirm: () => Promise<void>; | ||
onTabChange: (value: CreateEditTabName) => void; | ||
onAdd: (rowIndex: number) => void; | ||
onClone: (rowIndex: number) => void; | ||
onDelete: (rowIndex: number) => void; | ||
onFieldChange: (rowIndex: number, prop: string, value: any) => void; | ||
onFieldRegister: (rowIndex: number, prop: string, formRef: Ref) => void; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type DialogKey = 'create' | 'edit' | 'run' | 'uploadFiles' | 'logs' | 'diff'; | ||
|
||
interface DialogVisible { | ||
createEdit: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export declare global { | ||
interface DraggableItemData { | ||
key: string; | ||
dragging: boolean; | ||
|
||
[prop: string]: any; | ||
} | ||
|
||
interface DraggableListInternalItems { | ||
draggingItem?: DraggableItemData; | ||
targetItem?: DraggableItemData; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
declare global { | ||
interface DraggableItemContentProps { | ||
item: DraggableItemData; | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export declare global { | ||
interface DataSourceConnectTypeProps { | ||
dataSource?: DataSource; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from './DataSourceConnectType'; | ||
export * from './DataSourceType'; | ||
export * from './DataSource'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export declare global { | ||
interface FileEditorOptions { | ||
theme: 'vs' | 'vs-dark' | 'hc-black'; | ||
} | ||
|
||
interface FileEditorStyles { | ||
default: FileEditorStyle; | ||
active: FileEditorStyle; | ||
} | ||
|
||
interface FileEditorStyle { | ||
backgroundColor?: string; | ||
color?: string; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
export declare global { | ||
interface FileEditorNavMenuCache<T = any> { | ||
[key: string]: T; | ||
} | ||
|
||
interface FileNavItem { | ||
id?: string; | ||
is_dir?: boolean; | ||
path?: string; | ||
name?: string; | ||
extension?: string; | ||
children?: FileNavItem[]; | ||
} | ||
|
||
interface FileEditorNavMenuClickStatus { | ||
clicked: boolean; | ||
item?: FileNavItem; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export declare global { | ||
interface FileEditorNavTabsProps { | ||
activeTab?: FileNavItem; | ||
tabs: FileNavItem[]; | ||
style?: any; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { FILE_UPLOAD_MODE_DIR, FILE_UPLOAD_MODE_FILES } from '@/constants'; | ||
|
||
export declare global { | ||
interface FileUploadModeOption { | ||
label: string; | ||
value: string; | ||
} | ||
|
||
interface FileUploadInfo { | ||
dirName?: string; | ||
fileCount?: number; | ||
filePaths?: string[]; | ||
} | ||
|
||
type FileUploadMode = FILE_UPLOAD_MODE_DIR | FILE_UPLOAD_MODE_FILES; | ||
|
||
interface FileWithPath extends File { | ||
path?: string; | ||
} | ||
|
||
type InputFile = (FileWithPath | DataTransferItem) & { | ||
path?: string; | ||
size?: number; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export * from './FileEditor'; | ||
export * from './FileEditorNavMenu'; | ||
export * from './FileEditorNavTabs'; | ||
export * from './FileUpload'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export declare global { | ||
interface FilterConditionData { | ||
key?: string; | ||
op?: string; | ||
value?: any; | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
typings/interfaces/components/filter/FilterConditionList.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
interface FilterConditionListProps { | ||
conditions: FilterConditionData[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export declare global { | ||
interface FilterInputProps { | ||
label?: string; | ||
placeholder?: string; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export declare global { | ||
interface FilterSelectOptionsRemote { | ||
colName: string; | ||
value?: string; | ||
label?: string; | ||
} | ||
|
||
interface FilterSelectProps { | ||
label?: string; | ||
placeholder?: string; | ||
filterable?: boolean; | ||
options?: SelectOption[]; | ||
optionsRemote?: FilterSelectOptionsRemote; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { ASCENDING, DESCENDING, UNSORTED } from '@/constants/sort'; | ||
|
||
declare global { | ||
type SortDirection = ASCENDING | DESCENDING | UNSORTED | undefined; | ||
|
||
interface SortData { | ||
// key | ||
key: string; | ||
// direction | ||
d?: string; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { RuleItem } from 'async-validator'; | ||
import { Ref } from 'vue'; | ||
import { | ||
FORM_FIELD_TYPE_CHECK_TAG_GROUP, | ||
FORM_FIELD_TYPE_INPUT, | ||
FORM_FIELD_TYPE_INPUT_TEXTAREA, | ||
FORM_FIELD_TYPE_INPUT_WITH_BUTTON, | ||
FORM_FIELD_TYPE_TAG_INPUT, | ||
FORM_FIELD_TYPE_TAG_SELECT, | ||
} from '@/constants/form'; | ||
|
||
declare global { | ||
interface FormContext { | ||
labelWidth?: string; | ||
size?: string; | ||
grid: number; | ||
} | ||
|
||
interface FormModel { | ||
[key: string]: any; | ||
} | ||
|
||
interface FormRuleItem extends RuleItem { | ||
trigger?: string; | ||
} | ||
|
||
interface FormRules { | ||
[key: string]: FormRuleItem | FormRuleItem[]; | ||
} | ||
|
||
type FormValidateCallback = (valid: boolean) => void; | ||
|
||
interface FormComponentData<T> { | ||
formRef: Ref; | ||
formList: Ref<T[]>; | ||
formTableFieldRefsMap: Ref<FormTableFieldRefsMap>; | ||
} | ||
|
||
type FormTableFieldRefsMapKey = [number, string]; | ||
type FormTableFieldRefsMap = Map<FormTableFieldRefsMapKey, Ref>; | ||
|
||
type DefaultFormFunc<T> = () => T; | ||
|
||
type FormFieldType = | ||
| FORM_FIELD_TYPE_INPUT | ||
| FORM_FIELD_TYPE_INPUT_TEXTAREA | ||
| FORM_FIELD_TYPE_INPUT_WITH_BUTTON | ||
| FORM_FIELD_TYPE_TAG_INPUT | ||
| FORM_FIELD_TYPE_TAG_SELECT | ||
| FORM_FIELD_TYPE_CHECK_TAG_GROUP; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { RuleItem } from 'async-validator'; | ||
|
||
declare global { | ||
interface FormItemProps { | ||
prop?: string; | ||
label?: string; | ||
labelTooltip?: string; | ||
labelWidth?: string; | ||
size?: string; | ||
span: number; | ||
offset: number; | ||
required: boolean; | ||
rules?: RuleItem | RuleItem[]; | ||
notEditable?: boolean; | ||
} | ||
} |
Oops, something went wrong.