项目微调

This commit is contained in:
2024-10-10 10:53:12 +08:00
parent 70289632f3
commit abbda880df
6 changed files with 19 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
import type { App, Component } from 'vue' import type { App, Component } from 'vue'
// 当组件很多的时候,可以使用 // 当组件很多的时候,可以使用
import { SvgIcon } from './staticExtend/SvgIcon' import { SvgIcon } from '@/components/StaticExtend/SvgIcon'
// 这个地方将合并到对象中 // 这个地方将合并到对象中
const Components: { const Components: {

View File

@@ -67,7 +67,7 @@ declare module 'vue' {
RouterView: typeof import('vue-router')['RouterView'] RouterView: typeof import('vue-router')['RouterView']
SearchForm: typeof import('../components/SearchForm/index.vue')['default'] SearchForm: typeof import('../components/SearchForm/index.vue')['default']
SearchFormItem: typeof import('../components/SearchForm/components/SearchFormItem.vue')['default'] SearchFormItem: typeof import('../components/SearchForm/components/SearchFormItem.vue')['default']
SvgIcon: typeof import('../components/staticExtend/SvgIcon/src/SvgIcon.vue')['default'] SvgIcon: typeof import('@/components/StaticExtend/SvgIcon/src/SvgIcon.vue')['default']
SwitchDark: typeof import('../components/SwitchDark/index.vue')['default'] SwitchDark: typeof import('../components/SwitchDark/index.vue')['default']
TableColumn: typeof import('../components/ProTable/components/TableColumn.vue')['default'] TableColumn: typeof import('../components/ProTable/components/TableColumn.vue')['default']
} }

View File

@@ -1,23 +1,26 @@
declare module '*.vue' {
declare module "*.vue" { import { DefineComponent } from 'vue'
import { DefineComponent } from "vue";
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
const component: DefineComponent<{}, {}, any>; const component: DefineComponent<{}, {}, any>
export default component; export default component
} }
/* Vite */ /* Vite */
declare type Recordable<T = any> = Record<string, T>; declare type Recordable<T = any> = Record<string, T>;
declare interface ViteEnv { declare interface ViteEnv {
VITE_USER_NODE_ENV: "development" | "production" | "test"; VITE_USER_NODE_ENV: 'development' | 'production' | 'test';
VITE_GLOB_APP_TITLE: string; VITE_GLOB_APP_TITLE: string;
VITE_PORT: number; VITE_PORT: number;
VITE_OPEN: boolean; VITE_OPEN: boolean;
VITE_REPORT: boolean; VITE_REPORT: boolean;
VITE_ROUTER_MODE: "hash" | "history"; VITE_ROUTER_MODE: 'hash' | 'history';
VITE_BUILD_COMPRESS: "gzip" | "brotli" | "gzip,brotli" | "none"; VITE_BUILD_COMPRESS: 'gzip' | 'brotli' | 'gzip,brotli' | 'none';
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE: boolean; VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE: boolean;
VITE_DROP_CONSOLE: boolean; VITE_DROP_CONSOLE: boolean;
VITE_PWA: boolean; VITE_PWA: boolean;
@@ -30,6 +33,10 @@ interface ImportMetaEnv extends ViteEnv {
__: unknown; __: unknown;
} }
interface ImportMeta {
readonly env: ImportMetaEnv;
}
/* __APP_INFO__ */ /* __APP_INFO__ */
declare const __APP_INFO__: { declare const __APP_INFO__: {
pkg: { pkg: {
@@ -39,4 +46,4 @@ declare const __APP_INFO__: {
devDependencies: Recordable<string>; devDependencies: Recordable<string>;
}; };
lastBuildTime: string; lastBuildTime: string;
}; }

View File

@@ -25,6 +25,7 @@
"noEmit": false, "noEmit": false,
"types": [ "types": [
"node", "node",
"vite/client",
"element-plus/global" "element-plus/global"
], ],
"baseUrl": "./", // 解析非相对模块的基地址,默认是当前目录 "baseUrl": "./", // 解析非相对模块的基地址,默认是当前目录