fix: 🐛 修改架构上面的内容
This commit is contained in:
parent
d2275d5932
commit
35f3a87a0c
39
.build/plugins/index.ts
Normal file
39
.build/plugins/index.ts
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
import type { ConfigEnv, PluginOption } from 'vite';
|
||||||
|
import path from 'node:path';
|
||||||
|
import vue from '@vitejs/plugin-vue';
|
||||||
|
import UnoCSS from 'unocss/vite';
|
||||||
|
import AutoImport from 'unplugin-auto-import/vite';
|
||||||
|
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers';
|
||||||
|
import Components from 'unplugin-vue-components/vite';
|
||||||
|
import envTyped from 'vite-plugin-env-typed';
|
||||||
|
import createSvgIcon from './svg-icon';
|
||||||
|
|
||||||
|
const root = path.resolve(__dirname, '../../');
|
||||||
|
|
||||||
|
function plugins({ mode, command }: ConfigEnv): PluginOption[] {
|
||||||
|
return [
|
||||||
|
UnoCSS(),
|
||||||
|
envTyped({
|
||||||
|
mode,
|
||||||
|
envDir: root,
|
||||||
|
envPrefix: 'VITE_',
|
||||||
|
filePath: path.join(root, 'types', 'import_meta.d.ts'),
|
||||||
|
}),
|
||||||
|
vue(),
|
||||||
|
AutoImport({
|
||||||
|
imports: ['vue'],
|
||||||
|
eslintrc: {
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
|
resolvers: [ElementPlusResolver()],
|
||||||
|
dts: path.resolve(__dirname, './types/auto-imports.d.ts'),
|
||||||
|
}),
|
||||||
|
Components({
|
||||||
|
resolvers: [ElementPlusResolver()],
|
||||||
|
dts: path.resolve(__dirname, './types/components.d.ts'),
|
||||||
|
}),
|
||||||
|
createSvgIcon(command === 'build'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
export default plugins;
|
||||||
21
.build/plugins/svg-icon.ts
Normal file
21
.build/plugins/svg-icon.ts
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import path from 'node:path';
|
||||||
|
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons';
|
||||||
|
|
||||||
|
const root = path.resolve(__dirname, '../../');
|
||||||
|
|
||||||
|
export default function createSvgIcon(isBuild: boolean) {
|
||||||
|
return createSvgIconsPlugin({
|
||||||
|
iconDirs: [
|
||||||
|
path.join(root, 'src/assets/icons/svg'),
|
||||||
|
path.join(root, 'src/assets/icons/Buildings'),
|
||||||
|
path.join(root, 'src/assets/icons/Business'),
|
||||||
|
path.join(root, 'src/assets/icons/Device'),
|
||||||
|
path.join(root, 'src/assets/icons/Document'),
|
||||||
|
path.join(root, 'src/assets/icons/Others'),
|
||||||
|
path.join(root, 'src/assets/icons/System'),
|
||||||
|
path.join(root, 'src/assets/icons/User'),
|
||||||
|
],
|
||||||
|
symbolId: 'icon-[dir]-[name]',
|
||||||
|
svgoOptions: isBuild,
|
||||||
|
});
|
||||||
|
}
|
||||||
88
.build/plugins/types/auto-imports.d.ts
vendored
Normal file
88
.build/plugins/types/auto-imports.d.ts
vendored
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
/* prettier-ignore */
|
||||||
|
// @ts-nocheck
|
||||||
|
// noinspection JSUnusedGlobalSymbols
|
||||||
|
// Generated by unplugin-auto-import
|
||||||
|
// biome-ignore lint: disable
|
||||||
|
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 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 useModel: (typeof import("vue"))["useModel"];
|
||||||
|
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,
|
||||||
|
Slot,
|
||||||
|
Slots,
|
||||||
|
ComponentPublicInstance,
|
||||||
|
ComputedRef,
|
||||||
|
DirectiveBinding,
|
||||||
|
ExtractDefaultPropTypes,
|
||||||
|
ExtractPropTypes,
|
||||||
|
ExtractPublicPropTypes,
|
||||||
|
InjectionKey,
|
||||||
|
PropType,
|
||||||
|
Ref,
|
||||||
|
MaybeRef,
|
||||||
|
MaybeRefOrGetter,
|
||||||
|
VNode,
|
||||||
|
WritableComputedRef,
|
||||||
|
} from "vue";
|
||||||
|
import("vue");
|
||||||
|
}
|
||||||
23
.build/plugins/types/components.d.ts
vendored
Normal file
23
.build/plugins/types/components.d.ts
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
// @ts-nocheck
|
||||||
|
// Generated by unplugin-vue-components
|
||||||
|
// Read more: https://github.com/vuejs/core/pull/3399
|
||||||
|
// biome-ignore lint: disable
|
||||||
|
export {};
|
||||||
|
|
||||||
|
/* prettier-ignore */
|
||||||
|
declare module 'vue' {
|
||||||
|
export interface GlobalComponents {
|
||||||
|
AccountPassword: typeof import('./../../../src/components/LoginDialog/components/FormLogin/AccountPassword.vue')['default']
|
||||||
|
IconSelect: typeof import('./../../../src/components/IconSelect/index.vue')['default']
|
||||||
|
LoginDialog: typeof import('./../../../src/components/LoginDialog/index.vue')['default']
|
||||||
|
ModelSelect: typeof import('./../../../src/components/ModelSelect/index.vue')['default']
|
||||||
|
Popover: typeof import('./../../../src/components/Popover/index.vue')['default']
|
||||||
|
QrCodeLogin: typeof import('./../../../src/components/LoginDialog/components/QrCodeLogin/index.vue')['default']
|
||||||
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
|
RouterView: typeof import('vue-router')['RouterView']
|
||||||
|
SvgIcon: typeof import('./../../../src/components/SvgIcon/index.vue')['default']
|
||||||
|
VerificationCode: typeof import('./../../../src/components/LoginDialog/components/FormLogin/VerificationCode.vue')['default']
|
||||||
|
WelecomeText: typeof import('./../../../src/components/WelecomeText/index.vue')['default']
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -47,6 +47,7 @@
|
|||||||
"unplugin-auto-import": "^19.2.0",
|
"unplugin-auto-import": "^19.2.0",
|
||||||
"unplugin-vue-components": "^28.5.0",
|
"unplugin-vue-components": "^28.5.0",
|
||||||
"vite": "^6.3.5",
|
"vite": "^6.3.5",
|
||||||
|
"vite-plugin-env-typed": "^0.0.2",
|
||||||
"vue-tsc": "^2.2.10"
|
"vue-tsc": "^2.2.10"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
|
|||||||
64
pnpm-lock.yaml
generated
64
pnpm-lock.yaml
generated
@ -108,6 +108,9 @@ importers:
|
|||||||
vite:
|
vite:
|
||||||
specifier: ^6.3.5
|
specifier: ^6.3.5
|
||||||
version: 6.3.5(@types/node@22.15.19)(jiti@2.4.2)(sass-embedded@1.89.0)(yaml@2.8.0)
|
version: 6.3.5(@types/node@22.15.19)(jiti@2.4.2)(sass-embedded@1.89.0)(yaml@2.8.0)
|
||||||
|
vite-plugin-env-typed:
|
||||||
|
specifier: ^0.0.2
|
||||||
|
version: 0.0.2(vite@6.3.5(@types/node@22.15.19)(jiti@2.4.2)(sass-embedded@1.89.0)(yaml@2.8.0))
|
||||||
vue-tsc:
|
vue-tsc:
|
||||||
specifier: ^2.2.10
|
specifier: ^2.2.10
|
||||||
version: 2.2.10(typescript@5.8.3)
|
version: 2.2.10(typescript@5.8.3)
|
||||||
@ -725,67 +728,56 @@ packages:
|
|||||||
resolution: {integrity: sha512-46OzWeqEVQyX3N2/QdiU/CMXYDH/lSHpgfBkuhl3igpZiaB3ZIfSjKuOnybFVBQzjsLwkus2mjaESy8H41SzvA==}
|
resolution: {integrity: sha512-46OzWeqEVQyX3N2/QdiU/CMXYDH/lSHpgfBkuhl3igpZiaB3ZIfSjKuOnybFVBQzjsLwkus2mjaESy8H41SzvA==}
|
||||||
cpu: [arm]
|
cpu: [arm]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm-musleabihf@4.41.0':
|
'@rollup/rollup-linux-arm-musleabihf@4.41.0':
|
||||||
resolution: {integrity: sha512-lfgW3KtQP4YauqdPpcUZHPcqQXmTmH4nYU0cplNeW583CMkAGjtImw4PKli09NFi2iQgChk4e9erkwlfYem6Lg==}
|
resolution: {integrity: sha512-lfgW3KtQP4YauqdPpcUZHPcqQXmTmH4nYU0cplNeW583CMkAGjtImw4PKli09NFi2iQgChk4e9erkwlfYem6Lg==}
|
||||||
cpu: [arm]
|
cpu: [arm]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [musl]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm64-gnu@4.41.0':
|
'@rollup/rollup-linux-arm64-gnu@4.41.0':
|
||||||
resolution: {integrity: sha512-nn8mEyzMbdEJzT7cwxgObuwviMx6kPRxzYiOl6o/o+ChQq23gfdlZcUNnt89lPhhz3BYsZ72rp0rxNqBSfqlqw==}
|
resolution: {integrity: sha512-nn8mEyzMbdEJzT7cwxgObuwviMx6kPRxzYiOl6o/o+ChQq23gfdlZcUNnt89lPhhz3BYsZ72rp0rxNqBSfqlqw==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-arm64-musl@4.41.0':
|
'@rollup/rollup-linux-arm64-musl@4.41.0':
|
||||||
resolution: {integrity: sha512-l+QK99je2zUKGd31Gh+45c4pGDAqZSuWQiuRFCdHYC2CSiO47qUWsCcenrI6p22hvHZrDje9QjwSMAFL3iwXwQ==}
|
resolution: {integrity: sha512-l+QK99je2zUKGd31Gh+45c4pGDAqZSuWQiuRFCdHYC2CSiO47qUWsCcenrI6p22hvHZrDje9QjwSMAFL3iwXwQ==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [musl]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-loongarch64-gnu@4.41.0':
|
'@rollup/rollup-linux-loongarch64-gnu@4.41.0':
|
||||||
resolution: {integrity: sha512-WbnJaxPv1gPIm6S8O/Wg+wfE/OzGSXlBMbOe4ie+zMyykMOeqmgD1BhPxZQuDqwUN+0T/xOFtL2RUWBspnZj3w==}
|
resolution: {integrity: sha512-WbnJaxPv1gPIm6S8O/Wg+wfE/OzGSXlBMbOe4ie+zMyykMOeqmgD1BhPxZQuDqwUN+0T/xOFtL2RUWBspnZj3w==}
|
||||||
cpu: [loong64]
|
cpu: [loong64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-powerpc64le-gnu@4.41.0':
|
'@rollup/rollup-linux-powerpc64le-gnu@4.41.0':
|
||||||
resolution: {integrity: sha512-eRDWR5t67/b2g8Q/S8XPi0YdbKcCs4WQ8vklNnUYLaSWF+Cbv2axZsp4jni6/j7eKvMLYCYdcsv8dcU+a6QNFg==}
|
resolution: {integrity: sha512-eRDWR5t67/b2g8Q/S8XPi0YdbKcCs4WQ8vklNnUYLaSWF+Cbv2axZsp4jni6/j7eKvMLYCYdcsv8dcU+a6QNFg==}
|
||||||
cpu: [ppc64]
|
cpu: [ppc64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-riscv64-gnu@4.41.0':
|
'@rollup/rollup-linux-riscv64-gnu@4.41.0':
|
||||||
resolution: {integrity: sha512-TWrZb6GF5jsEKG7T1IHwlLMDRy2f3DPqYldmIhnA2DVqvvhY2Ai184vZGgahRrg8k9UBWoSlHv+suRfTN7Ua4A==}
|
resolution: {integrity: sha512-TWrZb6GF5jsEKG7T1IHwlLMDRy2f3DPqYldmIhnA2DVqvvhY2Ai184vZGgahRrg8k9UBWoSlHv+suRfTN7Ua4A==}
|
||||||
cpu: [riscv64]
|
cpu: [riscv64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-riscv64-musl@4.41.0':
|
'@rollup/rollup-linux-riscv64-musl@4.41.0':
|
||||||
resolution: {integrity: sha512-ieQljaZKuJpmWvd8gW87ZmSFwid6AxMDk5bhONJ57U8zT77zpZ/TPKkU9HpnnFrM4zsgr4kiGuzbIbZTGi7u9A==}
|
resolution: {integrity: sha512-ieQljaZKuJpmWvd8gW87ZmSFwid6AxMDk5bhONJ57U8zT77zpZ/TPKkU9HpnnFrM4zsgr4kiGuzbIbZTGi7u9A==}
|
||||||
cpu: [riscv64]
|
cpu: [riscv64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [musl]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-s390x-gnu@4.41.0':
|
'@rollup/rollup-linux-s390x-gnu@4.41.0':
|
||||||
resolution: {integrity: sha512-/L3pW48SxrWAlVsKCN0dGLB2bi8Nv8pr5S5ocSM+S0XCn5RCVCXqi8GVtHFsOBBCSeR+u9brV2zno5+mg3S4Aw==}
|
resolution: {integrity: sha512-/L3pW48SxrWAlVsKCN0dGLB2bi8Nv8pr5S5ocSM+S0XCn5RCVCXqi8GVtHFsOBBCSeR+u9brV2zno5+mg3S4Aw==}
|
||||||
cpu: [s390x]
|
cpu: [s390x]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-x64-gnu@4.41.0':
|
'@rollup/rollup-linux-x64-gnu@4.41.0':
|
||||||
resolution: {integrity: sha512-XMLeKjyH8NsEDCRptf6LO8lJk23o9wvB+dJwcXMaH6ZQbbkHu2dbGIUindbMtRN6ux1xKi16iXWu6q9mu7gDhQ==}
|
resolution: {integrity: sha512-XMLeKjyH8NsEDCRptf6LO8lJk23o9wvB+dJwcXMaH6ZQbbkHu2dbGIUindbMtRN6ux1xKi16iXWu6q9mu7gDhQ==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
'@rollup/rollup-linux-x64-musl@4.41.0':
|
'@rollup/rollup-linux-x64-musl@4.41.0':
|
||||||
resolution: {integrity: sha512-m/P7LycHZTvSQeXhFmgmdqEiTqSV80zn6xHaQ1JSqwCtD1YGtwEK515Qmy9DcB2HK4dOUVypQxvhVSy06cJPEg==}
|
resolution: {integrity: sha512-m/P7LycHZTvSQeXhFmgmdqEiTqSV80zn6xHaQ1JSqwCtD1YGtwEK515Qmy9DcB2HK4dOUVypQxvhVSy06cJPEg==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [musl]
|
|
||||||
|
|
||||||
'@rollup/rollup-win32-arm64-msvc@4.41.0':
|
'@rollup/rollup-win32-arm64-msvc@4.41.0':
|
||||||
resolution: {integrity: sha512-4yodtcOrFHpbomJGVEqZ8fzD4kfBeCbpsUy5Pqk4RluXOdsWdjLnjhiKy2w3qzcASWd04fp52Xz7JKarVJ5BTg==}
|
resolution: {integrity: sha512-4yodtcOrFHpbomJGVEqZ8fzD4kfBeCbpsUy5Pqk4RluXOdsWdjLnjhiKy2w3qzcASWd04fp52Xz7JKarVJ5BTg==}
|
||||||
@ -1124,49 +1116,41 @@ packages:
|
|||||||
resolution: {integrity: sha512-jon9M7DKRLGZ9VYSkFMflvNqu9hDtOCEnO2QAryFWgT6o6AXU8du56V7YqnaLKr6rAbZBWYsYpikF226v423QA==}
|
resolution: {integrity: sha512-jon9M7DKRLGZ9VYSkFMflvNqu9hDtOCEnO2QAryFWgT6o6AXU8du56V7YqnaLKr6rAbZBWYsYpikF226v423QA==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
'@unrs/resolver-binding-linux-arm64-musl@1.7.2':
|
'@unrs/resolver-binding-linux-arm64-musl@1.7.2':
|
||||||
resolution: {integrity: sha512-c8Cg4/h+kQ63pL43wBNaVMmOjXI/X62wQmru51qjfTvI7kmCy5uHTJvK/9LrF0G8Jdx8r34d019P1DVJmhXQpA==}
|
resolution: {integrity: sha512-c8Cg4/h+kQ63pL43wBNaVMmOjXI/X62wQmru51qjfTvI7kmCy5uHTJvK/9LrF0G8Jdx8r34d019P1DVJmhXQpA==}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [musl]
|
|
||||||
|
|
||||||
'@unrs/resolver-binding-linux-ppc64-gnu@1.7.2':
|
'@unrs/resolver-binding-linux-ppc64-gnu@1.7.2':
|
||||||
resolution: {integrity: sha512-A+lcwRFyrjeJmv3JJvhz5NbcCkLQL6Mk16kHTNm6/aGNc4FwPHPE4DR9DwuCvCnVHvF5IAd9U4VIs/VvVir5lg==}
|
resolution: {integrity: sha512-A+lcwRFyrjeJmv3JJvhz5NbcCkLQL6Mk16kHTNm6/aGNc4FwPHPE4DR9DwuCvCnVHvF5IAd9U4VIs/VvVir5lg==}
|
||||||
cpu: [ppc64]
|
cpu: [ppc64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
'@unrs/resolver-binding-linux-riscv64-gnu@1.7.2':
|
'@unrs/resolver-binding-linux-riscv64-gnu@1.7.2':
|
||||||
resolution: {integrity: sha512-hQQ4TJQrSQW8JlPm7tRpXN8OCNP9ez7PajJNjRD1ZTHQAy685OYqPrKjfaMw/8LiHCt8AZ74rfUVHP9vn0N69Q==}
|
resolution: {integrity: sha512-hQQ4TJQrSQW8JlPm7tRpXN8OCNP9ez7PajJNjRD1ZTHQAy685OYqPrKjfaMw/8LiHCt8AZ74rfUVHP9vn0N69Q==}
|
||||||
cpu: [riscv64]
|
cpu: [riscv64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
'@unrs/resolver-binding-linux-riscv64-musl@1.7.2':
|
'@unrs/resolver-binding-linux-riscv64-musl@1.7.2':
|
||||||
resolution: {integrity: sha512-NoAGbiqrxtY8kVooZ24i70CjLDlUFI7nDj3I9y54U94p+3kPxwd2L692YsdLa+cqQ0VoqMWoehDFp21PKRUoIQ==}
|
resolution: {integrity: sha512-NoAGbiqrxtY8kVooZ24i70CjLDlUFI7nDj3I9y54U94p+3kPxwd2L692YsdLa+cqQ0VoqMWoehDFp21PKRUoIQ==}
|
||||||
cpu: [riscv64]
|
cpu: [riscv64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [musl]
|
|
||||||
|
|
||||||
'@unrs/resolver-binding-linux-s390x-gnu@1.7.2':
|
'@unrs/resolver-binding-linux-s390x-gnu@1.7.2':
|
||||||
resolution: {integrity: sha512-KaZByo8xuQZbUhhreBTW+yUnOIHUsv04P8lKjQ5otiGoSJ17ISGYArc+4vKdLEpGaLbemGzr4ZeUbYQQsLWFjA==}
|
resolution: {integrity: sha512-KaZByo8xuQZbUhhreBTW+yUnOIHUsv04P8lKjQ5otiGoSJ17ISGYArc+4vKdLEpGaLbemGzr4ZeUbYQQsLWFjA==}
|
||||||
cpu: [s390x]
|
cpu: [s390x]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
'@unrs/resolver-binding-linux-x64-gnu@1.7.2':
|
'@unrs/resolver-binding-linux-x64-gnu@1.7.2':
|
||||||
resolution: {integrity: sha512-dEidzJDubxxhUCBJ/SHSMJD/9q7JkyfBMT77Px1npl4xpg9t0POLvnWywSk66BgZS/b2Hy9Y1yFaoMTFJUe9yg==}
|
resolution: {integrity: sha512-dEidzJDubxxhUCBJ/SHSMJD/9q7JkyfBMT77Px1npl4xpg9t0POLvnWywSk66BgZS/b2Hy9Y1yFaoMTFJUe9yg==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [glibc]
|
|
||||||
|
|
||||||
'@unrs/resolver-binding-linux-x64-musl@1.7.2':
|
'@unrs/resolver-binding-linux-x64-musl@1.7.2':
|
||||||
resolution: {integrity: sha512-RvP+Ux3wDjmnZDT4XWFfNBRVG0fMsc+yVzNFUqOflnDfZ9OYujv6nkh+GOr+watwrW4wdp6ASfG/e7bkDradsw==}
|
resolution: {integrity: sha512-RvP+Ux3wDjmnZDT4XWFfNBRVG0fMsc+yVzNFUqOflnDfZ9OYujv6nkh+GOr+watwrW4wdp6ASfG/e7bkDradsw==}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
libc: [musl]
|
|
||||||
|
|
||||||
'@unrs/resolver-binding-wasm32-wasi@1.7.2':
|
'@unrs/resolver-binding-wasm32-wasi@1.7.2':
|
||||||
resolution: {integrity: sha512-y797JBmO9IsvXVRCKDXOxjyAE4+CcZpla2GSoBQ33TVb3ILXuFnMrbR/QQZoauBYeOFuu4w3ifWLw52sdHGz6g==}
|
resolution: {integrity: sha512-y797JBmO9IsvXVRCKDXOxjyAE4+CcZpla2GSoBQ33TVb3ILXuFnMrbR/QQZoauBYeOFuu4w3ifWLw52sdHGz6g==}
|
||||||
@ -2612,6 +2596,11 @@ packages:
|
|||||||
hachure-fill@0.5.2:
|
hachure-fill@0.5.2:
|
||||||
resolution: {integrity: sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg==}
|
resolution: {integrity: sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg==}
|
||||||
|
|
||||||
|
handlebars@4.7.8:
|
||||||
|
resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==}
|
||||||
|
engines: {node: '>=0.4.7'}
|
||||||
|
hasBin: true
|
||||||
|
|
||||||
has-ansi@2.0.0:
|
has-ansi@2.0.0:
|
||||||
resolution: {integrity: sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==}
|
resolution: {integrity: sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==}
|
||||||
engines: {node: '>=0.10.0'}
|
engines: {node: '>=0.10.0'}
|
||||||
@ -3402,6 +3391,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-kKHJhxwpR/Okycz4HhQKKlhWe4ASEfPgkSWNmKFHd7+ezuQlxkA5cM3+XkBPvm1gmHen3w53qsYAv+8GwRrBlg==}
|
resolution: {integrity: sha512-kKHJhxwpR/Okycz4HhQKKlhWe4ASEfPgkSWNmKFHd7+ezuQlxkA5cM3+XkBPvm1gmHen3w53qsYAv+8GwRrBlg==}
|
||||||
engines: {node: '>=18'}
|
engines: {node: '>=18'}
|
||||||
|
|
||||||
|
neo-async@2.6.2:
|
||||||
|
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
|
||||||
|
|
||||||
node-fetch-native@1.6.6:
|
node-fetch-native@1.6.6:
|
||||||
resolution: {integrity: sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==}
|
resolution: {integrity: sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==}
|
||||||
|
|
||||||
@ -4365,6 +4357,11 @@ packages:
|
|||||||
ufo@1.6.1:
|
ufo@1.6.1:
|
||||||
resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==}
|
resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==}
|
||||||
|
|
||||||
|
uglify-js@3.19.3:
|
||||||
|
resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==}
|
||||||
|
engines: {node: '>=0.8.0'}
|
||||||
|
hasBin: true
|
||||||
|
|
||||||
unbox-primitive@1.1.0:
|
unbox-primitive@1.1.0:
|
||||||
resolution: {integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==}
|
resolution: {integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==}
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
@ -4501,6 +4498,11 @@ packages:
|
|||||||
resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}
|
resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}
|
||||||
engines: {node: '>= 0.8'}
|
engines: {node: '>= 0.8'}
|
||||||
|
|
||||||
|
vite-plugin-env-typed@0.0.2:
|
||||||
|
resolution: {integrity: sha512-IloScAeDfhG81diZuvoozs73LvELSG7h3q5Eim035TUbFpou4FanMLpVZqD0lZNH2oMMHILbzx6udmkg3/NFbA==}
|
||||||
|
peerDependencies:
|
||||||
|
vite: ^6.0.0
|
||||||
|
|
||||||
vite-plugin-svg-icons@2.0.1:
|
vite-plugin-svg-icons@2.0.1:
|
||||||
resolution: {integrity: sha512-6ktD+DhV6Rz3VtedYvBKKVA2eXF+sAQVaKkKLDSqGUfnhqXl3bj5PPkVTl3VexfTuZy66PmINi8Q6eFnVfRUmA==}
|
resolution: {integrity: sha512-6ktD+DhV6Rz3VtedYvBKKVA2eXF+sAQVaKkKLDSqGUfnhqXl3bj5PPkVTl3VexfTuZy66PmINi8Q6eFnVfRUmA==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -4646,6 +4648,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==}
|
resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==}
|
||||||
engines: {node: '>=0.10.0'}
|
engines: {node: '>=0.10.0'}
|
||||||
|
|
||||||
|
wordwrap@1.0.0:
|
||||||
|
resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==}
|
||||||
|
|
||||||
wrap-ansi@6.2.0:
|
wrap-ansi@6.2.0:
|
||||||
resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==}
|
resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==}
|
||||||
engines: {node: '>=8'}
|
engines: {node: '>=8'}
|
||||||
@ -7584,6 +7589,15 @@ snapshots:
|
|||||||
|
|
||||||
hachure-fill@0.5.2: {}
|
hachure-fill@0.5.2: {}
|
||||||
|
|
||||||
|
handlebars@4.7.8:
|
||||||
|
dependencies:
|
||||||
|
minimist: 1.2.8
|
||||||
|
neo-async: 2.6.2
|
||||||
|
source-map: 0.6.1
|
||||||
|
wordwrap: 1.0.0
|
||||||
|
optionalDependencies:
|
||||||
|
uglify-js: 3.19.3
|
||||||
|
|
||||||
has-ansi@2.0.0:
|
has-ansi@2.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
ansi-regex: 2.1.1
|
ansi-regex: 2.1.1
|
||||||
@ -8543,6 +8557,8 @@ snapshots:
|
|||||||
|
|
||||||
natural-orderby@5.0.0: {}
|
natural-orderby@5.0.0: {}
|
||||||
|
|
||||||
|
neo-async@2.6.2: {}
|
||||||
|
|
||||||
node-fetch-native@1.6.6: {}
|
node-fetch-native@1.6.6: {}
|
||||||
|
|
||||||
node-releases@2.0.19: {}
|
node-releases@2.0.19: {}
|
||||||
@ -9521,6 +9537,9 @@ snapshots:
|
|||||||
|
|
||||||
ufo@1.6.1: {}
|
ufo@1.6.1: {}
|
||||||
|
|
||||||
|
uglify-js@3.19.3:
|
||||||
|
optional: true
|
||||||
|
|
||||||
unbox-primitive@1.1.0:
|
unbox-primitive@1.1.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
call-bound: 1.0.4
|
call-bound: 1.0.4
|
||||||
@ -9735,6 +9754,11 @@ snapshots:
|
|||||||
|
|
||||||
vary@1.1.2: {}
|
vary@1.1.2: {}
|
||||||
|
|
||||||
|
vite-plugin-env-typed@0.0.2(vite@6.3.5(@types/node@22.15.19)(jiti@2.4.2)(sass-embedded@1.89.0)(yaml@2.8.0)):
|
||||||
|
dependencies:
|
||||||
|
handlebars: 4.7.8
|
||||||
|
vite: 6.3.5(@types/node@22.15.19)(jiti@2.4.2)(sass-embedded@1.89.0)(yaml@2.8.0)
|
||||||
|
|
||||||
vite-plugin-svg-icons@2.0.1(vite@6.3.5(@types/node@22.15.19)(jiti@2.4.2)(sass-embedded@1.89.0)(yaml@2.8.0)):
|
vite-plugin-svg-icons@2.0.1(vite@6.3.5(@types/node@22.15.19)(jiti@2.4.2)(sass-embedded@1.89.0)(yaml@2.8.0)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/svgo': 2.6.4
|
'@types/svgo': 2.6.4
|
||||||
@ -9894,6 +9918,8 @@ snapshots:
|
|||||||
|
|
||||||
word-wrap@1.2.5: {}
|
word-wrap@1.2.5: {}
|
||||||
|
|
||||||
|
wordwrap@1.0.0: {}
|
||||||
|
|
||||||
wrap-ansi@6.2.0:
|
wrap-ansi@6.2.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
ansi-styles: 4.3.0
|
ansi-styles: 4.3.0
|
||||||
|
|||||||
@ -1,36 +1,16 @@
|
|||||||
import { defineConfig, loadEnv } from "vite";
|
import { defineConfig, loadEnv } from "vite";
|
||||||
import vue from "@vitejs/plugin-vue";
|
|
||||||
import AutoImport from "unplugin-auto-import/vite";
|
|
||||||
import Components from "unplugin-vue-components/vite";
|
|
||||||
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
|
|
||||||
import UnoCSS from "unocss/vite";
|
|
||||||
import createSvgIcon from "./vite/plugins/svg-icon";
|
|
||||||
import path from "path";
|
import path from "path";
|
||||||
|
import plugins from "./.build/plugins";
|
||||||
|
|
||||||
// TODO: 开发一个环境变量ts类型处理的插件
|
// TODO: 开发一个环境变量ts类型处理的插件
|
||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig(({ mode, command }) => {
|
export default defineConfig((cnf) => {
|
||||||
|
const { mode } = cnf;
|
||||||
const env = loadEnv(mode, process.cwd());
|
const env = loadEnv(mode, process.cwd());
|
||||||
const { VITE_APP_ENV } = env;
|
const { VITE_APP_ENV } = env;
|
||||||
return {
|
return {
|
||||||
base: VITE_APP_ENV === "production" ? "/" : "/",
|
base: VITE_APP_ENV === "production" ? "/" : "/",
|
||||||
plugins: [
|
plugins: plugins(cnf),
|
||||||
UnoCSS(),
|
|
||||||
vue(),
|
|
||||||
AutoImport({
|
|
||||||
imports: ["vue"],
|
|
||||||
eslintrc: {
|
|
||||||
enabled: true,
|
|
||||||
},
|
|
||||||
resolvers: [ElementPlusResolver()],
|
|
||||||
dts: path.resolve(__dirname, "./types/auto-imports.d.ts"),
|
|
||||||
}),
|
|
||||||
Components({
|
|
||||||
resolvers: [ElementPlusResolver()],
|
|
||||||
dts: path.resolve(__dirname, "./types/components.d.ts"),
|
|
||||||
}),
|
|
||||||
createSvgIcon(command === "build"),
|
|
||||||
],
|
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
"@": path.resolve(__dirname, "./src"),
|
"@": path.resolve(__dirname, "./src"),
|
||||||
|
|||||||
@ -1,20 +0,0 @@
|
|||||||
import path from 'node:path';
|
|
||||||
import process from 'node:process'; // 新增此行引入 process 模块
|
|
||||||
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons';
|
|
||||||
|
|
||||||
export default function createSvgIcon(isBuild: boolean) {
|
|
||||||
return createSvgIconsPlugin({
|
|
||||||
iconDirs: [
|
|
||||||
path.resolve(process.cwd(), 'src/assets/icons/svg'),
|
|
||||||
path.resolve(process.cwd(), 'src/assets/icons/Buildings'),
|
|
||||||
path.resolve(process.cwd(), 'src/assets/icons/Business'),
|
|
||||||
path.resolve(process.cwd(), 'src/assets/icons/Device'),
|
|
||||||
path.resolve(process.cwd(), 'src/assets/icons/Document'),
|
|
||||||
path.resolve(process.cwd(), 'src/assets/icons/Others'),
|
|
||||||
path.resolve(process.cwd(), 'src/assets/icons/System'),
|
|
||||||
path.resolve(process.cwd(), 'src/assets/icons/User'),
|
|
||||||
],
|
|
||||||
symbolId: 'icon-[dir]-[name]',
|
|
||||||
svgoOptions: isBuild,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user