From 06fa54fd25233ca94d02f1307b3a13a562287fef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BB=96=E5=BD=A6=E6=A3=8B?= Date: Wed, 6 Mar 2024 10:23:55 +0800 Subject: [PATCH] =?UTF-8?q?feat(ui):=20=E7=AE=A1=E7=90=86=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E5=9F=BA=E7=A1=80=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gpt-vue/pnpm-lock.yaml | 321 +++++++++++++++++- gpt-vue/projects/vue-admin/package.json | 2 + .../projects/vue-admin/src/.env.development | 3 + .../projects/vue-admin/src/.env.production | 3 + gpt-vue/projects/vue-admin/src/App.vue | 82 ----- .../projects/vue-admin/src/assets/base.css | 86 ----- .../projects/vue-admin/src/assets/main.css | 35 -- .../vue-admin/src/components/CustomLayout.vue | 76 +++++ .../vue-admin/src/components/HelloWorld.vue | 41 --- .../vue-admin/src/components/PageWrapper.vue | 23 ++ .../vue-admin/src/components/SystemMenu.vue | 29 ++ .../vue-admin/src/components/TheWelcome.vue | 88 ----- .../vue-admin/src/components/WelcomeItem.vue | 87 ----- .../src/components/icons/IconCommunity.vue | 7 - .../components/icons/IconDocumentation.vue | 7 - .../src/components/icons/IconEcosystem.vue | 7 - .../src/components/icons/IconSupport.vue | 7 - .../src/components/icons/IconTooling.vue | 19 -- gpt-vue/projects/vue-admin/src/main.ts | 30 +- .../projects/vue-admin/src/router/index.ts | 18 +- gpt-vue/projects/vue-admin/src/router/menu.ts | 27 ++ .../vue-admin/src/views/AboutView.vue | 15 - .../src/views/ApiKey/ApiKeyContainer.vue | 4 + .../views/ChatModel/ChatModelContainer.vue | 4 + .../vue-admin/src/views/DashboardView.vue | 4 + .../projects/vue-admin/src/views/HomeView.vue | 9 - .../projects/vue-admin/src/views/NotFound.vue | 19 ++ .../src/views/Product/ProductContainer.vue | 4 + .../src/views/Role/RoleContainer.vue | 4 + .../src/views/User/UserContainer.vue | 4 + gpt-vue/projects/vue-admin/tsconfig.json | 9 +- gpt-vue/projects/vue-admin/tsconfig.node.json | 2 +- gpt-vue/projects/vue-admin/vite.config.ts | 34 +- 33 files changed, 583 insertions(+), 527 deletions(-) create mode 100644 gpt-vue/projects/vue-admin/src/.env.development create mode 100644 gpt-vue/projects/vue-admin/src/.env.production delete mode 100644 gpt-vue/projects/vue-admin/src/assets/base.css delete mode 100644 gpt-vue/projects/vue-admin/src/assets/main.css create mode 100644 gpt-vue/projects/vue-admin/src/components/CustomLayout.vue delete mode 100644 gpt-vue/projects/vue-admin/src/components/HelloWorld.vue create mode 100644 gpt-vue/projects/vue-admin/src/components/PageWrapper.vue create mode 100644 gpt-vue/projects/vue-admin/src/components/SystemMenu.vue delete mode 100644 gpt-vue/projects/vue-admin/src/components/TheWelcome.vue delete mode 100644 gpt-vue/projects/vue-admin/src/components/WelcomeItem.vue delete mode 100644 gpt-vue/projects/vue-admin/src/components/icons/IconCommunity.vue delete mode 100644 gpt-vue/projects/vue-admin/src/components/icons/IconDocumentation.vue delete mode 100644 gpt-vue/projects/vue-admin/src/components/icons/IconEcosystem.vue delete mode 100644 gpt-vue/projects/vue-admin/src/components/icons/IconSupport.vue delete mode 100644 gpt-vue/projects/vue-admin/src/components/icons/IconTooling.vue create mode 100644 gpt-vue/projects/vue-admin/src/router/menu.ts delete mode 100644 gpt-vue/projects/vue-admin/src/views/AboutView.vue create mode 100644 gpt-vue/projects/vue-admin/src/views/ApiKey/ApiKeyContainer.vue create mode 100644 gpt-vue/projects/vue-admin/src/views/ChatModel/ChatModelContainer.vue create mode 100644 gpt-vue/projects/vue-admin/src/views/DashboardView.vue delete mode 100644 gpt-vue/projects/vue-admin/src/views/HomeView.vue create mode 100644 gpt-vue/projects/vue-admin/src/views/NotFound.vue create mode 100644 gpt-vue/projects/vue-admin/src/views/Product/ProductContainer.vue create mode 100644 gpt-vue/projects/vue-admin/src/views/Role/RoleContainer.vue create mode 100644 gpt-vue/projects/vue-admin/src/views/User/UserContainer.vue diff --git a/gpt-vue/pnpm-lock.yaml b/gpt-vue/pnpm-lock.yaml index dc72e589..70236c2c 100644 --- a/gpt-vue/pnpm-lock.yaml +++ b/gpt-vue/pnpm-lock.yaml @@ -12,8 +12,13 @@ importers: specifier: ^5.0.5 version: 5.0.5 + packages: {} + projects/vue-admin: dependencies: + '@arco-design/web-vue': + specifier: ^2.54.6 + version: 2.54.6(vue@3.4.21) pinia: specifier: ^2.1.7 version: 2.1.7(typescript@5.3.3)(vue@3.4.21) @@ -51,6 +56,9 @@ importers: eslint-plugin-vue: specifier: ^9.17.0 version: 9.22.0(eslint@8.57.0) + less: + specifier: ^4.2.0 + version: 4.2.0 npm-run-all2: specifier: ^6.1.1 version: 6.1.2 @@ -59,7 +67,7 @@ importers: version: 5.3.3 vite: specifier: ^5.0.11 - version: 5.1.5(@types/node@20.11.24) + version: 5.1.5(@types/node@20.11.24)(less@4.2.0) vue-tsc: specifier: ^1.8.27 version: 1.8.27(typescript@5.3.3) @@ -116,6 +124,58 @@ importers: specifier: ^1.8.27 version: 1.8.27(typescript@5.3.3) + projects/vue-mobile: + dependencies: + pinia: + specifier: ^2.1.7 + version: 2.1.7(typescript@5.3.3)(vue@3.4.21) + vue: + specifier: ^3.4.15 + version: 3.4.21(typescript@5.3.3) + vue-router: + specifier: ^4.2.5 + version: 4.3.0(vue@3.4.21) + devDependencies: + '@rushstack/eslint-patch': + specifier: ^1.3.3 + version: 1.7.2 + '@tsconfig/node20': + specifier: ^20.1.2 + version: 20.1.2 + '@types/node': + specifier: ^20.11.10 + version: 20.11.24 + '@vitejs/plugin-vue': + specifier: ^5.0.3 + version: 5.0.4(vite@5.1.5)(vue@3.4.21) + '@vitejs/plugin-vue-jsx': + specifier: ^3.1.0 + version: 3.1.0(vite@5.1.5)(vue@3.4.21) + '@vue/eslint-config-typescript': + specifier: ^12.0.0 + version: 12.0.0(eslint-plugin-vue@9.22.0)(eslint@8.57.0)(typescript@5.3.3) + '@vue/tsconfig': + specifier: ^0.5.1 + version: 0.5.1 + eslint: + specifier: ^8.49.0 + version: 8.57.0 + eslint-plugin-vue: + specifier: ^9.17.0 + version: 9.22.0(eslint@8.57.0) + npm-run-all2: + specifier: ^6.1.1 + version: 6.1.2 + typescript: + specifier: ~5.3.0 + version: 5.3.3 + vite: + specifier: ^5.0.11 + version: 5.1.5(@types/node@20.11.24)(less@4.2.0) + vue-tsc: + specifier: ^1.8.27 + version: 1.8.27(typescript@5.3.3) + projects/vue-web: dependencies: pinia: @@ -163,7 +223,7 @@ importers: version: 5.3.3 vite: specifier: ^5.0.11 - version: 5.1.5(@types/node@20.11.24) + version: 5.1.5(@types/node@20.11.24)(less@4.2.0) vue-tsc: specifier: ^1.8.27 version: 1.8.27(typescript@5.3.3) @@ -183,6 +243,28 @@ packages: '@jridgewell/trace-mapping': 0.3.25 dev: true + /@arco-design/color@0.4.0: + resolution: {integrity: sha512-s7p9MSwJgHeL8DwcATaXvWT3m2SigKpxx4JA1BGPHL4gfvaQsmQfrLBDpjOJFJuJ2jG2dMt3R3P8Pm9E65q18g==} + dependencies: + color: 3.2.1 + dev: false + + /@arco-design/web-vue@2.54.6(vue@3.4.21): + resolution: {integrity: sha512-Qx+HHL5G5gIvrbxGC6ZF/L8ACD1L/RkPJd9e4SR+vI6lEg+nGlUBplkR4pY7e7mqYXY2H6uzh+radT+QxXKVRg==} + peerDependencies: + vue: ^3.1.0 + dependencies: + '@arco-design/color': 0.4.0 + b-tween: 0.3.3 + b-validate: 1.5.3 + compute-scroll-into-view: 1.0.20 + dayjs: 1.11.10 + number-precision: 1.6.0 + resize-observer-polyfill: 1.5.1 + scroll-into-view-if-needed: 2.2.31 + vue: 3.4.21(typescript@5.3.3) + dev: false + /@babel/code-frame@7.23.5: resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} engines: {node: '>=6.9.0'} @@ -1080,7 +1162,7 @@ packages: '@babel/core': 7.24.0 '@babel/plugin-transform-typescript': 7.23.6(@babel/core@7.24.0) '@vue/babel-plugin-jsx': 1.2.1(@babel/core@7.24.0) - vite: 5.1.5(@types/node@20.11.24) + vite: 5.1.5(@types/node@20.11.24)(less@4.2.0) vue: 3.4.21(typescript@5.3.3) transitivePeerDependencies: - supports-color @@ -1093,7 +1175,7 @@ packages: vite: ^5.0.0 vue: ^3.2.25 dependencies: - vite: 5.1.5(@types/node@20.11.24) + vite: 5.1.5(@types/node@20.11.24)(less@4.2.0) vue: 3.4.21(typescript@5.3.3) dev: true @@ -1331,6 +1413,14 @@ packages: engines: {node: '>=8'} dev: true + /b-tween@0.3.3: + resolution: {integrity: sha512-oEHegcRpA7fAuc9KC4nktucuZn2aS8htymCPcP3qkEGPqiBH+GfqtqoG2l7LxHngg6O0HFM7hOeOYExl1Oz4ZA==} + dev: false + + /b-validate@1.5.3: + resolution: {integrity: sha512-iCvCkGFskbaYtfQ0a3GmcQCHl/Sv1GufXFGuUQ+FE+WJa7A/espLOuFIn09B944V8/ImPj71T4+rTASxO2PAuA==} + dev: false + /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: true @@ -1405,7 +1495,6 @@ packages: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: color-name: 1.1.3 - dev: true /color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} @@ -1416,11 +1505,27 @@ packages: /color-name@1.1.3: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - dev: true /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - dev: true + + /color-string@1.9.1: + resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} + dependencies: + color-name: 1.1.4 + simple-swizzle: 0.2.2 + dev: false + + /color@3.2.1: + resolution: {integrity: sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==} + dependencies: + color-convert: 1.9.3 + color-string: 1.9.1 + dev: false + + /compute-scroll-into-view@1.0.20: + resolution: {integrity: sha512-UCB0ioiyj8CRjtrvaceBLqqhZCVP+1B8+NWQhmdsm0VXOJtobBCf1dBQmebCCo34qZmUwZfIH2MZLqNHazrfjg==} + dev: false /computeds@0.0.1: resolution: {integrity: sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==} @@ -1434,6 +1539,12 @@ packages: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} dev: true + /copy-anything@2.0.6: + resolution: {integrity: sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==} + dependencies: + is-what: 3.14.1 + dev: true + /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -1452,6 +1563,10 @@ packages: /csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + /dayjs@1.11.10: + resolution: {integrity: sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==} + dev: false + /de-indent@1.0.2: resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} dev: true @@ -1506,6 +1621,15 @@ packages: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} + /errno@0.1.8: + resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} + hasBin: true + requiresBuild: true + dependencies: + prr: 1.0.1 + dev: true + optional: true + /esbuild@0.19.12: resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} engines: {node: '>=12'} @@ -1816,6 +1940,12 @@ packages: slash: 3.0.0 dev: true + /graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + requiresBuild: true + dev: true + optional: true + /graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true @@ -1840,11 +1970,28 @@ packages: engines: {node: '>=8'} dev: true + /iconv-lite@0.6.3: + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} + engines: {node: '>=0.10.0'} + requiresBuild: true + dependencies: + safer-buffer: 2.1.2 + dev: true + optional: true + /ignore@5.3.1: resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} engines: {node: '>= 4'} dev: true + /image-size@0.5.5: + resolution: {integrity: sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==} + engines: {node: '>=0.10.0'} + hasBin: true + requiresBuild: true + dev: true + optional: true + /import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} @@ -1869,6 +2016,10 @@ packages: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} dev: true + /is-arrayish@0.3.2: + resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} + dev: false + /is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -1896,6 +2047,10 @@ packages: engines: {node: '>=8'} dev: true + /is-what@3.14.1: + resolution: {integrity: sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==} + dev: true + /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true @@ -1955,6 +2110,24 @@ packages: json-buffer: 3.0.1 dev: true + /less@4.2.0: + resolution: {integrity: sha512-P3b3HJDBtSzsXUl0im2L7gTO5Ubg8mEN6G8qoTS77iXxXX4Hvu4Qj540PZDvQ8V6DmX6iXo98k7Md0Cm1PrLaA==} + engines: {node: '>=6'} + hasBin: true + dependencies: + copy-anything: 2.0.6 + parse-node-version: 1.0.1 + tslib: 2.6.2 + optionalDependencies: + errno: 0.1.8 + graceful-fs: 4.2.11 + image-size: 0.5.5 + make-dir: 2.1.0 + mime: 1.6.0 + needle: 3.3.1 + source-map: 0.6.1 + dev: true + /levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -2002,6 +2175,16 @@ packages: dependencies: '@jridgewell/sourcemap-codec': 1.4.15 + /make-dir@2.1.0: + resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} + engines: {node: '>=6'} + requiresBuild: true + dependencies: + pify: 4.0.1 + semver: 5.7.2 + dev: true + optional: true + /memorystream@0.3.1: resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==} engines: {node: '>= 0.10.0'} @@ -2020,6 +2203,14 @@ packages: picomatch: 2.3.1 dev: true + /mime@1.6.0: + resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} + engines: {node: '>=4'} + hasBin: true + requiresBuild: true + dev: true + optional: true + /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: @@ -2055,6 +2246,17 @@ packages: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true + /needle@3.3.1: + resolution: {integrity: sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==} + engines: {node: '>= 4.4.x'} + hasBin: true + requiresBuild: true + dependencies: + iconv-lite: 0.6.3 + sax: 1.3.0 + dev: true + optional: true + /node-releases@2.0.14: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} dev: true @@ -2084,6 +2286,10 @@ packages: boolbase: 1.0.0 dev: true + /number-precision@1.6.0: + resolution: {integrity: sha512-05OLPgbgmnixJw+VvEh18yNPUo3iyp4BEWJcrLu4X9W05KmMifN7Mu5exYvQXqxxeNWhvIF+j3Rij+HmddM/hQ==} + dev: false + /once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} dependencies: @@ -2123,6 +2329,11 @@ packages: callsites: 3.1.0 dev: true + /parse-node-version@1.0.1: + resolution: {integrity: sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==} + engines: {node: '>= 0.10'} + dev: true + /path-browserify@1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} dev: true @@ -2169,6 +2380,13 @@ packages: hasBin: true dev: true + /pify@4.0.1: + resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} + engines: {node: '>=6'} + requiresBuild: true + dev: true + optional: true + /pinia@2.1.7(typescript@5.3.3)(vue@3.4.21): resolution: {integrity: sha512-+C2AHFtcFqjPih0zpYuvof37SFxMQ7OEG2zV9jRI12i9BOy3YQVAHwdKtyyc8pDcDyIc33WCIsZaCFWU7WWxGQ==} peerDependencies: @@ -2208,6 +2426,12 @@ packages: engines: {node: '>= 0.8.0'} dev: true + /prr@1.0.1: + resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} + requiresBuild: true + dev: true + optional: true + /punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -2225,6 +2449,10 @@ packages: npm-normalize-package-bin: 3.0.1 dev: true + /resize-observer-polyfill@1.5.1: + resolution: {integrity: sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==} + dev: false + /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -2279,6 +2507,31 @@ packages: queue-microtask: 1.2.3 dev: true + /safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + requiresBuild: true + dev: true + optional: true + + /sax@1.3.0: + resolution: {integrity: sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==} + requiresBuild: true + dev: true + optional: true + + /scroll-into-view-if-needed@2.2.31: + resolution: {integrity: sha512-dGCXy99wZQivjmjIqihaBQNjryrz5rueJY7eHfTdyWEiR4ttYpsajb14rn9s5d4DY4EcY6+4+U/maARBXJedkA==} + dependencies: + compute-scroll-into-view: 1.0.20 + dev: false + + /semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} + hasBin: true + requiresBuild: true + dev: true + optional: true + /semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true @@ -2313,6 +2566,12 @@ packages: engines: {node: '>=14'} dev: true + /simple-swizzle@0.2.2: + resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} + dependencies: + is-arrayish: 0.3.2 + dev: false + /slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -2322,6 +2581,13 @@ packages: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} + /source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + requiresBuild: true + dev: true + optional: true + /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -2401,6 +2667,10 @@ packages: typescript: 5.3.3 dev: true + /tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + dev: true + /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -2479,6 +2749,43 @@ packages: fsevents: 2.3.3 dev: true + /vite@5.1.5(@types/node@20.11.24)(less@4.2.0): + resolution: {integrity: sha512-BdN1xh0Of/oQafhU+FvopafUp6WaYenLU/NFoL5WyJL++GxkNfieKzBhM24H3HVsPQrlAqB7iJYTHabzaRed5Q==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + '@types/node': 20.11.24 + esbuild: 0.19.12 + less: 4.2.0 + postcss: 8.4.35 + rollup: 4.12.0 + optionalDependencies: + fsevents: 2.3.3 + dev: true + /vue-demi@0.14.7(vue@3.4.21): resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==} engines: {node: '>=12'} diff --git a/gpt-vue/projects/vue-admin/package.json b/gpt-vue/projects/vue-admin/package.json index 5139542d..00f9b8e1 100644 --- a/gpt-vue/projects/vue-admin/package.json +++ b/gpt-vue/projects/vue-admin/package.json @@ -12,6 +12,7 @@ "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore" }, "dependencies": { + "@arco-design/web-vue": "^2.54.6", "pinia": "^2.1.7", "vue": "^3.4.15", "vue-router": "^4.2.5" @@ -26,6 +27,7 @@ "@vue/tsconfig": "^0.5.1", "eslint": "^8.49.0", "eslint-plugin-vue": "^9.17.0", + "less": "^4.2.0", "npm-run-all2": "^6.1.1", "typescript": "~5.3.0", "vite": "^5.0.11", diff --git a/gpt-vue/projects/vue-admin/src/.env.development b/gpt-vue/projects/vue-admin/src/.env.development new file mode 100644 index 00000000..7402abdd --- /dev/null +++ b/gpt-vue/projects/vue-admin/src/.env.development @@ -0,0 +1,3 @@ +VITE_PROXY_BASE_URL="/api" +VITE_TARGET_URL="http://172.22.11.2:5678" +VITE_SOCKET_IO_URL="http://172.28.1.3:8899" diff --git a/gpt-vue/projects/vue-admin/src/.env.production b/gpt-vue/projects/vue-admin/src/.env.production new file mode 100644 index 00000000..a3c03b73 --- /dev/null +++ b/gpt-vue/projects/vue-admin/src/.env.production @@ -0,0 +1,3 @@ +VITE_PROXY_BASE_URL="" +VITE_TARGET_URL="/" +VITE_SOCKET_IO_URL="/" diff --git a/gpt-vue/projects/vue-admin/src/App.vue b/gpt-vue/projects/vue-admin/src/App.vue index 7905b051..7c2aa3f3 100644 --- a/gpt-vue/projects/vue-admin/src/App.vue +++ b/gpt-vue/projects/vue-admin/src/App.vue @@ -1,85 +1,3 @@ - - - - diff --git a/gpt-vue/projects/vue-admin/src/assets/base.css b/gpt-vue/projects/vue-admin/src/assets/base.css deleted file mode 100644 index 8816868a..00000000 --- a/gpt-vue/projects/vue-admin/src/assets/base.css +++ /dev/null @@ -1,86 +0,0 @@ -/* color palette from */ -:root { - --vt-c-white: #ffffff; - --vt-c-white-soft: #f8f8f8; - --vt-c-white-mute: #f2f2f2; - - --vt-c-black: #181818; - --vt-c-black-soft: #222222; - --vt-c-black-mute: #282828; - - --vt-c-indigo: #2c3e50; - - --vt-c-divider-light-1: rgba(60, 60, 60, 0.29); - --vt-c-divider-light-2: rgba(60, 60, 60, 0.12); - --vt-c-divider-dark-1: rgba(84, 84, 84, 0.65); - --vt-c-divider-dark-2: rgba(84, 84, 84, 0.48); - - --vt-c-text-light-1: var(--vt-c-indigo); - --vt-c-text-light-2: rgba(60, 60, 60, 0.66); - --vt-c-text-dark-1: var(--vt-c-white); - --vt-c-text-dark-2: rgba(235, 235, 235, 0.64); -} - -/* semantic color variables for this project */ -:root { - --color-background: var(--vt-c-white); - --color-background-soft: var(--vt-c-white-soft); - --color-background-mute: var(--vt-c-white-mute); - - --color-border: var(--vt-c-divider-light-2); - --color-border-hover: var(--vt-c-divider-light-1); - - --color-heading: var(--vt-c-text-light-1); - --color-text: var(--vt-c-text-light-1); - - --section-gap: 160px; -} - -@media (prefers-color-scheme: dark) { - :root { - --color-background: var(--vt-c-black); - --color-background-soft: var(--vt-c-black-soft); - --color-background-mute: var(--vt-c-black-mute); - - --color-border: var(--vt-c-divider-dark-2); - --color-border-hover: var(--vt-c-divider-dark-1); - - --color-heading: var(--vt-c-text-dark-1); - --color-text: var(--vt-c-text-dark-2); - } -} - -*, -*::before, -*::after { - box-sizing: border-box; - margin: 0; - font-weight: normal; -} - -body { - min-height: 100vh; - color: var(--color-text); - background: var(--color-background); - transition: - color 0.5s, - background-color 0.5s; - line-height: 1.6; - font-family: - Inter, - -apple-system, - BlinkMacSystemFont, - 'Segoe UI', - Roboto, - Oxygen, - Ubuntu, - Cantarell, - 'Fira Sans', - 'Droid Sans', - 'Helvetica Neue', - sans-serif; - font-size: 15px; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} diff --git a/gpt-vue/projects/vue-admin/src/assets/main.css b/gpt-vue/projects/vue-admin/src/assets/main.css deleted file mode 100644 index 36fb845b..00000000 --- a/gpt-vue/projects/vue-admin/src/assets/main.css +++ /dev/null @@ -1,35 +0,0 @@ -@import './base.css'; - -#app { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - font-weight: normal; -} - -a, -.green { - text-decoration: none; - color: hsla(160, 100%, 37%, 1); - transition: 0.4s; - padding: 3px; -} - -@media (hover: hover) { - a:hover { - background-color: hsla(160, 100%, 37%, 0.2); - } -} - -@media (min-width: 1024px) { - body { - display: flex; - place-items: center; - } - - #app { - display: grid; - grid-template-columns: 1fr 1fr; - padding: 0 2rem; - } -} diff --git a/gpt-vue/projects/vue-admin/src/components/CustomLayout.vue b/gpt-vue/projects/vue-admin/src/components/CustomLayout.vue new file mode 100644 index 00000000..3261c453 --- /dev/null +++ b/gpt-vue/projects/vue-admin/src/components/CustomLayout.vue @@ -0,0 +1,76 @@ + + + diff --git a/gpt-vue/projects/vue-admin/src/components/HelloWorld.vue b/gpt-vue/projects/vue-admin/src/components/HelloWorld.vue deleted file mode 100644 index 38d821ef..00000000 --- a/gpt-vue/projects/vue-admin/src/components/HelloWorld.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - - - diff --git a/gpt-vue/projects/vue-admin/src/components/PageWrapper.vue b/gpt-vue/projects/vue-admin/src/components/PageWrapper.vue new file mode 100644 index 00000000..086f2e22 --- /dev/null +++ b/gpt-vue/projects/vue-admin/src/components/PageWrapper.vue @@ -0,0 +1,23 @@ + + diff --git a/gpt-vue/projects/vue-admin/src/components/SystemMenu.vue b/gpt-vue/projects/vue-admin/src/components/SystemMenu.vue new file mode 100644 index 00000000..0a81edbc --- /dev/null +++ b/gpt-vue/projects/vue-admin/src/components/SystemMenu.vue @@ -0,0 +1,29 @@ + + diff --git a/gpt-vue/projects/vue-admin/src/components/TheWelcome.vue b/gpt-vue/projects/vue-admin/src/components/TheWelcome.vue deleted file mode 100644 index 49d8f735..00000000 --- a/gpt-vue/projects/vue-admin/src/components/TheWelcome.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - diff --git a/gpt-vue/projects/vue-admin/src/components/WelcomeItem.vue b/gpt-vue/projects/vue-admin/src/components/WelcomeItem.vue deleted file mode 100644 index 6d7086ae..00000000 --- a/gpt-vue/projects/vue-admin/src/components/WelcomeItem.vue +++ /dev/null @@ -1,87 +0,0 @@ - - - diff --git a/gpt-vue/projects/vue-admin/src/components/icons/IconCommunity.vue b/gpt-vue/projects/vue-admin/src/components/icons/IconCommunity.vue deleted file mode 100644 index 2dc8b055..00000000 --- a/gpt-vue/projects/vue-admin/src/components/icons/IconCommunity.vue +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/gpt-vue/projects/vue-admin/src/components/icons/IconDocumentation.vue b/gpt-vue/projects/vue-admin/src/components/icons/IconDocumentation.vue deleted file mode 100644 index 6d4791cf..00000000 --- a/gpt-vue/projects/vue-admin/src/components/icons/IconDocumentation.vue +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/gpt-vue/projects/vue-admin/src/components/icons/IconEcosystem.vue b/gpt-vue/projects/vue-admin/src/components/icons/IconEcosystem.vue deleted file mode 100644 index c3a4f078..00000000 --- a/gpt-vue/projects/vue-admin/src/components/icons/IconEcosystem.vue +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/gpt-vue/projects/vue-admin/src/components/icons/IconSupport.vue b/gpt-vue/projects/vue-admin/src/components/icons/IconSupport.vue deleted file mode 100644 index 7452834d..00000000 --- a/gpt-vue/projects/vue-admin/src/components/icons/IconSupport.vue +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/gpt-vue/projects/vue-admin/src/components/icons/IconTooling.vue b/gpt-vue/projects/vue-admin/src/components/icons/IconTooling.vue deleted file mode 100644 index 660598d7..00000000 --- a/gpt-vue/projects/vue-admin/src/components/icons/IconTooling.vue +++ /dev/null @@ -1,19 +0,0 @@ - - diff --git a/gpt-vue/projects/vue-admin/src/main.ts b/gpt-vue/projects/vue-admin/src/main.ts index 5dcad83c..559f2f7c 100644 --- a/gpt-vue/projects/vue-admin/src/main.ts +++ b/gpt-vue/projects/vue-admin/src/main.ts @@ -1,14 +1,26 @@ -import './assets/main.css' +import { createApp } from "vue"; +import { createPinia } from "pinia"; +import ArcoVue from "@arco-design/web-vue"; +import ArcoVueIcon from "@arco-design/web-vue/es/icon"; +import "@arco-design/web-vue/dist/arco.css"; -import { createApp } from 'vue' -import { createPinia } from 'pinia' +import App from "./App.vue"; +import router from "./router"; -import App from './App.vue' -import router from './router' +const app = createApp(App); -const app = createApp(App) +app.use(createPinia()); +app.use(router); +app.use(ArcoVue); +app.use(ArcoVueIcon); -app.use(createPinia()) -app.use(router) +app.mount("#app"); +app.config.warnHandler = (msg, vm, trace) => { + if (msg.includes('Invalid prop name: "key" is a reserved property.')) { + // 如果警告信息包含我们要屏蔽的内容,则不执行任何操作 + return; + } + console.warn(`[Vue warn]: ${msg}${trace}`); +}; -app.mount('#app') +export default app; diff --git a/gpt-vue/projects/vue-admin/src/router/index.ts b/gpt-vue/projects/vue-admin/src/router/index.ts index a49ae507..83136c58 100644 --- a/gpt-vue/projects/vue-admin/src/router/index.ts +++ b/gpt-vue/projects/vue-admin/src/router/index.ts @@ -1,5 +1,6 @@ import { createRouter, createWebHistory } from 'vue-router' -import HomeView from '../views/HomeView.vue' +import CustomLayout from '@/components/CustomLayout.vue' +import menu from './menu' const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), @@ -7,16 +8,15 @@ const router = createRouter({ { path: '/', name: 'home', - component: HomeView + component: CustomLayout, + redirect: () => menu[0].path, + children: menu }, { - path: '/about', - name: 'about', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/AboutView.vue') - } + path: "/:pathMatch(.*)*", + name: "404", + component: () => import("@/views/NotFound.vue"), + }, ] }) diff --git a/gpt-vue/projects/vue-admin/src/router/menu.ts b/gpt-vue/projects/vue-admin/src/router/menu.ts new file mode 100644 index 00000000..5933f0d9 --- /dev/null +++ b/gpt-vue/projects/vue-admin/src/router/menu.ts @@ -0,0 +1,27 @@ +import { + IconUser, + IconDashboard +} from "@arco-design/web-vue/es/icon"; + +const menu = [ + { + path: '/dashboard', + name: 'Dashboard', + meta: { + title: "仪表盘", + icon: IconDashboard + }, + component: () => import('@/views/DashboardView.vue') + }, + { + path: '/user', + name: 'User', + meta: { + title: "用户管理", + icon: IconUser, + }, + component: () => import('@/views/User/UserContainer.vue') + }, +]; + +export default menu; diff --git a/gpt-vue/projects/vue-admin/src/views/AboutView.vue b/gpt-vue/projects/vue-admin/src/views/AboutView.vue deleted file mode 100644 index 756ad2a1..00000000 --- a/gpt-vue/projects/vue-admin/src/views/AboutView.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - diff --git a/gpt-vue/projects/vue-admin/src/views/ApiKey/ApiKeyContainer.vue b/gpt-vue/projects/vue-admin/src/views/ApiKey/ApiKeyContainer.vue new file mode 100644 index 00000000..9d13f383 --- /dev/null +++ b/gpt-vue/projects/vue-admin/src/views/ApiKey/ApiKeyContainer.vue @@ -0,0 +1,4 @@ + + diff --git a/gpt-vue/projects/vue-admin/src/views/ChatModel/ChatModelContainer.vue b/gpt-vue/projects/vue-admin/src/views/ChatModel/ChatModelContainer.vue new file mode 100644 index 00000000..9d13f383 --- /dev/null +++ b/gpt-vue/projects/vue-admin/src/views/ChatModel/ChatModelContainer.vue @@ -0,0 +1,4 @@ + + diff --git a/gpt-vue/projects/vue-admin/src/views/DashboardView.vue b/gpt-vue/projects/vue-admin/src/views/DashboardView.vue new file mode 100644 index 00000000..9d13f383 --- /dev/null +++ b/gpt-vue/projects/vue-admin/src/views/DashboardView.vue @@ -0,0 +1,4 @@ + + diff --git a/gpt-vue/projects/vue-admin/src/views/HomeView.vue b/gpt-vue/projects/vue-admin/src/views/HomeView.vue deleted file mode 100644 index d5c0217e..00000000 --- a/gpt-vue/projects/vue-admin/src/views/HomeView.vue +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/gpt-vue/projects/vue-admin/src/views/NotFound.vue b/gpt-vue/projects/vue-admin/src/views/NotFound.vue new file mode 100644 index 00000000..3a6c3843 --- /dev/null +++ b/gpt-vue/projects/vue-admin/src/views/NotFound.vue @@ -0,0 +1,19 @@ + + + diff --git a/gpt-vue/projects/vue-admin/src/views/Product/ProductContainer.vue b/gpt-vue/projects/vue-admin/src/views/Product/ProductContainer.vue new file mode 100644 index 00000000..9d13f383 --- /dev/null +++ b/gpt-vue/projects/vue-admin/src/views/Product/ProductContainer.vue @@ -0,0 +1,4 @@ + + diff --git a/gpt-vue/projects/vue-admin/src/views/Role/RoleContainer.vue b/gpt-vue/projects/vue-admin/src/views/Role/RoleContainer.vue new file mode 100644 index 00000000..9d13f383 --- /dev/null +++ b/gpt-vue/projects/vue-admin/src/views/Role/RoleContainer.vue @@ -0,0 +1,4 @@ + + diff --git a/gpt-vue/projects/vue-admin/src/views/User/UserContainer.vue b/gpt-vue/projects/vue-admin/src/views/User/UserContainer.vue new file mode 100644 index 00000000..9d13f383 --- /dev/null +++ b/gpt-vue/projects/vue-admin/src/views/User/UserContainer.vue @@ -0,0 +1,4 @@ + + diff --git a/gpt-vue/projects/vue-admin/tsconfig.json b/gpt-vue/projects/vue-admin/tsconfig.json index 66b5e570..7e5e2fa1 100644 --- a/gpt-vue/projects/vue-admin/tsconfig.json +++ b/gpt-vue/projects/vue-admin/tsconfig.json @@ -7,5 +7,12 @@ { "path": "./tsconfig.app.json" } - ] + ], + "compilerOptions": { + "strict": false, + "noImplicitAny": false, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "allowJs": true, + } } diff --git a/gpt-vue/projects/vue-admin/tsconfig.node.json b/gpt-vue/projects/vue-admin/tsconfig.node.json index f0940630..52de997d 100644 --- a/gpt-vue/projects/vue-admin/tsconfig.node.json +++ b/gpt-vue/projects/vue-admin/tsconfig.node.json @@ -13,7 +13,7 @@ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", "module": "ESNext", - "moduleResolution": "Bundler", + "moduleResolution": "Node", "types": ["node"] } } diff --git a/gpt-vue/projects/vue-admin/vite.config.ts b/gpt-vue/projects/vue-admin/vite.config.ts index 36c61875..3b1f8015 100644 --- a/gpt-vue/projects/vue-admin/vite.config.ts +++ b/gpt-vue/projects/vue-admin/vite.config.ts @@ -1,18 +1,32 @@ import { fileURLToPath, URL } from 'node:url' -import { defineConfig } from 'vite' +import { defineConfig, loadEnv } from 'vite' import vue from '@vitejs/plugin-vue' import vueJsx from '@vitejs/plugin-vue-jsx' // https://vitejs.dev/config/ -export default defineConfig({ - plugins: [ - vue(), - vueJsx(), - ], - resolve: { - alias: { - '@': fileURLToPath(new URL('./src', import.meta.url)) - } +export default defineConfig(({ mode }) => { + const { VITE_PROXY_BASE_URL, VITE_TARGET_URL } = loadEnv(mode, process.cwd()); + return { + plugins: [ + vue(), + vueJsx(), + ], + resolve: { + alias: { + '@': fileURLToPath(new URL('./src', import.meta.url)) + } + }, + server: { + host: "0.0.0.0", + port: 7410, + proxy: { + [VITE_PROXY_BASE_URL]: { + target: VITE_TARGET_URL, + changeOrigin: true, + rewrite: (path) => path.replace(VITE_PROXY_BASE_URL, ""), + }, + }, + }, } })