项目微调
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { App, Component } from 'vue'
|
||||
|
||||
// 当组件很多的时候,可以使用
|
||||
import { SvgIcon } from './staticExtend/SvgIcon'
|
||||
import { SvgIcon } from '@/components/StaticExtend/SvgIcon'
|
||||
|
||||
// 这个地方将合并到对象中
|
||||
const Components: {
|
||||
|
||||
2
frontend/src/types/components.d.ts
vendored
2
frontend/src/types/components.d.ts
vendored
@@ -67,7 +67,7 @@ declare module 'vue' {
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
SearchForm: typeof import('../components/SearchForm/index.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']
|
||||
TableColumn: typeof import('../components/ProTable/components/TableColumn.vue')['default']
|
||||
}
|
||||
|
||||
25
frontend/src/types/env.d.ts
vendored
25
frontend/src/types/env.d.ts
vendored
@@ -1,23 +1,26 @@
|
||||
|
||||
declare module "*.vue" {
|
||||
import { DefineComponent } from "vue";
|
||||
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;
|
||||
const component: DefineComponent<{}, {}, any>
|
||||
export default component
|
||||
}
|
||||
|
||||
|
||||
/* Vite */
|
||||
declare type Recordable<T = any> = Record<string, T>;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
declare interface ViteEnv {
|
||||
VITE_USER_NODE_ENV: "development" | "production" | "test";
|
||||
VITE_USER_NODE_ENV: 'development' | 'production' | 'test';
|
||||
VITE_GLOB_APP_TITLE: string;
|
||||
VITE_PORT: number;
|
||||
VITE_OPEN: boolean;
|
||||
VITE_REPORT: boolean;
|
||||
VITE_ROUTER_MODE: "hash" | "history";
|
||||
VITE_BUILD_COMPRESS: "gzip" | "brotli" | "gzip,brotli" | "none";
|
||||
VITE_ROUTER_MODE: 'hash' | 'history';
|
||||
VITE_BUILD_COMPRESS: 'gzip' | 'brotli' | 'gzip,brotli' | 'none';
|
||||
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE: boolean;
|
||||
VITE_DROP_CONSOLE: boolean;
|
||||
VITE_PWA: boolean;
|
||||
@@ -30,6 +33,10 @@ interface ImportMetaEnv extends ViteEnv {
|
||||
__: unknown;
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv;
|
||||
}
|
||||
|
||||
/* __APP_INFO__ */
|
||||
declare const __APP_INFO__: {
|
||||
pkg: {
|
||||
@@ -39,4 +46,4 @@ declare const __APP_INFO__: {
|
||||
devDependencies: Recordable<string>;
|
||||
};
|
||||
lastBuildTime: string;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"noEmit": false,
|
||||
"types": [
|
||||
"node",
|
||||
"vite/client",
|
||||
"element-plus/global"
|
||||
],
|
||||
"baseUrl": "./", // 解析非相对模块的基地址,默认是当前目录
|
||||
|
||||
Reference in New Issue
Block a user