bzkf3 2 年之前
父節點
當前提交
61d653d505
共有 9 個文件被更改,包括 238 次插入90 次删除
  1. 4 0
      auto-imports.d.ts
  2. 15 7
      components.d.ts
  3. 1 0
      index.html
  4. 3 0
      package.json
  5. 105 0
      pnpm-lock.yaml
  6. 22 0
      shims.d.ts
  7. 5 3
      src/App.vue
  8. 74 76
      src/store/index.ts
  9. 9 4
      vite.config.ts

+ 4 - 0
auto-imports.d.ts

@@ -41,6 +41,8 @@ declare global {
   const getCurrentInstance: typeof import('vue')['getCurrentInstance']
   const getCurrentScope: typeof import('vue')['getCurrentScope']
   const h: typeof import('vue')['h']
+  const handleAutoCompleteTask: typeof import('./src/composables/steps')['handleAutoCompleteTask']
+  const handleCompleteTask: typeof import('./src/composables/steps')['handleCompleteTask']
   const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch']
   const inject: typeof import('vue')['inject']
   const isDark: typeof import('./src/composables/dark')['isDark']
@@ -327,6 +329,8 @@ declare module 'vue' {
     readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
     readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
     readonly h: UnwrapRef<typeof import('vue')['h']>
+    readonly handleAutoCompleteTask: UnwrapRef<typeof import('./src/composables/steps')['handleAutoCompleteTask']>
+    readonly handleCompleteTask: UnwrapRef<typeof import('./src/composables/steps')['handleCompleteTask']>
     readonly ignorableWatch: UnwrapRef<typeof import('@vueuse/core')['ignorableWatch']>
     readonly inject: UnwrapRef<typeof import('vue')['inject']>
     readonly isDark: UnwrapRef<typeof import('./src/composables/dark')['isDark']>

+ 15 - 7
components.d.ts

@@ -9,15 +9,14 @@ export {}
 
 declare module '@vue/runtime-core' {
   export interface GlobalComponents {
+    Bjqk: typeof import('./src/components/step/link/bjqk.vue')['default']
     BreadCrumb: typeof import('./src/components/BreadCrumb/index.vue')['default']
     CommonFooter: typeof import('./src/components/commonFooter/index.vue')['default']
     ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
     ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
     ElButton: typeof import('element-plus/es')['ElButton']
-    ElCarousel: typeof import('element-plus/es')['ElCarousel']
-    ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
-    ElCollapse: typeof import('element-plus/es')['ElCollapse']
-    ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
+    ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
+    ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
     ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
     ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
     ElDialog: typeof import('element-plus/es')['ElDialog']
@@ -25,19 +24,28 @@ declare module '@vue/runtime-core' {
     ElFormItem: typeof import('element-plus/es')['ElFormItem']
     ElIcon: typeof import('element-plus/es')['ElIcon']
     ElInput: typeof import('element-plus/es')['ElInput']
-    ElMenu: typeof import('element-plus/es')['ElMenu']
-    ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
+    ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
+    ElLink: typeof import('element-plus/es')['ElLink']
     ElOption: typeof import('element-plus/es')['ElOption']
     ElPagination: typeof import('element-plus/es')['ElPagination']
+    ElRadio: typeof import('element-plus/es')['ElRadio']
+    ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
     ElSelect: typeof import('element-plus/es')['ElSelect']
-    ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
+    ElStep: typeof import('element-plus/es')['ElStep']
+    ElSteps: typeof import('element-plus/es')['ElSteps']
     ElTable: typeof import('element-plus/es')['ElTable']
     ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
+    'I:mdi:horizontalLine': typeof import('~icons/mdi/horizontal-line')['default']
+    'I:mdi:tick': typeof import('~icons/mdi/tick')['default']
     LeftSider: typeof import('./src/components/leftSider/index.vue')['default']
     LeftSiderStu: typeof import('./src/components/leftSiderStu/index.vue')['default']
     NavHeader: typeof import('./src/components/NavHeader/index.vue')['default']
     RouterLink: typeof import('vue-router')['RouterLink']
     RouterView: typeof import('vue-router')['RouterView']
     StatisticsSchool: typeof import('./src/components/statisticsSchool/index.vue')['default']
+    Szcjckqx: typeof import('./src/components/step/link/szcjckqx.vue')['default']
+    TheCard: typeof import('./src/components/TheCard.vue')['default']
+    TinymceVue: typeof import('./src/components/TinymceVue/index.vue')['default']
+    Xgstda: typeof import('./src/components/step/link/xgstda.vue')['default']
   }
 }

+ 1 - 0
index.html

@@ -20,6 +20,7 @@
         document.documentElement.classList.toggle('dark', true)
     })()
   </script> -->
+  <script src="/lib/leader-line.js"></script>
   <script src="/config.js"></script>
   <script type="module" src="/src/main.ts"></script>
 </body>

+ 3 - 0
package.json

@@ -19,6 +19,7 @@
     "pinia": "^2.0.34",
     "sass": "^1.62.0",
     "swiper": "^9.2.3",
+    "tinymce": "^6.4.2",
     "vue": "^3.2.47",
     "vue-awesome-swiper": "^5.0.1",
     "vue-router": "^4.0.13"
@@ -26,6 +27,7 @@
   "devDependencies": {
     "@antfu/eslint-config": "^0.38.2",
     "@iconify-json/carbon": "^1.1.16",
+    "@iconify/json": "^2.2.62",
     "@types/node": "^18.15.11",
     "@unocss/reset": "^0.50.6",
     "@vitejs/plugin-vue": "^4.1.0",
@@ -41,6 +43,7 @@
     "taze": "^0.9.1",
     "typescript": "^5.0.2",
     "unplugin-auto-import": "^0.15.2",
+    "unplugin-icons": "^0.16.1",
     "unplugin-vue-components": "^0.24.1",
     "unplugin-vue-macros": "^1.11.2",
     "vite": "^4.2.1",

+ 105 - 0
pnpm-lock.yaml

@@ -19,6 +19,9 @@ dependencies:
   swiper:
     specifier: ^9.2.3
     version: 9.2.3
+  tinymce:
+    specifier: ^6.4.2
+    version: 6.4.2
   vue:
     specifier: ^3.2.47
     version: 3.2.47
@@ -36,6 +39,9 @@ devDependencies:
   '@iconify-json/carbon':
     specifier: ^1.1.16
     version: 1.1.16
+  '@iconify/json':
+    specifier: ^2.2.62
+    version: 2.2.62
   '@types/node':
     specifier: ^18.15.11
     version: 18.15.11
@@ -81,6 +87,9 @@ devDependencies:
   unplugin-auto-import:
     specifier: ^0.15.2
     version: 0.15.2(@vueuse/core@9.13.0)
+  unplugin-icons:
+    specifier: ^0.16.1
+    version: 0.16.1
   unplugin-vue-components:
     specifier: ^0.24.1
     version: 0.24.1(vue@3.2.47)
@@ -204,6 +213,13 @@ packages:
       - typescript
     dev: true
 
+  /@antfu/install-pkg@0.1.1:
+    resolution: {integrity: sha512-LyB/8+bSfa0DFGC06zpCEfs89/XoWZwws5ygEa5D+Xsm3OfI+aXQ86VgVG7Acyef+rSZ5HE7J8rrxzrQeM3PjQ==}
+    dependencies:
+      execa: 5.1.1
+      find-up: 5.0.0
+    dev: true
+
   /@antfu/ni@0.20.0:
     resolution: {integrity: sha512-mBgAuq2b0daSA/14LMyjEjaInD7/Zd7KVXZge7bQPKmtQJFqy9/pWBml6DMkMreeHQEomMtIbbeqReNJ/74kjA==}
     hasBin: true
@@ -544,10 +560,30 @@ packages:
       '@iconify/types': 2.0.0
     dev: true
 
+  /@iconify/json@2.2.62:
+    resolution: {integrity: sha512-61Ix9UTlnguZiAZtjM+91dNnu7G47W85PIB7d0QAfV1i+O0Fm1WH6ZyJfckGtnyHuKXxR8Xtn5oOexzVYCci5A==}
+    dependencies:
+      '@iconify/types': 2.0.0
+      pathe: 1.1.0
+    dev: true
+
   /@iconify/types@2.0.0:
     resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==}
     dev: true
 
+  /@iconify/utils@2.1.5:
+    resolution: {integrity: sha512-6MvDI+I6QMvXn5rK9KQGdpEE4mmLTcuQdLZEiX5N+uZB+vc4Yw9K1OtnOgkl8mp4d9X0UrILREyZgF1NUwUt+Q==}
+    dependencies:
+      '@antfu/install-pkg': 0.1.1
+      '@antfu/utils': 0.7.2
+      '@iconify/types': 2.0.0
+      debug: 4.3.4
+      kolorist: 1.7.0
+      local-pkg: 0.4.3
+    transitivePeerDependencies:
+      - supports-color
+    dev: true
+
   /@jridgewell/sourcemap-codec@1.4.15:
     resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==}
     dev: true
@@ -2825,6 +2861,21 @@ packages:
     engines: {node: '>=0.10.0'}
     dev: true
 
+  /execa@5.1.1:
+    resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==}
+    engines: {node: '>=10'}
+    dependencies:
+      cross-spawn: 7.0.3
+      get-stream: 6.0.1
+      human-signals: 2.1.0
+      is-stream: 2.0.1
+      merge-stream: 2.0.0
+      npm-run-path: 4.0.1
+      onetime: 5.1.2
+      signal-exit: 3.0.7
+      strip-final-newline: 2.0.0
+    dev: true
+
   /execa@7.1.1:
     resolution: {integrity: sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==}
     engines: {node: ^14.18.0 || ^16.14.0 || >=18.0.0}
@@ -3213,6 +3264,11 @@ packages:
       - supports-color
     dev: true
 
+  /human-signals@2.1.0:
+    resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==}
+    engines: {node: '>=10.17.0'}
+    dev: true
+
   /human-signals@4.3.1:
     resolution: {integrity: sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==}
     engines: {node: '>=14.18.0'}
@@ -3462,6 +3518,11 @@ packages:
       call-bind: 1.0.2
     dev: true
 
+  /is-stream@2.0.1:
+    resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==}
+    engines: {node: '>=8'}
+    dev: true
+
   /is-stream@3.0.0:
     resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==}
     engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@@ -4234,6 +4295,13 @@ packages:
       - supports-color
     dev: true
 
+  /npm-run-path@4.0.1:
+    resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==}
+    engines: {node: '>=8'}
+    dependencies:
+      path-key: 3.1.1
+    dev: true
+
   /npm-run-path@5.1.0:
     resolution: {integrity: sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==}
     engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@@ -5121,6 +5189,11 @@ packages:
     engines: {node: '>=4'}
     dev: true
 
+  /strip-final-newline@2.0.0:
+    resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==}
+    engines: {node: '>=6'}
+    dev: true
+
   /strip-final-newline@3.0.0:
     resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==}
     engines: {node: '>=12'}
@@ -5215,6 +5288,10 @@ packages:
     resolution: {integrity: sha512-iyziEiyFxX4kyxSp+MtY1oCH/lvjH3PxFN8PGCDeqcZWAJ/i+9y+nL85w99PxVzrIvew/GSkSbDYtiGVa85Afg==}
     dev: true
 
+  /tinymce@6.4.2:
+    resolution: {integrity: sha512-te+4c8PoAwTKPMBQtMQehnSZlOO9Ay5tDgaRFJKBehYb6SlX2PYZ0v3oe/cmiv5EfqdwZLkEMXk2MNOeApZZLg==}
+    dev: false
+
   /tinypool@0.4.0:
     resolution: {integrity: sha512-2ksntHOKf893wSAH4z/+JbPpi92esw8Gn9N2deXX+B0EO92hexAVI9GIZZPx7P5aYo5KULfeOSt3kMOmSOy6uA==}
     engines: {node: '>=14.0.0'}
@@ -5451,6 +5528,34 @@ packages:
       vite: 4.2.1(@types/node@18.15.11)(sass@1.62.0)
     dev: true
 
+  /unplugin-icons@0.16.1:
+    resolution: {integrity: sha512-qTunFUkpAyDnwzwV7YV1ZgCWRYfLuURcCurhhXOWMy2ipY88qx1pADvral2hJu4Xymh0X0t3Zcll3BIru2AVLQ==}
+    peerDependencies:
+      '@svgr/core': '>=7.0.0'
+      '@vue/compiler-sfc': ^3.0.2 || ^2.7.0
+      vue-template-compiler: ^2.6.12
+      vue-template-es2015-compiler: ^1.9.0
+    peerDependenciesMeta:
+      '@svgr/core':
+        optional: true
+      '@vue/compiler-sfc':
+        optional: true
+      vue-template-compiler:
+        optional: true
+      vue-template-es2015-compiler:
+        optional: true
+    dependencies:
+      '@antfu/install-pkg': 0.1.1
+      '@antfu/utils': 0.7.2
+      '@iconify/utils': 2.1.5
+      debug: 4.3.4
+      kolorist: 1.7.0
+      local-pkg: 0.4.3
+      unplugin: 1.3.1
+    transitivePeerDependencies:
+      - supports-color
+    dev: true
+
   /unplugin-vue-components@0.24.1(vue@3.2.47):
     resolution: {integrity: sha512-T3A8HkZoIE1Cja95xNqolwza0yD5IVlgZZ1PVAGvVCx8xthmjsv38xWRCtHtwl+rvZyL9uif42SRkDGw9aCfMA==}
     engines: {node: '>=14'}

+ 22 - 0
shims.d.ts

@@ -3,3 +3,25 @@ declare module '*.vue' {
   const component: DefineComponent<{}, {}, any>
   export default component
 }
+
+declare class LeaderLine {
+  constructor(startElement: HTMLElement, endElement: HTMLElement, options?: any) {
+
+  }
+
+  position() {}
+  _id: number
+
+  static captionLabel: any
+  static pathLabel: any
+
+}
+
+declare interface Window {
+  GLOBAL_CONFIG: {
+    yzy: string
+    uc: string
+  }
+  // handleCompleteTask: (gid: number, pid: number, idy: number) => void
+  // handleAutoCompleteTask: () => void
+}

+ 5 - 3
src/App.vue

@@ -6,12 +6,14 @@ zhCn.el.pagination.goto = '跳至'
 
 <template>
   <el-config-provider :locale="zhCn">
-    <RouterView/>
+    <Suspense>
+      <RouterView />
+    </Suspense>
   </el-config-provider>
-
 </template>
+
 <style>
-body{
+body {
   background: #f2f2f2;
 }
 </style>

+ 74 - 76
src/store/index.ts

@@ -1,85 +1,83 @@
+import type { IUser } from './user'
+
 // 以下代码在build时自动移除,无需手动注释
 // #ifdef DEV
-// import './user/tmp'
-// #endif
-// import type { User } from './user/index.d'
-
-let obj = {
-  "user_id": "244521",
-  "user_name": "lwadmin",
-  "email": "lwadmin@bozedu.net",
-  "lastlogintime": "2023-04-13 16:27:42",
-  "regdate": "2021-08-18 17:08:49",
-  "status": "0",
-  "user_role_id": "72",
-  "user_role_name": "学校管理员",
-  "user_avatar": {
-    "big": "https://openapi.dev.bozedu.net/template/default/static/img/avatar_teacher_big.png",
-    "middle": "https://openapi.dev.bozedu.net/template/default/static/img/avatar_teacher_middle.png",
-    "small": "https://openapi.dev.bozedu.net/template/default/static/img/avatar_teacher_small.png"
+sessionStorage.setItem('userInfo', JSON.stringify({
+  user_id: '244521',
+  user_name: 'lwadmin',
+  email: 'lwadmin@bozedu.net',
+  lastlogintime: '2023-04-13 16:27:42',
+  regdate: '2021-08-18 17:08:49',
+  status: '0',
+  user_role_id: '72',
+  user_role_name: '学校管理员',
+  user_avatar: {
+    big: 'https://openapi.dev.bozedu.net/template/default/static/img/avatar_teacher_big.png',
+    middle: 'https://openapi.dev.bozedu.net/template/default/static/img/avatar_teacher_middle.png',
+    small: 'https://openapi.dev.bozedu.net/template/default/static/img/avatar_teacher_small.png',
   },
-  "user_no": {"no_title": "学号", "no": ""},
-  "token": "0036PlXjuFCm7ynYhfQD4PTygChdt85Cy85yHL1QzTyNEP1McOL9j1fhEhr4ZxcXfREXvnqSqRx7mqFt5bedpJ_a7DoM",
-  "user_realname": "李文校管dev",
-  "user_phone": "",
-  "idcard": "",
-  "gender": "0",
-  "gender_char": "保密",
-  "qq": "",
-  "nationality": "",
-  "intro": "",
-  "address": "",
-  "education": "",
-  "area_info": {
-    "area_id1": "10",
-    "area_id2": "166",
-    "area_id3": "2074",
-    "area_id4": "14296",
-    "area_id1_char": "江苏省",
-    "area_id2_char": "苏州市",
-    "area_id3_char": "相城区",
-    "area_id4_char": "元和街道",
-    "area_code1": "320000000000",
-    "area_code2": "320500000000",
-    "area_code3": "320507000000",
-    "area_code4": "",
-    "area_code_dist": "320507000000"
+  user_no: { no_title: '学号', no: '' },
+  token: '0036PlXjuFCm7ynYhfQD4PTygChdt85Cy85yHL1QzTyNEP1McOL9j1fhEhr4ZxcXfREXvnqSqRx7mqFt5bedpJ_a7DoM',
+  user_realname: '李文校管dev',
+  user_phone: '',
+  idcard: '',
+  gender: '0',
+  gender_char: '保密',
+  qq: '',
+  nationality: '',
+  intro: '',
+  address: '',
+  education: '',
+  area_info: {
+    area_id1: '10',
+    area_id2: '166',
+    area_id3: '2074',
+    area_id4: '14296',
+    area_id1_char: '江苏省',
+    area_id2_char: '苏州市',
+    area_id3_char: '相城区',
+    area_id4_char: '元和街道',
+    area_code1: '320000000000',
+    area_code2: '320500000000',
+    area_code3: '320507000000',
+    area_code4: '',
+    area_code_dist: '320507000000',
   },
-  "sm_info": {
-    "sm_id": "267",
-    "adminid": "155033",
-    "sm_name": "博智测试学校",
-    "is_org": "0",
-    "up_org": "381",
-    "area_id1": "10",
-    "area_id2": "166",
-    "area_id3": "2074",
-    "area_id4": "14296",
-    "major_mode": "1",
-    "powers": {"vip_shiti": "0", "vip_sucai": "1", "vip_aicheck": "1"}
+  sm_info: {
+    sm_id: '267',
+    adminid: '155033',
+    sm_name: '博智测试学校',
+    is_org: '0',
+    up_org: '381',
+    area_id1: '10',
+    area_id2: '166',
+    area_id3: '2074',
+    area_id4: '14296',
+    major_mode: '1',
+    powers: { vip_shiti: '0', vip_sucai: '1', vip_aicheck: '1' },
   },
-  "cm_info": [],
-  "first_cm_id": "",
-  "first_cm_name": "",
-  "renke_grade": [],
-  "renke_subject": {},
-  "related_desc": "暂无任课",
-  "bind3rd": {"wechat": "0"},
-  "my_org": [],
-  "org_info": {
-    "org": null,
-    "org_id": null,
-    "telephone": "",
-    "telephone_short": "",
-    "is_org": "1",
-    "up_org": null,
-    "up_org_name": null,
-    "up_org_info": {"sm_id": "", "sm_name": ""}
-  }
-}
+  cm_info: [],
+  first_cm_id: '',
+  first_cm_name: '',
+  renke_grade: [],
+  renke_subject: {},
+  related_desc: '暂无任课',
+  bind3rd: { wechat: '0' },
+  my_org: [],
+  org_info: {
+    org: null,
+    org_id: null,
+    telephone: '',
+    telephone_short: '',
+    is_org: '1',
+    up_org: null,
+    up_org_name: null,
+    up_org_info: { sm_id: '', sm_name: '' },
+  },
+}))
+// #endif
 
-// export const user = ref<User>(JSON.parse(sessionStorage.getItem('userInfo') ?? '{}'))
-export const user = ref<User>(JSON.parse(sessionStorage.getItem('userInfo') ?? JSON.stringify(obj)))
+export const user = ref<IUser>(JSON.parse(sessionStorage.getItem('userInfo') ?? '{}'))
 
 watch(
   () => user.value,

+ 9 - 4
vite.config.ts

@@ -9,12 +9,14 @@ import Components from 'unplugin-vue-components/vite'
 import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
 import AutoImport from 'unplugin-auto-import/vite'
 import VueMacros from 'unplugin-vue-macros/vite'
+import Icons from 'unplugin-icons/vite'
+import IconsResolver from 'unplugin-icons/resolver'
 
 export default defineConfig({
   resolve: {
     alias: {
       '~/': `${path.resolve(__dirname, 'src')}/`,
-      '@':`${path.resolve(__dirname, 'src')}`,
+      '@': `${path.resolve(__dirname, 'src')}`,
 
     },
   },
@@ -28,7 +30,7 @@ export default defineConfig({
     }),
     WindiCss(),
     // https://github.com/hannoeru/vite-plugin-pages
-    Pages({extensions: ['vue']}),
+    Pages({ extensions: ['vue'] }),
 
     // https://github.com/antfu/unplugin-auto-import
     AutoImport({
@@ -49,9 +51,12 @@ export default defineConfig({
     // https://github.com/antfu/vite-plugin-components
     Components({
       dts: true,
-      resolvers: [ElementPlusResolver()],
+      resolvers: [ElementPlusResolver(), IconsResolver()],
+    }),
+    Icons({
+      compiler: 'vue3',
+      autoInstall: true,
     }),
-
     // https://github.com/antfu/unocss
     // see unocss.config.ts for config
   ],