style: 修改了pinia文件路径、svgs文件路径
@ -27,7 +27,7 @@
|
||||
"pinia": "^2.1.7",
|
||||
"pinia-plugin-persist": "^1.0.0",
|
||||
"vue": "^3.4.21",
|
||||
"vue-i18n": "10.0.0-alpha.2",
|
||||
"vue-i18n": "10.0.0-alpha.3",
|
||||
"vue-router": "^4.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
38
pnpm-lock.yaml
generated
@ -1,9 +1,5 @@
|
||||
lockfileVersion: '6.0'
|
||||
|
||||
settings:
|
||||
autoInstallPeers: true
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
dependencies:
|
||||
dc-admin:
|
||||
specifier: 'link:'
|
||||
@ -21,8 +17,8 @@ dependencies:
|
||||
specifier: ^3.4.21
|
||||
version: 3.4.21(typescript@5.4.3)
|
||||
vue-i18n:
|
||||
specifier: 10.0.0-alpha.2
|
||||
version: 10.0.0-alpha.2(vue@3.4.21)
|
||||
specifier: 10.0.0-alpha.3
|
||||
version: 10.0.0-alpha.3(vue@3.4.21)
|
||||
vue-router:
|
||||
specifier: ^4.3.0
|
||||
version: 4.3.0(vue@3.4.21)
|
||||
@ -1126,24 +1122,24 @@ packages:
|
||||
resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==}
|
||||
dev: true
|
||||
|
||||
/@intlify/core-base@10.0.0-alpha.2:
|
||||
resolution: {integrity: sha512-bT+RwQtJ2BOwpt/lLlDtJM8+lfNG9TdWWGRYphDsV8123SiGb4Qm6iEjBN3/RKC/9hX+EHl2ENslURfioov3dQ==}
|
||||
/@intlify/core-base@10.0.0-alpha.3:
|
||||
resolution: {integrity: sha512-geqr/gY+g/PeAIMeFpi3hypeG7p+gGsHftc9K+jagW8775j6x4pvpeWa5CeHKm6b3lSKfGYZ9BPg74TOKt8B4Q==}
|
||||
engines: {node: '>= 16'}
|
||||
dependencies:
|
||||
'@intlify/message-compiler': 10.0.0-alpha.2
|
||||
'@intlify/shared': 10.0.0-alpha.2
|
||||
'@intlify/message-compiler': 10.0.0-alpha.3
|
||||
'@intlify/shared': 10.0.0-alpha.3
|
||||
dev: false
|
||||
|
||||
/@intlify/message-compiler@10.0.0-alpha.2:
|
||||
resolution: {integrity: sha512-OGwttsMwB2BUzhZLraoAfAqcza5UyLMEU013ort3LbmdE6ke/pFONFyxjNQdmFWzW2K868AIVgwx4zo8lbmhjg==}
|
||||
/@intlify/message-compiler@10.0.0-alpha.3:
|
||||
resolution: {integrity: sha512-WjM1KAl5enpOfprfVAJ3FzwACmizZFPgyV0sn+QXoWH8BG2ahVkf7uVEqQH0mvUr2rKKaScwpzhH3wZ5F7ZdPw==}
|
||||
engines: {node: '>= 16'}
|
||||
dependencies:
|
||||
'@intlify/shared': 10.0.0-alpha.2
|
||||
'@intlify/shared': 10.0.0-alpha.3
|
||||
source-map-js: 1.2.0
|
||||
dev: false
|
||||
|
||||
/@intlify/shared@10.0.0-alpha.2:
|
||||
resolution: {integrity: sha512-pWlpsC3IqkDuIH/5bNlyyiUbAXYymeNXkznORzPWT3qpAe8MazPOm14wMHGn/wESCdB5b9txQson4+CH0ym1hQ==}
|
||||
/@intlify/shared@10.0.0-alpha.3:
|
||||
resolution: {integrity: sha512-fi2q48i+C6sSCAt3vOj/9LD3tkr1wcvLt+ifZEHrpPiwHCyKLDYGp5qBNUHUBBA/iqFTeWdtHUbHE9z9OeTXkw==}
|
||||
engines: {node: '>= 16'}
|
||||
dev: false
|
||||
|
||||
@ -5189,14 +5185,14 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/vue-i18n@10.0.0-alpha.2(vue@3.4.21):
|
||||
resolution: {integrity: sha512-wP3+3k0TbdqvYDUn5lS5v7dtAsX0lP9J+CRcoP7mTQXsmkGurfruyd0rvw+DBnW+mULsoP/oygtj75HZFPp6YQ==}
|
||||
/vue-i18n@10.0.0-alpha.3(vue@3.4.21):
|
||||
resolution: {integrity: sha512-4+NpYfOUmeG7RKwaqJ2HglqQNbql7hmcy9w/1QZeVwCT0pDG/j93PZlqmsiGSEx7Fz2Ok+dWbd/vEUrOohVwYQ==}
|
||||
engines: {node: '>= 16'}
|
||||
peerDependencies:
|
||||
vue: ^3.0.0
|
||||
dependencies:
|
||||
'@intlify/core-base': 10.0.0-alpha.2
|
||||
'@intlify/shared': 10.0.0-alpha.2
|
||||
'@intlify/core-base': 10.0.0-alpha.3
|
||||
'@intlify/shared': 10.0.0-alpha.3
|
||||
'@vue/devtools-api': 6.6.1
|
||||
vue: 3.4.21(typescript@5.4.3)
|
||||
dev: false
|
||||
@ -5329,3 +5325,7 @@ packages:
|
||||
resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==}
|
||||
engines: {node: '>=12.20'}
|
||||
dev: true
|
||||
|
||||
settings:
|
||||
autoInstallPeers: true
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 939 B After Width: | Height: | Size: 939 B |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 796 B After Width: | Height: | Size: 796 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
@ -10,7 +10,7 @@
|
||||
import zhCN from "@arco-design/web-vue/es/locale/lang/zh-cn";
|
||||
import enUS from "@arco-design/web-vue/es/locale/lang/en-us";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { useThemeConfig } from "@/store/theme-config";
|
||||
import { useThemeConfig } from "@/store/modules/theme-config";
|
||||
const themeStore = useThemeConfig();
|
||||
const { language } = storeToRefs(themeStore);
|
||||
interface Lang {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import pinia from "@/store/index";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { useRoutesListStore } from "@/store/route-list";
|
||||
import { useRoutesListStore } from "@/store/modules/route-list";
|
||||
/**
|
||||
* 路由处理hooks,内置多种路由处理场景
|
||||
* @returns 路由方法
|
||||
|
||||
@ -3,7 +3,7 @@ import zhCN from "@/lang/modules/zhCN";
|
||||
import enUS from "@/lang/modules/enUS";
|
||||
import pinia from "@/store/index";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { useThemeConfig } from "@/store/theme-config";
|
||||
import { useThemeConfig } from "@/store/modules/theme-config";
|
||||
const themeStore = useThemeConfig(pinia);
|
||||
const { language } = storeToRefs(themeStore);
|
||||
/* 这里必须是messages名称 */
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
import Logo from "@/assets/img/logo.jpg";
|
||||
import Menu from "@/layout/components/Menu/index.vue";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { useThemeConfig } from "@/store/theme-config";
|
||||
import { useThemeConfig } from "@/store/modules/theme-config";
|
||||
|
||||
const themeStore = useThemeConfig();
|
||||
const { collapsed } = storeToRefs(themeStore);
|
||||
|
||||
@ -110,8 +110,8 @@ import { useI18n } from "vue-i18n";
|
||||
import { Modal } from "@arco-design/web-vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { useUserInfoStore } from "@/store/user-info";
|
||||
import { useThemeConfig } from "@/store/theme-config";
|
||||
import { useUserInfoStore } from "@/store/modules/user-info";
|
||||
import { useThemeConfig } from "@/store/modules/theme-config";
|
||||
const i18n = useI18n();
|
||||
const router = useRouter();
|
||||
const themeStore = useThemeConfig(pinia);
|
||||
|
||||
@ -18,8 +18,8 @@
|
||||
<script setup lang="ts">
|
||||
import Tabs from "@/layout/components/Tabs/index.vue";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { useThemeConfig } from "@/store/theme-config";
|
||||
import { useRoutesListStore } from "@/store/route-list";
|
||||
import { useThemeConfig } from "@/store/modules/theme-config";
|
||||
import { useRoutesListStore } from "@/store/modules/route-list";
|
||||
const themeStore = useThemeConfig();
|
||||
let { refreshPage } = storeToRefs(themeStore);
|
||||
const routerStore = useRoutesListStore();
|
||||
|
||||
@ -14,8 +14,8 @@
|
||||
<script setup lang="ts">
|
||||
import MenuItem from "@/layout/components/Menu/menu-item.vue";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { useThemeConfig } from "@/store/theme-config";
|
||||
import { useRoutesListStore } from "@/store/route-list";
|
||||
import { useThemeConfig } from "@/store/modules/theme-config";
|
||||
import { useRoutesListStore } from "@/store/modules/route-list";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useRoutingMethod } from "@/hooks/useRoutingMethod";
|
||||
const router = useRouter();
|
||||
|
||||
@ -53,9 +53,9 @@
|
||||
<script setup lang="ts">
|
||||
import { useRouter } from "vue-router";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { useRoutesListStore } from "@/store/route-list";
|
||||
import { useRoutesListStore } from "@/store/modules/route-list";
|
||||
import { useRoutingMethod } from "@/hooks/useRoutingMethod";
|
||||
import { useThemeConfig } from "@/store/theme-config";
|
||||
import { useThemeConfig } from "@/store/modules/theme-config";
|
||||
const router = useRouter();
|
||||
const routerStore = useRoutesListStore();
|
||||
const { tabsList, currentRoute } = storeToRefs(routerStore);
|
||||
|
||||
@ -4,8 +4,8 @@ import { createRouter, createWebHashHistory } from "vue-router";
|
||||
import { staticRoutes, notFoundAndNoPower } from "@/router/route.ts";
|
||||
import { initSetRouter, currentlyRoute } from "@/router/route-output";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { useUserInfoStore } from "@/store/user-info";
|
||||
import { useRoutesListStore } from "@/store/route-list";
|
||||
import { useUserInfoStore } from "@/store/modules/user-info";
|
||||
import { useRoutesListStore } from "@/store/modules/route-list";
|
||||
|
||||
/**
|
||||
* 创建vue的路由示例
|
||||
|
||||
@ -2,8 +2,8 @@ import pinia from "@/store/index";
|
||||
import router from "@/router/index.ts";
|
||||
import { dynamicRoutes } from "@/router/route";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { useUserInfoStore } from "@/store/user-info";
|
||||
import { useRoutesListStore } from "@/store/route-list";
|
||||
import { useUserInfoStore } from "@/store/modules/user-info";
|
||||
import { useRoutesListStore } from "@/store/modules/route-list";
|
||||
import { deepClone, arrayFlattened } from "@/utils/index";
|
||||
import { useRoutingMethod } from "@/hooks/useRoutingMethod";
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
import { Message } from "@arco-design/web-vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import pinia from "@/store/index";
|
||||
import { useUserInfoStore } from "@/store/user-info";
|
||||
import { useUserInfoStore } from "@/store/modules/user-info";
|
||||
const router = useRouter();
|
||||
const form = ref({
|
||||
username: "admin",
|
||||
|
||||
16
src/vite-env.d.ts
vendored
@ -1,8 +1,8 @@
|
||||
/// <reference types="vite/client" />
|
||||
declare module "*.vue" {
|
||||
import { defineComponent } from "vue";
|
||||
const component: ReturnType<typeof defineComponent>;
|
||||
export default component;
|
||||
}
|
||||
|
||||
declare module "pinia-plugin-persist";
|
||||
/// <reference types="vite/client" />
|
||||
declare module "*.vue" {
|
||||
import { defineComponent } from "vue";
|
||||
const component: ReturnType<typeof defineComponent>;
|
||||
export default component;
|
||||
}
|
||||
|
||||
declare module "pinia-plugin-persist";
|
||||
|
||||
@ -1,37 +1,37 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"useDefineForClassFields": true,
|
||||
"module": "ESNext",
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||
"skipLibCheck": true,
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "preserve",
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"@/*": ["src/*"]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"src/**/*",
|
||||
"src/**/*.ts",
|
||||
"src/**/*.tsx",
|
||||
"src/**/*.vue",
|
||||
"vite.config.ts",
|
||||
"src/auto-import.d.ts" // 与vite.config.ts中的dts路径一致
|
||||
], // 指定被编译文件所在的目录
|
||||
"exclude": ["node_modules", "dist", "**/*.js"], // 指定不需要被编译的目录
|
||||
"references": [{ "path": "./tsconfig.node.json" }]
|
||||
}
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"useDefineForClassFields": true,
|
||||
"module": "ESNext",
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||
"skipLibCheck": true,
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "preserve",
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"@/*": ["src/*"]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"src/**/*",
|
||||
"src/**/*.ts",
|
||||
"src/**/*.tsx",
|
||||
"src/**/*.vue",
|
||||
"vite.config.ts",
|
||||
"src/auto-import.d.ts" // 与vite.config.ts中的dts路径一致
|
||||
], // 指定被编译文件所在的目录
|
||||
"exclude": ["node_modules", "dist", "**/*.js"], // 指定不需要被编译的目录
|
||||
"references": [{ "path": "./tsconfig.node.json" }]
|
||||
}
|
||||
|
||||
@ -30,8 +30,8 @@ export default defineConfig(({ mode }) => {
|
||||
style: "css"
|
||||
}),
|
||||
createSvgIconsPlugin({
|
||||
// 配置src下存放svg的路径,这里表示在src/icons文件夹下
|
||||
iconDirs: [path.resolve(process.cwd(), "src/assets/icons")],
|
||||
// 配置src下存放svg的路径,这里表示在src/assets/svgs文件夹下
|
||||
iconDirs: [path.resolve(process.cwd(), "src/assets/svgs")],
|
||||
symbolId: "icon-[dir]-[name]"
|
||||
}),
|
||||
AutoImport({
|
||||
|
||||