mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-12 06:57:11 +08:00
first commit
This commit is contained in:
21
src/types/api.d.ts
vendored
Normal file
21
src/types/api.d.ts
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
/** 接口返回数据格式 */
|
||||
interface ApiRes<T> {
|
||||
code: number
|
||||
data: T
|
||||
msg: string
|
||||
success: boolean
|
||||
timestamp: string
|
||||
}
|
||||
|
||||
/** 分页响应数据格式 */
|
||||
interface PageRes<T> {
|
||||
list: T
|
||||
total: number
|
||||
}
|
||||
|
||||
/** 分页请求数据格式 */
|
||||
interface PageQuery {
|
||||
page: number
|
||||
size: number
|
||||
sort: Array<string>
|
||||
}
|
27
src/types/app.d.ts
vendored
Normal file
27
src/types/app.d.ts
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
declare namespace App {
|
||||
/** 系统配置 */
|
||||
interface SettingConfig {
|
||||
theme: 'light' | 'dark' // 主题
|
||||
themeColor: string // 主题色
|
||||
tab: boolean // 是否显示页签
|
||||
tabMode: TabType // 页签风格
|
||||
animate: boolean // 是否显示动画
|
||||
animateMode: AnimateType // 动画类名
|
||||
menuCollapse: boolean // 左侧菜单折叠状态
|
||||
menuAccordion: boolean // 左侧菜单手风琴效果
|
||||
menuDark: boolean // 菜单深色模式
|
||||
layout: 'left' | 'mix'
|
||||
}
|
||||
/** 导航页签的样式类型 */
|
||||
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
|
||||
}
|
||||
}
|
81
src/types/auto-imports.d.ts
vendored
Normal file
81
src/types/auto-imports.d.ts
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// Generated by unplugin-auto-import
|
||||
export {}
|
||||
declare global {
|
||||
const EffectScope: typeof import('vue')['EffectScope']
|
||||
const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
|
||||
const computed: typeof import('vue')['computed']
|
||||
const createApp: typeof import('vue')['createApp']
|
||||
const createPinia: typeof import('pinia')['createPinia']
|
||||
const customRef: typeof import('vue')['customRef']
|
||||
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
|
||||
const defineComponent: typeof import('vue')['defineComponent']
|
||||
const defineStore: typeof import('pinia')['defineStore']
|
||||
const effectScope: typeof import('vue')['effectScope']
|
||||
const getActivePinia: typeof import('pinia')['getActivePinia']
|
||||
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 mapActions: typeof import('pinia')['mapActions']
|
||||
const mapGetters: typeof import('pinia')['mapGetters']
|
||||
const mapState: typeof import('pinia')['mapState']
|
||||
const mapStores: typeof import('pinia')['mapStores']
|
||||
const mapWritableState: typeof import('pinia')['mapWritableState']
|
||||
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 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 setActivePinia: typeof import('pinia')['setActivePinia']
|
||||
const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix']
|
||||
const shallowReactive: typeof import('vue')['shallowReactive']
|
||||
const shallowReadonly: typeof import('vue')['shallowReadonly']
|
||||
const shallowRef: typeof import('vue')['shallowRef']
|
||||
const storeToRefs: typeof import('pinia')['storeToRefs']
|
||||
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 useLink: typeof import('vue-router')['useLink']
|
||||
const useRoute: typeof import('vue-router')['useRoute']
|
||||
const useRouter: typeof import('vue-router')['useRouter']
|
||||
const useSlots: typeof import('vue')['useSlots']
|
||||
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, InjectionKey, PropType, Ref, VNode } from 'vue'
|
||||
}
|
41
src/types/components.d.ts
vendored
Normal file
41
src/types/components.d.ts
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
/* 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 {
|
||||
Breadcrumb: typeof import('./../components/Breadcrumb/index.vue')['default']
|
||||
DateRangePicker: typeof import('./../components/DateRangePicker/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']
|
||||
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']
|
||||
GiOption: typeof import('./../components/GiOption/index.vue')['default']
|
||||
GiOptionItem: typeof import('./../components/GiOptionItem/index.vue')['default']
|
||||
GiOverFlowTags: typeof import('./../components/GiOverFlowTags/index.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']
|
||||
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']
|
||||
ParentView: typeof import('./../components/ParentView/index.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
}
|
||||
}
|
12
src/types/env.d.ts
vendored
Normal file
12
src/types/env.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
/** 声明环境变量的类型 */
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_API_PREFIX: string
|
||||
readonly VITE_API_BASE_URL: string
|
||||
readonly VITE_BASE: string
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv
|
||||
}
|
28
src/types/global.d.ts
vendored
Normal file
28
src/types/global.d.ts
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
interface AnyObject {
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
interface Options {
|
||||
label: string
|
||||
value: unknown
|
||||
}
|
||||
|
||||
/** 键值对类型 */
|
||||
export interface LabelValueState {
|
||||
label: string
|
||||
value: any
|
||||
color?: string
|
||||
}
|
||||
|
||||
/** 字典类型 */
|
||||
export interface DictState {
|
||||
code: string
|
||||
items: Array<LabelValueState>
|
||||
}
|
||||
|
||||
|
||||
/** 状态(1:启用;2:禁用) */
|
||||
type Status = 1 | 2
|
||||
|
||||
/** 性别(1:男;2:女;3:未知) */
|
||||
type Gender = 1 | 2 | 3
|
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'
|
47
src/types/router.d.ts
vendored
Normal file
47
src/types/router.d.ts
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
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?: false
|
||||
/** 默认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[]
|
||||
/** 路由切换是否使用动画 */
|
||||
animation?: boolean
|
||||
/** 排序 */
|
||||
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 { 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