167 lines
2.9 KiB
TypeScript
Raw Normal View History

import type { PropType as VuePropType, ComponentInternalInstance as ComponentInstance } from 'vue';
import { LanguageEnum } from '@/enums/LanguageEnum';
2023-04-02 01:01:56 +08:00
declare global {
/** vue Instance */
declare type ComponentInternalInstance = ComponentInstance;
2023-04-03 00:05:09 +08:00
/**
*
*/
declare interface FieldOption {
2023-04-03 00:05:09 +08:00
key: number;
label: string;
visible: boolean;
2023-10-16 15:13:27 +08:00
children?: Array<FieldOption>;
2023-04-03 00:05:09 +08:00
}
2023-04-02 01:01:56 +08:00
2023-04-03 00:05:09 +08:00
/**
*
*/
declare interface DialogOption {
2023-04-03 00:05:09 +08:00
/**
*
*/
title?: string;
/**
*
*/
visible: boolean;
}
2023-04-02 01:01:56 +08:00
declare interface UploadOption {
2023-04-03 00:05:09 +08:00
/** 设置上传的请求头部 */
headers: { [key: string]: any };
2023-04-02 01:01:56 +08:00
2023-04-03 00:05:09 +08:00
/** 上传的地址 */
url: string;
}
2023-04-02 01:01:56 +08:00
2023-04-03 00:05:09 +08:00
/**
*
*/
declare interface ImportOption extends UploadOption {
2023-04-03 00:05:09 +08:00
/** 是否显示弹出层 */
open: boolean;
/** 弹出层标题 */
title: string;
/** 是否禁用上传 */
isUploading: boolean;
2023-04-02 01:01:56 +08:00
updateSupport: number;
2023-04-03 00:05:09 +08:00
/** 其他参数 */
[key: string]: any;
}
/**
*
*/
declare interface DictDataOption {
2023-04-03 00:05:09 +08:00
label: string;
value: string;
elTagType?: ElTagType;
elTagClass?: string;
}
2023-04-02 01:01:56 +08:00
declare interface BaseEntity {
2023-04-03 00:05:09 +08:00
createBy?: any;
2023-04-05 20:12:03 +08:00
createDept?: any;
2023-04-03 00:05:09 +08:00
createTime?: string;
updateBy?: any;
updateTime?: any;
}
2023-04-02 01:01:56 +08:00
2023-04-03 00:05:09 +08:00
/**
*
* T : 表单数据
* D : 查询参数
*/
declare interface PageData<T, D> {
2023-04-03 00:05:09 +08:00
form: T;
queryParams: D;
rules: ElFormRules;
2023-04-03 00:05:09 +08:00
}
/**
*
*/
declare interface PageQuery {
2023-04-03 00:05:09 +08:00
pageNum: number;
pageSize: number;
}
declare interface LayoutSetting {
/**
*
*/
topNav: boolean;
/**
*
*/
tagsView: boolean;
/**
*
*/
tagsIcon: boolean;
/**
*
*/
fixedHeader: boolean;
/**
* Logo
*/
sidebarLogo: boolean;
/**
*
*/
dynamicTitle: boolean;
/**
* theme-dark | theme-light
*/
sideTheme: string;
/**
*
*/
theme: string;
}
declare interface DefaultSettings extends LayoutSetting {
/**
*
*/
title: string;
/**
*
*/
showSettings: boolean;
/**
*
*/
layout: string;
/**
*
*/
size: 'large' | 'default' | 'small';
/**
*
*/
language: LanguageEnum;
/**
*
*/
animationEnable: boolean;
/**
*
*
* true:
* false:
*/
dark: boolean;
}
2023-04-02 01:01:56 +08:00
}
export {};