前端和后端源码,合并到一个git仓库中,方便用户下载,避免前后端不匹配的问题

This commit is contained in:
JEECG
2024-06-23 10:39:52 +08:00
parent bb918b742e
commit 0325e34dcb
1439 changed files with 171106 additions and 0 deletions

55
jeecgboot-vue3/types/axios.d.ts vendored Normal file
View File

@ -0,0 +1,55 @@
export type ErrorMessageMode = 'none' | 'modal' | 'message' | undefined;
export type SuccessMessageMode = 'none' | 'success' | 'error' | undefined;
export interface RequestOptions {
// 将请求参数拼接到url
joinParamsToUrl?: boolean;
// 格式化请求参数时间
formatDate?: boolean;
// 是否处理请求结果
isTransformResponse?: boolean;
// 是否返回本地响应头,需要获取响应头时使用此属性
isReturnNativeResponse?: boolean;
// 默认将prefix 添加到url
joinPrefix?: boolean;
// 接口地址,如果保留为空,则使用默认值
apiUrl?: string;
// 请求拼接路径
urlPrefix?: string;
// 错误消息提示类型
errorMessageMode?: ErrorMessageMode;
// 成功消息提示类型
successMessageMode?: SuccessMessageMode;
// 是否添加时间戳
joinTime?: boolean;
ignoreCancelToken?: boolean;
//是否在标头中发送令牌
withToken?: boolean;
}
export interface Result<T = any> {
code: number;
type: 'success' | 'error' | 'warning';
message: string;
result: T;
}
//文件上传参数
export interface UploadFileParams {
// 其他参数
data?: Recordable;
// 文件参数接口字段名
name?: string;
// 文件
file: File | Blob;
// 文件名
filename?: string;
[key: string]: any;
}
//文件返回参数
export interface UploadFileCallBack {
// 成功回调方法
success?: any;
// 是否返回响应头,需要获取响应头时使用此属性
isReturnResponse?: boolean;
}

185
jeecgboot-vue3/types/config.d.ts vendored Normal file
View File

@ -0,0 +1,185 @@
import { MenuTypeEnum, MenuModeEnum, TriggerEnum, MixSidebarTriggerEnum } from '/@/enums/menuEnum';
import {
ContentEnum,
PermissionModeEnum,
ThemeEnum,
RouterTransitionEnum,
SettingButtonPositionEnum,
SessionTimeoutProcessingEnum,
} from '/@/enums/appEnum';
import { CacheTypeEnum } from '/@/enums/cacheEnum';
export type LocaleType = 'zh_CN' | 'en' | 'ru' | 'ja' | 'ko';
export interface MenuSetting {
bgColor: string;
fixed: boolean;
collapsed: boolean;
canDrag: boolean;
show: boolean;
hidden: boolean;
split: boolean;
menuWidth: number;
mode: MenuModeEnum;
type: MenuTypeEnum;
theme: ThemeEnum;
// update-begin--author:liaozhiyang---date:20240408---for【QQYUN-8922】左侧导航栏文字颜色调整区分彩色和暗黑
isThemeBright: boolean;
// update-end--author:liaozhiyang---date:20240408---for【QQYUN-8922】左侧导航栏文字颜色调整区分彩色和暗黑
topMenuAlign: 'start' | 'center' | 'end';
trigger: TriggerEnum;
accordion: boolean;
closeMixSidebarOnChange: boolean;
collapsedShowTitle: boolean;
mixSideTrigger: MixSidebarTriggerEnum;
mixSideFixed: boolean;
}
export interface MultiTabsSetting {
cache: boolean;
show: boolean;
showQuick: boolean;
canDrag: boolean;
showRedo: boolean;
showFold: boolean;
theme: string;
}
export interface HeaderSetting {
bgColor: string;
fixed: boolean;
show: boolean;
theme: ThemeEnum;
// 是否显示全屏按钮
showFullScreen: boolean;
// 是否显示锁屏按钮
useLockPage: boolean;
// 是否显示文档连接
showDoc: boolean;
// 是否显示消息图标
showNotice: boolean;
// 是否显示搜索按钮
showSearch: boolean;
}
export interface LocaleSetting {
// 是否显示国际化切换按钮
showPicker: boolean;
// Current language
locale: LocaleType;
// default language
fallback: LocaleType;
// available Locales
availableLocales: LocaleType[];
}
export interface TransitionSetting {
// Whether to open the page switching animation
enable: boolean;
// Route basic switching animation
basicTransition: RouterTransitionEnum;
// Whether to open page switching loading
openPageLoading: boolean;
// Whether to open the top progress bar
openNProgress: boolean;
}
export interface ProjectConfig {
// Storage location of permission related information
permissionCacheType: CacheTypeEnum;
// Whether to show the configuration button
showSettingButton: boolean;
// Whether to show the theme switch button
showDarkModeToggle: boolean;
// Configure where the button is displayed
settingButtonPosition: SettingButtonPositionEnum;
// Permission mode
permissionMode: PermissionModeEnum;
// Session timeout processing
sessionTimeoutProcessing: SessionTimeoutProcessingEnum;
// Website gray mode, open for possible mourning dates
grayMode: boolean;
// Whether to turn on the color weak mode
colorWeak: boolean;
// Theme color
themeColor: string;
// The main interface is displayed in full screen, the menu is not displayed, and the top
fullContent: boolean;
// content width
contentMode: ContentEnum;
// Whether to display the logo
showLogo: boolean;
// Whether to show the global footer
showFooter: boolean;
// menuType: MenuTypeEnum;
headerSetting: HeaderSetting;
// menuSetting
menuSetting: MenuSetting;
// Multi-tab settings
multiTabsSetting: MultiTabsSetting;
// Animation configuration
transitionSetting: TransitionSetting;
// pageLayout whether to enable keep-alive
openKeepAlive: boolean;
// Lock screen time
lockTime: number;
// Show breadcrumbs
showBreadCrumb: boolean;
// Show breadcrumb icon
showBreadCrumbIcon: boolean;
// Use error-handler-plugin
useErrorHandle: boolean;
// Whether to open back to top
useOpenBackTop: boolean;
// Is it possible to embed iframe pages
canEmbedIFramePage: boolean;
// Whether to delete unclosed messages and notify when switching the interface
closeMessageOnSwitch: boolean;
// Whether to cancel the http request that has been sent but not responded when switching the interface.
removeAllHttpPending: boolean;
}
export interface GlobConfig {
// Site title
title: string;
// Service interface url
apiUrl: string;
domainUrl: string;
// Upload url (作废)
uploadUrl?: string;
openSso?: string;
openQianKun?: string;
casBaseUrl?: string;
// onlineview url
viewUrl?: string;
// Service interface url prefix
urlPrefix?: string;
// Project abbreviation
shortName: string;
// 短标题
shortTitle: string;
}
export interface GlobEnvConfig {
// Site title
VITE_GLOB_APP_TITLE: string;
// Service interface url
VITE_GLOB_API_URL: string;
VITE_USE_MOCK: string;
// Service interface url prefix
VITE_GLOB_API_URL_PREFIX?: string;
// Project abbreviation
VITE_GLOB_APP_SHORT_NAME: string;
//是否开启单点登录
VITE_GLOB_APP_OPEN_SSO: string;
//是否开启微应用模式
VITE_GLOB_APP_OPEN_QIANKUN: string;
//单点服务端地址
VITE_GLOB_APP_CAS_BASE_URL: string;
VITE_GLOB_DOMAIN_URL: string;
// Upload url
VITE_GLOB_UPLOAD_URL?: string;
// view url
VITE_GLOB_ONLINE_VIEW_URL?: string;
}

87
jeecgboot-vue3/types/global.d.ts vendored Normal file
View File

@ -0,0 +1,87 @@
import type { ComponentRenderProxy, VNode, VNodeChild, ComponentPublicInstance, FunctionalComponent, PropType as VuePropType } from 'vue';
declare global {
const __APP_INFO__: {
pkg: {
name: string;
version: string;
dependencies: Recordable<string>;
devDependencies: Recordable<string>;
};
lastBuildTime: string;
};
// declare interface Window {
// // Global vue app instance
// __APP__: App<Element>;
// }
// vue
declare type PropType<T> = VuePropType<T>;
declare type VueNode = VNodeChild | JSX.Element;
export type Writable<T> = {
-readonly [P in keyof T]: T[P];
};
declare type Nullable<T> = T | null;
declare type NonNullable<T> = T extends null | undefined ? never : T;
declare type Recordable<T = any> = Record<string, T>;
declare type ReadonlyRecordable<T = any> = {
readonly [key: string]: T;
};
declare type Indexable<T = any> = {
[key: string]: T;
};
declare type DeepPartial<T> = {
[P in keyof T]?: DeepPartial<T[P]>;
};
declare type TimeoutHandle = ReturnType<typeof setTimeout>;
declare type IntervalHandle = ReturnType<typeof setInterval>;
declare interface ChangeEvent extends Event {
target: HTMLInputElement;
}
declare interface WheelEvent {
path?: EventTarget[];
}
interface ImportMetaEnv extends ViteEnv {
__: unknown;
}
declare interface ViteEnv {
VITE_PORT: number;
VITE_USE_MOCK: boolean;
VITE_PUBLIC_PATH: string;
VITE_PROXY: [string, string][];
VITE_GLOB_APP_TITLE: string;
VITE_GLOB_APP_SHORT_NAME: string;
VITE_USE_CDN: boolean;
VITE_BUILD_COMPRESS: 'gzip' | 'brotli' | 'none';
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE: boolean;
}
declare function parseInt(s: string | number, radix?: number): number;
declare function parseFloat(string: string | number): number;
namespace JSX {
// tslint:disable no-empty-interface
type Element = VNode;
// tslint:disable no-empty-interface
type ElementClass = ComponentRenderProxy;
interface ElementAttributesProperty {
$props: any;
}
interface IntrinsicElements {
[elem: string]: any;
}
interface IntrinsicAttributes {
[elem: string]: any;
}
}
}
declare module 'vue' {
export type JSXComponent<Props = any> = { new (): ComponentPublicInstance<Props> } | FunctionalComponent<Props>;
}

27
jeecgboot-vue3/types/index.d.ts vendored Normal file
View File

@ -0,0 +1,27 @@
declare interface Fn<T = any, R = T> {
(...arg: T[]): R;
}
declare interface PromiseFn<T = any, R = T> {
(...arg: T[]): Promise<R>;
}
declare type RefType<T> = T | null;
declare type LabelValueOptions = {
label: string;
value: any;
[key: string]: string | number | boolean;
}[];
declare type EmitType = (event: string, ...args: any[]) => void;
declare type TargetContext = '_self' | '_blank';
declare interface ComponentElRef<T extends HTMLElement = HTMLDivElement> {
$el: T;
}
declare type ComponentRef<T extends HTMLElement = HTMLDivElement> = ComponentElRef<T> | null;
declare type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>;

16
jeecgboot-vue3/types/module.d.ts vendored Normal file
View File

@ -0,0 +1,16 @@
declare module '*.vue' {
import { DefineComponent } from 'vue';
const Component: DefineComponent<{}, {}, any>;
export default Component;
}
declare module 'ant-design-vue/es/locale/*' {
import { Locale } from 'ant-design-vue/types/locale-provider';
const locale: Locale & ReadonlyRecordable;
export default locale as Locale & ReadonlyRecordable;
}
declare module 'virtual:*' {
const result: any;
export default result;
}

59
jeecgboot-vue3/types/store.d.ts vendored Normal file
View File

@ -0,0 +1,59 @@
import { ErrorTypeEnum } from '/@/enums/exceptionEnum';
import { MenuModeEnum, MenuTypeEnum } from '/@/enums/menuEnum';
import { RoleInfo } from '/@/api/sys/model/userModel';
// Lock screen information
export interface LockInfo {
// Password required
pwd?: string | undefined;
// Is it locked?
isLock?: boolean;
}
// Error-log information
export interface ErrorLogInfo {
// Type of error
type: ErrorTypeEnum;
// Error file
file: string;
// Error name
name?: string;
// Error message
message: string;
// Error stack
stack?: string;
// Error detail
detail: string;
// Error url
url: string;
// Error time
time?: string;
}
export interface UserInfo {
id: string | number;
userId: string | number;
username: string;
realname: string;
avatar: string;
desc?: string;
homePath?: string;
tenantid?: string | number;
roles: RoleInfo[];
orgCode?: string;
}
export interface LoginInfo {
multi_depart?: string | number;
userInfo?: object;
departs?: [];
tenantList?: [];
isLogin?: boolean;
}
export interface BeforeMiniState {
menuCollapsed?: boolean;
menuSplit?: boolean;
menuMode?: MenuModeEnum;
menuType?: MenuTypeEnum;
}

5
jeecgboot-vue3/types/utils.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
import type { ComputedRef, Ref } from 'vue';
export type DynamicProps<T> = {
[P in keyof T]: Ref<T[P]> | T[P] | ComputedRef<T[P]>;
};

45
jeecgboot-vue3/types/vue-router.d.ts vendored Normal file
View File

@ -0,0 +1,45 @@
export {};
declare module 'vue-router' {
interface RouteMeta extends Record<string | number | symbol, unknown> {
orderNo?: number;
// title
title: string;
// dynamic router level.
dynamicLevel?: number;
// dynamic router real route path (For performance).
realPath?: string;
// Whether to ignore permissions
ignoreAuth?: boolean;
// role info
roles?: RoleEnum[];
// Whether not to cache
ignoreKeepAlive?: boolean;
// Is it fixed on tab
affix?: boolean;
// icon on tab
icon?: string;
frameSrc?: string;
// current page transition
transitionName?: string;
// Whether the route has been dynamically added
hideBreadcrumb?: boolean;
// Hide submenu
hideChildrenInMenu?: boolean;
// Carrying parameters
carryParam?: boolean;
// Used internally to mark single-level menus
single?: boolean;
// Currently active menu
currentActiveMenu?: string;
// Never show in tab
hideTab?: boolean;
// Never show in menu
hideMenu?: boolean;
isLink?: boolean;
// only build for Menu
ignoreRoute?: boolean;
// Hide path for children
hidePathForChildren?: boolean;
}
}