feat: 项目初始化,未病局
This commit is contained in:
Vendored
+89
@@ -0,0 +1,89 @@
|
||||
/**
|
||||
* @description 全局类型定义
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
/* 菜单 */
|
||||
declare namespace Menu {
|
||||
interface MenuOptions {
|
||||
path: string;
|
||||
name: string;
|
||||
component?: string | (() => Promise<unknown>);
|
||||
redirect?: string;
|
||||
meta: MetaProps;
|
||||
isHome: boolean;
|
||||
children?: MenuOptions[];
|
||||
}
|
||||
interface MetaProps {
|
||||
icon: string;
|
||||
title: string;
|
||||
activeMenu?: string;
|
||||
isLink?: string;
|
||||
isHide: boolean;
|
||||
isFull: boolean;
|
||||
isAffix: boolean;
|
||||
isKeepAlive: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
/* FileType */
|
||||
declare namespace File {
|
||||
type ImageMimeType =
|
||||
| "image/apng"
|
||||
| "image/bmp"
|
||||
| "image/gif"
|
||||
| "image/jpeg"
|
||||
| "image/pjpeg"
|
||||
| "image/png"
|
||||
| "image/svg+xml"
|
||||
| "image/tiff"
|
||||
| "image/webp"
|
||||
| "image/x-icon";
|
||||
|
||||
type ExcelMimeType = "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
||||
}
|
||||
|
||||
/* Vite */
|
||||
declare type Recordable<T = any> = Record<string, T>;
|
||||
|
||||
declare interface ViteEnv {
|
||||
VITE_USER_NODE_ENV: "development" | "production" | "test";
|
||||
VITE_GLOB_APP_TITLE: string;
|
||||
VITE_PORT: number;
|
||||
VITE_OPEN: boolean;
|
||||
VITE_REPORT: boolean;
|
||||
VITE_ROUTER_MODE: "hash" | "history";
|
||||
VITE_BUILD_COMPRESS: "gzip" | "brotli" | "gzip,brotli" | "none";
|
||||
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE: boolean;
|
||||
VITE_DROP_CONSOLE: boolean;
|
||||
VITE_PWA: boolean;
|
||||
VITE_DEVTOOLS: boolean;
|
||||
VITE_PUBLIC_PATH: string;
|
||||
VITE_API_URL: string;
|
||||
VITE_PROXY: [string, string][];
|
||||
VITE_CODEINSPECTOR: boolean;
|
||||
}
|
||||
|
||||
interface ImportMetaEnv extends ViteEnv {
|
||||
__: unknown;
|
||||
}
|
||||
|
||||
/* __APP_INFO__ */
|
||||
declare const __APP_INFO__: {
|
||||
pkg: {
|
||||
name: string;
|
||||
version: string;
|
||||
dependencies: Recordable<string>;
|
||||
devDependencies: Recordable<string>;
|
||||
};
|
||||
lastBuildTime: string;
|
||||
};
|
||||
Vendored
+33
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* @description props类型定义
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
|
||||
/** 表单props属性 */
|
||||
declare namespace FormProps {
|
||||
// 表单基础props属性
|
||||
interface Base<T> {
|
||||
/** 操作类型 */
|
||||
opt: string;
|
||||
/** id数据 */
|
||||
id?: string | number;
|
||||
/** 当前行数据 */
|
||||
record: Partial<T>;
|
||||
/** 是否禁止操作 */
|
||||
disabled?: boolean;
|
||||
/** 行内表单模式 */
|
||||
inline?: boolean;
|
||||
/** 表单布局 */
|
||||
successful?: () => void;
|
||||
}
|
||||
}
|
||||
Vendored
+31
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @description
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
type ObjToKeyValUnion<T> = {
|
||||
[K in keyof T]: { key: K; value: T[K] };
|
||||
}[keyof T];
|
||||
|
||||
type ObjToKeyValArray<T> = {
|
||||
[K in keyof T]: [K, T[K]];
|
||||
}[keyof T];
|
||||
|
||||
type ObjToSelectedValueUnion<T> = {
|
||||
[K in keyof T]: T[K];
|
||||
}[keyof T];
|
||||
|
||||
type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
||||
|
||||
type GetOptional<T> = {
|
||||
[P in keyof T as T[P] extends Required<T>[P] ? never : P]: T[P];
|
||||
};
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @description window 全局类型声明
|
||||
* @license Apache License Version 2.0
|
||||
* @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
|
||||
* @remarks
|
||||
* SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
|
||||
* 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
* 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
|
||||
* 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
|
||||
* 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
declare global {
|
||||
interface Navigator {
|
||||
msSaveOrOpenBlob: (blob: Blob, fileName: string) => void;
|
||||
browserLanguage: string;
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
Reference in New Issue
Block a user