Files
dyf-vue-ui/src/types/global.d.ts

167 lines
2.9 KiB
TypeScript
Raw Normal View History

2025-06-26 15:29:07 +08:00
import type { PropType as VuePropType, ComponentInternalInstance as ComponentInstance } from 'vue';
import { LanguageEnum } from '@/enums/LanguageEnum';
declare global {
/** vue Instance */
declare type ComponentInternalInstance = ComponentInstance;
/**
*
*/
declare interface FieldOption {
key: number;
label: string;
visible: boolean;
children?: Array<FieldOption>;
}
/**
*
*/
declare interface DialogOption {
/**
*
*/
title?: string;
/**
*
*/
visible: boolean;
}
declare interface UploadOption {
/** 设置上传的请求头部 */
headers: { [key: string]: any };
/** 上传的地址 */
url: string;
}
/**
*
*/
declare interface ImportOption extends UploadOption {
/** 是否显示弹出层 */
open: boolean;
/** 弹出层标题 */
title: string;
/** 是否禁用上传 */
isUploading: boolean;
updateSupport: number;
/** 其他参数 */
[key: string]: any;
}
/**
*
*/
declare interface DictDataOption {
label: string;
value: string;
elTagType?: ElTagType;
elTagClass?: string;
}
declare interface BaseEntity {
createBy?: any;
createDept?: any;
createTime?: string;
updateBy?: any;
updateTime?: any;
}
/**
*
* T : 表单数据
* D : 查询参数
*/
declare interface PageData<T, D> {
form: T;
queryParams: D;
rules: ElFormRules;
}
/**
*
*/
declare interface PageQuery {
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;
}
}
export {};