refactor: 自动导入修改和项目重构优化

Former-commit-id: 100ab2e0092d96b17146163759aef897e5c14fbd
This commit is contained in:
haoxr
2023-01-13 01:05:45 +08:00
parent 0ae7e0da92
commit 9522875198
36 changed files with 881 additions and 386 deletions

View File

@@ -1,9 +0,0 @@
// 全局组件类型声明
import Pagination from '@/components/Pagination/index.vue';
declare module '@vue/runtime-core' {
export interface GlobalComponents {
Pagination: typeof Pagination;
}
}
export {};

19
types/env.d.ts vendored
View File

@@ -1,19 +0,0 @@
/// <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;
}
// 环境变量 TypeScript的智能提示
interface ImportMetaEnv {
VITE_APP_TITLE: string;
VITE_APP_PORT: string;
VITE_APP_BASE_API: string;
}
interface ImportMeta {
readonly env: ImportMetaEnv;
}

23
types/global.d.ts vendored
View File

@@ -1,23 +0,0 @@
declare global {
interface PageQuery {
pageNum: number;
pageSize: number;
}
interface PageResult<T> {
list: T;
total: number;
}
type DialogType = {
title?: string;
visible: boolean;
};
type OptionType = {
value: string;
label: string;
checked?: boolean;
children?: OptionType[];
};
}
export {};