This commit is contained in:
liangjian
2026-01-27 16:32:15 +08:00
commit 836c61ac55
303 changed files with 34442 additions and 0 deletions

26
types/acl.d.ts vendored Normal file
View File

@@ -0,0 +1,26 @@
/**
* 路由v-permission权限对象
*/
declare interface GuardType {
/**
* 角色
* eg: ROLE_ADMIN | ROLE_USER
*/
role?: string[]
/**
* 权限
* eg: system:write | system:write
*/
permission?: string[]
/**
* 模式
* allOf: 满足以上全部角色和权限,通过验证
* oneOf: 满足以上角色和权限任一个,通过验证
* except: 取反,不包含以上角色和权限,通过验证
*/
mode?: 'allOf' | 'oneOf' | 'except'
}
declare interface CanType extends Omit<GuardType, 'role' | 'permission'> {
permission?: (string | boolean)[]
}

9
types/env.d.ts vendored Normal file
View File

@@ -0,0 +1,9 @@
/// <reference types="vite/client" />
interface ImportMetaEnv {
readonly VITE_APP_UPDATE_TIME: string
}
interface ImportMeta {
readonly env: ImportMetaEnv
}

49
types/route.d.ts vendored Normal file
View File

@@ -0,0 +1,49 @@
declare interface VabRouteMeta {
activeMenu?: string
badge?: string
breadcrumbHidden?: boolean
dot?: boolean
dynamicNewTab?: boolean
guard?: string[] | GuardType
hidden?: boolean
icon?: string
isCustomSvg?: boolean
levelHidden?: boolean
noClosable?: boolean
noColumn?: boolean
noKeepAlive?: boolean
tabHidden?: boolean
target?: '_blank' | false
title?: string
fullscreen?: boolean
}
// @ts-ignore
declare interface VabRouteRecord extends Omit<RouteRecordRaw, 'meta'> {
path: string
// name 首字母必须大写
name: Capitalize<string>
meta: VabRouteMeta
fullPath?: string
component?: Component | any
components?: Component | string
children?: VabRouteRecord[]
childrenNameList?: (string | undefined)[]
}
declare interface VabRoute extends Omit<VabRouteRecord, 'children' | 'childrenNameList'> {
query?: any
params?: any
matched?: VabRoute[]
}

6
types/shims-vue.d.ts vendored Normal file
View File

@@ -0,0 +1,6 @@
/* eslint-disable @typescript-eslint/ban-types */
declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}

53
types/store.d.ts vendored Normal file
View File

@@ -0,0 +1,53 @@
declare interface AclModuleType {
admin: boolean
permission: string[]
role: string[]
}
declare interface BingModuleType {
backgroundList: string[]
}
declare interface ErrorLogModuleType {
errorLogs: any[]
}
declare interface RoutesModuleType {
tab: {
data: string | undefined
}
tabMenu: string | undefined
activeMenu: {
data: string | undefined
}
routes: any[]
allRoutes: any[]
breadcrumbRoutes: any[]
}
declare type DeviceType = 'mobile' | 'desktop'
declare type LanguageType = 'zh' | 'en'
declare interface SettingsModuleType {
collapse: boolean
device: DeviceType
language: LanguageType
lock: boolean
logo: string
mode: string
persistenceTab: boolean
theme: ThemeType
title: string
}
declare interface TabsModuleType {
caughtRoutes: []
visitedRoutes: any[]
}
declare interface UserModuleType {
avatar: string
token: string | boolean
username: string,
enums: object
}

135
types/theme.d.ts vendored Normal file
View File

@@ -0,0 +1,135 @@
declare type LayoutName =
/**
* 横向布局
*/
| 'horizontal'
/**
* 纵向布局
*/
| 'vertical'
/**
* 分栏布局
*/
| 'column'
/**
* 综合布局
*/
| 'comprehensive'
/**
* 常规布局
*/
| 'common'
/**
* 瀑布布局
*/
| 'fall'
declare type ThemeName = 'default' | 'plain' | 'technology'
declare type Background =
/**
* 无背景
*/
| 'none'
/**
* 自定义背景
*/
| 'vab-background'
declare type ColumnStyle =
/**
* 横向风格
*/
| 'horizontal'
/**
* 纵向风格
*/
| 'vertical'
/**
* 卡片风格
*/
| 'card'
/**
* 箭头风格
*/
| 'arrow'
/**
* 半圆风格
*/
| 'semicircle'
declare type TabsBarStyle =
/**
* 卡片风格
*/
| 'card'
/**
* 灵动风格
*/
| 'smart'
/**
* 圆滑风格
*/
| 'smooth'
/**
* 矩形风格
*/
| 'rect'
declare type pageTransitionStyle =
/**
* 无动画
*/
| 'null'
/**
* el-fade-in-linear
*/
| 'el-fade-in-linear'
/**
* el-fade-in
*/
| 'el-fade-in'
/**
* el-zoom-in-center
*/
| 'el-zoom-in-center'
/**
* el-zoom-in-top
*/
| 'el-zoom-in-top'
/**
* el-zoom-in-bottom
*/
| 'el-zoom-in-bottom'
declare interface ThemeType {
layout: LayoutName
themeName: ThemeName
menuWidth: string
columnStyle: ColumnStyle
color: string
isFollow: string | number | boolean
fixedHeader: boolean
foldSidebar: boolean
showProgressBar: boolean
showFooter: string | number | boolean
showTabs: boolean
tabsBarStyle: TabsBarStyle
showTabsIcon: boolean
tabDrag: boolean
showLanguage: boolean
showRefresh: boolean
showTheme: boolean
showSearch: boolean
showNotice: boolean
showFullScreen: boolean
showDark: boolean
pageTransition: pageTransitionStyle
radius: number | undefined
showLock: boolean
showColorPicker: boolean
colorWeakness: string | number | boolean
showFontSize: boolean
fontSize: string
rightToolsDrag: boolean
}

11
types/vab.d.ts vendored Normal file
View File

@@ -0,0 +1,11 @@
declare module 'vite-plugin-unplugin'
declare module 'vite-plugin-vitebar'
declare module 'vue-json-viewer'
declare module 'element-plus/dist/locale/en'
declare module 'element-plus/dist/locale/zh-cn'
declare module '@kangc/v-md-editor'
declare module '@kangc/v-md-editor/lib/theme/github'
declare module 'vsv-icon'
declare module 'vue3-gantt'
declare module 'typeit'
declare module 'jsencrypt'