first commit
This commit is contained in:
20
src/types/api.d.ts
vendored
Normal file
20
src/types/api.d.ts
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
/** 接口返回数据格式 */
|
||||
interface ApiRes<T> {
|
||||
code: string
|
||||
data: T
|
||||
msg: string
|
||||
success: boolean
|
||||
timestamp: string
|
||||
}
|
||||
|
||||
/** 分页响应数据格式 */
|
||||
interface PageRes<T> {
|
||||
list: T
|
||||
total: number
|
||||
}
|
||||
|
||||
/** 分页请求数据格式 */
|
||||
interface PageQuery {
|
||||
page: number
|
||||
size: number
|
||||
}
|
||||
40
src/types/app.d.ts
vendored
Normal file
40
src/types/app.d.ts
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
declare namespace App {
|
||||
interface AppSettings {
|
||||
theme: 'light' | 'dark'
|
||||
themeColor: string
|
||||
tab: boolean
|
||||
tabMode: 'card' | 'card-gutter' | 'rounded'
|
||||
animate: boolean
|
||||
animateMode: 'zoom-fade' | 'slide-dynamic-origin' | 'fade-slide' | 'fade' | 'fade-bottom' | 'fade-scale'
|
||||
menuCollapse: boolean
|
||||
menuAccordion: boolean
|
||||
menuDark: boolean
|
||||
copyrightDisplay: boolean
|
||||
layout: 'left' | 'mix'
|
||||
isOpenWatermark?: boolean
|
||||
watermark?: string
|
||||
enableColorWeaknessMode?: boolean
|
||||
enableMourningMode?: boolean
|
||||
}
|
||||
|
||||
/** 导航页签的样式类型 */
|
||||
type TabType = 'card' | 'card-gutter' | 'rounded'
|
||||
interface TabItem {
|
||||
label: string
|
||||
value: TabType
|
||||
}
|
||||
/** 页面切换动画类型 */
|
||||
type AnimateType = 'zoom-fade' | 'slide-dynamic-origin' | 'fade-slide' | 'fade' | 'fade-bottom' | 'fade-scale'
|
||||
interface AnimateItem {
|
||||
label: string
|
||||
value: AnimateType
|
||||
}
|
||||
|
||||
/** 字典项 */
|
||||
interface DictItem {
|
||||
disabled?: boolean
|
||||
extra?: string
|
||||
label: string
|
||||
value: string
|
||||
}
|
||||
}
|
||||
75
src/types/auto-imports.d.ts
vendored
Normal file
75
src/types/auto-imports.d.ts
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
// Generated by unplugin-auto-import
|
||||
export {}
|
||||
declare global {
|
||||
const EffectScope: typeof import('vue')['EffectScope']
|
||||
const computed: typeof import('vue')['computed']
|
||||
const createApp: typeof import('vue')['createApp']
|
||||
const customRef: typeof import('vue')['customRef']
|
||||
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
|
||||
const defineComponent: typeof import('vue')['defineComponent']
|
||||
const effectScope: typeof import('vue')['effectScope']
|
||||
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
|
||||
const getCurrentScope: typeof import('vue')['getCurrentScope']
|
||||
const h: typeof import('vue')['h']
|
||||
const inject: typeof import('vue')['inject']
|
||||
const isProxy: typeof import('vue')['isProxy']
|
||||
const isReactive: typeof import('vue')['isReactive']
|
||||
const isReadonly: typeof import('vue')['isReadonly']
|
||||
const isRef: typeof import('vue')['isRef']
|
||||
const markRaw: typeof import('vue')['markRaw']
|
||||
const nextTick: typeof import('vue')['nextTick']
|
||||
const onActivated: typeof import('vue')['onActivated']
|
||||
const onBeforeMount: typeof import('vue')['onBeforeMount']
|
||||
const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
|
||||
const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
|
||||
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
|
||||
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
|
||||
const onDeactivated: typeof import('vue')['onDeactivated']
|
||||
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
|
||||
const onMounted: typeof import('vue')['onMounted']
|
||||
const onRenderTracked: typeof import('vue')['onRenderTracked']
|
||||
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
|
||||
const onScopeDispose: typeof import('vue')['onScopeDispose']
|
||||
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
|
||||
const onUnmounted: typeof import('vue')['onUnmounted']
|
||||
const onUpdated: typeof import('vue')['onUpdated']
|
||||
const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
|
||||
const provide: typeof import('vue')['provide']
|
||||
const reactive: typeof import('vue')['reactive']
|
||||
const readonly: typeof import('vue')['readonly']
|
||||
const ref: typeof import('vue')['ref']
|
||||
const resolveComponent: typeof import('vue')['resolveComponent']
|
||||
const shallowReactive: typeof import('vue')['shallowReactive']
|
||||
const shallowReadonly: typeof import('vue')['shallowReadonly']
|
||||
const shallowRef: typeof import('vue')['shallowRef']
|
||||
const toRaw: typeof import('vue')['toRaw']
|
||||
const toRef: typeof import('vue')['toRef']
|
||||
const toRefs: typeof import('vue')['toRefs']
|
||||
const toValue: typeof import('vue')['toValue']
|
||||
const triggerRef: typeof import('vue')['triggerRef']
|
||||
const unref: typeof import('vue')['unref']
|
||||
const useAttrs: typeof import('vue')['useAttrs']
|
||||
const useCssModule: typeof import('vue')['useCssModule']
|
||||
const useCssVars: typeof import('vue')['useCssVars']
|
||||
const useId: typeof import('vue')['useId']
|
||||
const useLink: typeof import('vue-router')['useLink']
|
||||
const useModel: typeof import('vue')['useModel']
|
||||
const useRoute: typeof import('vue-router')['useRoute']
|
||||
const useRouter: typeof import('vue-router')['useRouter']
|
||||
const useSlots: typeof import('vue')['useSlots']
|
||||
const useTemplateRef: typeof import('vue')['useTemplateRef']
|
||||
const watch: typeof import('vue')['watch']
|
||||
const watchEffect: typeof import('vue')['watchEffect']
|
||||
const watchPostEffect: typeof import('vue')['watchPostEffect']
|
||||
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
|
||||
}
|
||||
// for type re-export
|
||||
declare global {
|
||||
// @ts-ignore
|
||||
export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
|
||||
import('vue')
|
||||
}
|
||||
69
src/types/components.d.ts
vendored
Normal file
69
src/types/components.d.ts
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// Generated by unplugin-vue-components
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
export {}
|
||||
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
Avatar: typeof import('./../components/Avatar/index.vue')['default']
|
||||
Breadcrumb: typeof import('./../components/Breadcrumb/index.vue')['default']
|
||||
CellCopy: typeof import('./../components/CellCopy/index.vue')['default']
|
||||
Chart: typeof import('./../components/Chart/index.vue')['default']
|
||||
CronForm: typeof import('./../components/GenCron/CronForm/index.vue')['default']
|
||||
CronModal: typeof import('./../components/GenCron/CronModal/index.vue')['default']
|
||||
DateRangePicker: typeof import('./../components/DateRangePicker/index.vue')['default']
|
||||
DayForm: typeof import('./../components/GenCron/CronForm/component/day-form.vue')['default']
|
||||
FilePreview: typeof import('./../components/FilePreview/index.vue')['default']
|
||||
GiCellAvatar: typeof import('./../components/GiCell/GiCellAvatar.vue')['default']
|
||||
GiCellGender: typeof import('./../components/GiCell/GiCellGender.vue')['default']
|
||||
GiCellStatus: typeof import('./../components/GiCell/GiCellStatus.vue')['default']
|
||||
GiCellTag: typeof import('./../components/GiCell/GiCellTag.vue')['default']
|
||||
GiCellTags: typeof import('./../components/GiCell/GiCellTags.vue')['default']
|
||||
GiCodeView: typeof import('./../components/GiCodeView/index.vue')['default']
|
||||
GiDot: typeof import('./../components/GiDot/index.tsx')['default']
|
||||
GiEditTable: typeof import('./../components/GiEditTable/GiEditTable.vue')['default']
|
||||
GiFlexibleBox: typeof import('./../components/GiFlexibleBox/index.vue')['default']
|
||||
GiFooter: typeof import('./../components/GiFooter/index.vue')['default']
|
||||
GiForm: typeof import('./../components/GiForm/src/GiForm.vue')['default']
|
||||
GiIconSelector: typeof import('./../components/GiIconSelector/index.vue')['default']
|
||||
GiIframe: typeof import('./../components/GiIframe/index.vue')['default']
|
||||
GiLeftRightPane: typeof import('./../components/GiLeftRightPane/index.vue')['default']
|
||||
GiOption: typeof import('./../components/GiOption/index.vue')['default']
|
||||
GiOptionItem: typeof import('./../components/GiOptionItem/index.vue')['default']
|
||||
GiOverFlowTags: typeof import('./../components/GiOverFlowTags/index.vue')['default']
|
||||
GiSpace: typeof import('./../components/GiSpace/index.vue')['default']
|
||||
GiSplitButton: typeof import('./../components/GiSplitButton/index.vue')['default']
|
||||
GiSplitPane: typeof import('./../components/GiSplitPane/index.vue')['default']
|
||||
GiSplitPaneFlexibleBox: typeof import('./../components/GiSplitPane/components/GiSplitPaneFlexibleBox.vue')['default']
|
||||
GiSvgIcon: typeof import('./../components/GiSvgIcon/index.vue')['default']
|
||||
GiTable: typeof import('./../components/GiTable/index.vue')['default']
|
||||
GiTag: typeof import('./../components/GiTag/index.tsx')['default']
|
||||
GiThemeBtn: typeof import('./../components/GiThemeBtn/index.vue')['default']
|
||||
HourForm: typeof import('./../components/GenCron/CronForm/component/hour-form.vue')['default']
|
||||
Icon403: typeof import('./../components/icons/Icon403.vue')['default']
|
||||
Icon404: typeof import('./../components/icons/Icon404.vue')['default']
|
||||
Icon500: typeof import('./../components/icons/Icon500.vue')['default']
|
||||
IconBorders: typeof import('./../components/icons/IconBorders.vue')['default']
|
||||
IconTableSize: typeof import('./../components/icons/IconTableSize.vue')['default']
|
||||
IconTreeAdd: typeof import('./../components/icons/IconTreeAdd.vue')['default']
|
||||
IconTreeReduce: typeof import('./../components/icons/IconTreeReduce.vue')['default']
|
||||
JsonPretty: typeof import('./../components/JsonPretty/index.vue')['default']
|
||||
MinuteForm: typeof import('./../components/GenCron/CronForm/component/minute-form.vue')['default']
|
||||
MonthForm: typeof import('./../components/GenCron/CronForm/component/month-form.vue')['default']
|
||||
ParentView: typeof import('./../components/ParentView/index.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
SecondForm: typeof import('./../components/GenCron/CronForm/component/second-form.vue')['default']
|
||||
SplitPanel: typeof import('./../components/SplitPanel/index.vue')['default']
|
||||
TextCopy: typeof import('./../components/TextCopy/index.vue')['default']
|
||||
ToggleDark: typeof import('./../components/ToggleDark/index.vue')['default']
|
||||
UserSelect: typeof import('./../components/UserSelect/index.vue')['default']
|
||||
Verify: typeof import('./../components/Verify/index.vue')['default']
|
||||
VerifyPoints: typeof import('./../components/Verify/Verify/VerifyPoints.vue')['default']
|
||||
VerifySlide: typeof import('./../components/Verify/Verify/VerifySlide.vue')['default']
|
||||
WeekForm: typeof import('./../components/GenCron/CronForm/component/week-form.vue')['default']
|
||||
YearForm: typeof import('./../components/GenCron/CronForm/component/year-form.vue')['default']
|
||||
}
|
||||
}
|
||||
14
src/types/env.d.ts
vendored
Normal file
14
src/types/env.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
/** 声明环境变量的类型 */
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_API_PREFIX: string
|
||||
readonly VITE_API_BASE_URL: string
|
||||
readonly VITE_BASE: string
|
||||
readonly VITE_APP_SETTING: string
|
||||
readonly VITE_CLIENT_ID: string
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv
|
||||
}
|
||||
25
src/types/global.d.ts
vendored
Normal file
25
src/types/global.d.ts
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
interface AnyObject {
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
interface Options {
|
||||
label: string
|
||||
value: unknown
|
||||
}
|
||||
|
||||
/** 键值对类型 */
|
||||
export interface LabelValueState {
|
||||
label: string
|
||||
value: any
|
||||
extra?: string
|
||||
}
|
||||
|
||||
declare global{
|
||||
type Recordable<T = any> = Record<string, T>
|
||||
}
|
||||
|
||||
/** 状态(1:启用;2:禁用) */
|
||||
type Status = 1 | 2
|
||||
|
||||
/** 性别(1:男;2:女;0:未知) */
|
||||
type Gender = 1 | 2 | 0
|
||||
3
src/types/module.d.ts
vendored
Normal file
3
src/types/module.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
declare module 'nprogress'
|
||||
declare module '@arco-design/color'
|
||||
declare module 'qs'
|
||||
45
src/types/router.d.ts
vendored
Normal file
45
src/types/router.d.ts
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
import 'vue-router'
|
||||
|
||||
declare module 'vue-router' {
|
||||
interface RouteMeta {
|
||||
/** 设置该路由在侧边栏和面包屑中展示的名字 */
|
||||
title?: string
|
||||
/** 设置该路由的图标, 记得将svg导入 @/icons/svg */
|
||||
svgIcon?: string
|
||||
/** 设置该路由的图标, 直接使用Arco Design的Icon(与svgIcon同时设置时, svgIcon将优先生效) */
|
||||
icon?: string
|
||||
/** 默认false, 设置true的时候该路由不会在侧边栏出现 */
|
||||
hidden?: boolean
|
||||
/** 默认true, 如果设置为false, 则不会在面包屑中显示 */
|
||||
breadcrumb?: boolean
|
||||
/** 默认true, 如果设置为false, 它则不会显示在Tab栏中 */
|
||||
showInTabs?: boolean
|
||||
/** 默认false, 如果设置为true, 它则会固定在Tab栏中, 例如首页 */
|
||||
affix?: boolean
|
||||
/**
|
||||
* 当一个路由下面的children声明的路由大于1个时, 自动会变成嵌套的模式
|
||||
* 只有一个时, 会将那个子路由当做根路由显示在侧边栏
|
||||
* 若想不管路由下面的children声明的个数都显示你的根路由
|
||||
* 可以设置alwaysShow: true, 这样就会忽略之前定义的规则, 一直显示根路由
|
||||
*/
|
||||
alwaysShow?: boolean
|
||||
/**
|
||||
* 示例: activeMenu: "/xxx/xxx"
|
||||
* 当设置了该属性进入路由时, 则会高亮activeMenu属性对应的侧边栏
|
||||
* 该属性适合使用在有hidden: true属性的路由上
|
||||
*/
|
||||
activeMenu?: string
|
||||
/**
|
||||
* 是否缓存该路由页面
|
||||
* 默认为false, 为true时代表需要缓存, 此时该路由和该页面都需要设置一致的name
|
||||
*/
|
||||
keepAlive?: boolean
|
||||
/** 默认路由参数 */
|
||||
query?: string
|
||||
noShowingChildren?: boolean
|
||||
/** 设置该路由进入的权限, 支持多个权限叠加 */
|
||||
roles?: string[]
|
||||
/** 排序 */
|
||||
sort?: number
|
||||
}
|
||||
}
|
||||
8
src/types/shims-vue.d.ts
vendored
Normal file
8
src/types/shims-vue.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
declare module '*.vue' {
|
||||
import type { DefineComponent } from 'vue'
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
||||
const component: DefineComponent<{}, {}, any>
|
||||
export default component
|
||||
}
|
||||
Reference in New Issue
Block a user