Commit edcde037a924c23a564e9fb183a0918a582f3239
1 parent
3ff8d513
perf: 移除 js-cookie
Showing
5 changed files
with
120 additions
and
104 deletions
yudao-ui-admin-vue3/package.json
yudao-ui-admin-vue3/pnpm-lock.yaml
| ... | ... | @@ -4,12 +4,12 @@ specifiers: |
| 4 | 4 | '@commitlint/cli': ^17.3.0 |
| 5 | 5 | '@commitlint/config-conventional': ^17.3.0 |
| 6 | 6 | '@iconify/iconify': ^3.0.1 |
| 7 | - '@iconify/json': ^2.1.145 | |
| 7 | + '@iconify/json': ^2.1.146 | |
| 8 | 8 | '@intlify/vite-plugin-vue-i18n': ^6.0.3 |
| 9 | 9 | '@purge-icons/generated': ^0.9.0 |
| 10 | 10 | '@types/intro.js': ^5.1.0 |
| 11 | 11 | '@types/lodash-es': ^4.17.6 |
| 12 | - '@types/node': ^18.11.9 | |
| 12 | + '@types/node': ^18.11.10 | |
| 13 | 13 | '@types/nprogress': ^0.2.0 |
| 14 | 14 | '@types/qrcode': ^1.5.0 |
| 15 | 15 | '@types/qs': ^6.9.7 |
| ... | ... | @@ -35,7 +35,6 @@ specifiers: |
| 35 | 35 | eslint-plugin-prettier: ^4.2.1 |
| 36 | 36 | eslint-plugin-vue: ^9.8.0 |
| 37 | 37 | intro.js: ^6.0.0 |
| 38 | - js-cookie: ^3.0.1 | |
| 39 | 38 | jsencrypt: ^3.3.1 |
| 40 | 39 | lint-staged: ^13.0.4 |
| 41 | 40 | lodash-es: ^4.17.21 |
| ... | ... | @@ -95,7 +94,6 @@ dependencies: |
| 95 | 94 | echarts-wordcloud: 2.1.0_echarts@5.4.0 |
| 96 | 95 | element-plus: 2.2.25_vue@3.2.45 |
| 97 | 96 | intro.js: 6.0.0 |
| 98 | - js-cookie: 3.0.1 | |
| 99 | 97 | jsencrypt: 3.3.1 |
| 100 | 98 | lodash-es: 4.17.21 |
| 101 | 99 | mitt: 3.0.0 |
| ... | ... | @@ -116,12 +114,12 @@ dependencies: |
| 116 | 114 | devDependencies: |
| 117 | 115 | '@commitlint/cli': 17.3.0 |
| 118 | 116 | '@commitlint/config-conventional': 17.3.0 |
| 119 | - '@iconify/json': 2.1.145 | |
| 117 | + '@iconify/json': registry.npmmirror.com/@iconify/json/2.1.146 | |
| 120 | 118 | '@intlify/vite-plugin-vue-i18n': 6.0.3_vite@3.2.4+vue-i18n@9.2.2 |
| 121 | 119 | '@purge-icons/generated': 0.9.0 |
| 122 | 120 | '@types/intro.js': 5.1.0 |
| 123 | 121 | '@types/lodash-es': 4.17.6 |
| 124 | - '@types/node': 18.11.9 | |
| 122 | + '@types/node': registry.npmmirror.com/@types/node/18.11.10 | |
| 125 | 123 | '@types/nprogress': 0.2.0 |
| 126 | 124 | '@types/qrcode': 1.5.0 |
| 127 | 125 | '@types/qs': 6.9.7 |
| ... | ... | @@ -151,7 +149,7 @@ devDependencies: |
| 151 | 149 | stylelint-config-standard: 29.0.0_stylelint@14.15.0 |
| 152 | 150 | stylelint-order: 5.0.0_stylelint@14.15.0 |
| 153 | 151 | typescript: 4.9.3 |
| 154 | - vite: 3.2.4_ajklay5k626t46b6fyghkbup3i | |
| 152 | + vite: 3.2.4_clvymlzunojxjbv3h6i2warera | |
| 155 | 153 | vite-plugin-compression: 0.5.1_vite@3.2.4 |
| 156 | 154 | vite-plugin-eslint: 1.8.1_eslint@8.28.0+vite@3.2.4 |
| 157 | 155 | vite-plugin-html: 3.2.0_vite@3.2.4 |
| ... | ... | @@ -544,7 +542,7 @@ packages: |
| 544 | 542 | '@commitlint/execute-rule': 17.0.0 |
| 545 | 543 | '@commitlint/resolve-extends': 17.3.0 |
| 546 | 544 | '@commitlint/types': 17.0.0 |
| 547 | - '@types/node': 14.18.33 | |
| 545 | + '@types/node': registry.npmmirror.com/@types/node/14.18.33 | |
| 548 | 546 | chalk: 4.1.2 |
| 549 | 547 | cosmiconfig: 7.1.0 |
| 550 | 548 | cosmiconfig-typescript-loader: 4.2.0_qoh33be55smklb2oyrgdyddh4a |
| ... | ... | @@ -717,13 +715,6 @@ packages: |
| 717 | 715 | dependencies: |
| 718 | 716 | '@iconify/types': 2.0.0 |
| 719 | 717 | |
| 720 | - /@iconify/json/2.1.145: | |
| 721 | - resolution: {integrity: sha512-cYU5F2lOPTaUtq9Uulrv66Wrh4XQxWj50xk6d9LeMQZY8IMm2DqICONHVlhOeoYBbCwa0kOt9/W6pMWYB9BomQ==} | |
| 722 | - dependencies: | |
| 723 | - '@iconify/types': 2.0.0 | |
| 724 | - pathe: 0.3.9 | |
| 725 | - dev: true | |
| 726 | - | |
| 727 | 718 | /@iconify/types/2.0.0: |
| 728 | 719 | resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} |
| 729 | 720 | |
| ... | ... | @@ -794,7 +785,7 @@ packages: |
| 794 | 785 | debug: 4.3.4 |
| 795 | 786 | fast-glob: 3.2.12 |
| 796 | 787 | source-map: 0.6.1 |
| 797 | - vite: 3.2.4_ajklay5k626t46b6fyghkbup3i | |
| 788 | + vite: 3.2.4_clvymlzunojxjbv3h6i2warera | |
| 798 | 789 | vue-i18n: 9.2.2_vue@3.2.45 |
| 799 | 790 | transitivePeerDependencies: |
| 800 | 791 | - supports-color |
| ... | ... | @@ -969,7 +960,7 @@ packages: |
| 969 | 960 | resolution: {integrity: sha512-Ny/PJkO6nxWAQnaet8q/oWz15lrfwvdvBpuY4treB0CSsBO1CG0fVuNLngR3m3bepQLd+E4c3Y3DlC2okpUvPw==} |
| 970 | 961 | dependencies: |
| 971 | 962 | '@types/fined': 1.1.3 |
| 972 | - '@types/node': 18.11.9 | |
| 963 | + '@types/node': registry.npmmirror.com/@types/node/18.11.10 | |
| 973 | 964 | dev: true |
| 974 | 965 | |
| 975 | 966 | /@types/lodash-es/4.17.6: |
| ... | ... | @@ -984,18 +975,6 @@ packages: |
| 984 | 975 | resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} |
| 985 | 976 | dev: true |
| 986 | 977 | |
| 987 | - /@types/node/10.17.60: | |
| 988 | - resolution: {integrity: sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==} | |
| 989 | - dev: true | |
| 990 | - | |
| 991 | - /@types/node/14.18.33: | |
| 992 | - resolution: {integrity: sha512-qelS/Ra6sacc4loe/3MSjXNL1dNQ/GjxNHVzuChwMfmk7HuycRLVQN2qNY3XahK+fZc5E2szqQSKUyAF0E+2bg==} | |
| 993 | - dev: true | |
| 994 | - | |
| 995 | - /@types/node/18.11.9: | |
| 996 | - resolution: {integrity: sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==} | |
| 997 | - dev: true | |
| 998 | - | |
| 999 | 978 | /@types/normalize-package-data/2.4.1: |
| 1000 | 979 | resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} |
| 1001 | 980 | dev: true |
| ... | ... | @@ -1011,7 +990,7 @@ packages: |
| 1011 | 990 | /@types/qrcode/1.5.0: |
| 1012 | 991 | resolution: {integrity: sha512-x5ilHXRxUPIMfjtM+1vf/GPTRWZ81nqscursm5gMznJeK9M0YnZ1c3bEvRLQ0zSSgedLx1J6MGL231ObQGGhaA==} |
| 1013 | 992 | dependencies: |
| 1014 | - '@types/node': 18.11.9 | |
| 993 | + '@types/node': registry.npmmirror.com/@types/node/18.11.10 | |
| 1015 | 994 | dev: true |
| 1016 | 995 | |
| 1017 | 996 | /@types/qs/6.9.7: |
| ... | ... | @@ -1025,13 +1004,13 @@ packages: |
| 1025 | 1004 | /@types/svgo/2.6.4: |
| 1026 | 1005 | resolution: {integrity: sha512-l4cmyPEckf8moNYHdJ+4wkHvFxjyW6ulm9l4YGaOxeyBWPhBOT0gvni1InpFPdzx1dKf/2s62qGITwxNWnPQng==} |
| 1027 | 1006 | dependencies: |
| 1028 | - '@types/node': 18.11.9 | |
| 1007 | + '@types/node': registry.npmmirror.com/@types/node/18.11.10 | |
| 1029 | 1008 | dev: true |
| 1030 | 1009 | |
| 1031 | 1010 | /@types/through/0.0.30: |
| 1032 | 1011 | resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} |
| 1033 | 1012 | dependencies: |
| 1034 | - '@types/node': 18.11.9 | |
| 1013 | + '@types/node': registry.npmmirror.com/@types/node/18.11.10 | |
| 1035 | 1014 | dev: true |
| 1036 | 1015 | |
| 1037 | 1016 | /@types/web-bluetooth/0.0.16: |
| ... | ... | @@ -1218,7 +1197,7 @@ packages: |
| 1218 | 1197 | '@babel/core': 7.20.2 |
| 1219 | 1198 | '@babel/plugin-transform-typescript': 7.20.2_@babel+core@7.20.2 |
| 1220 | 1199 | '@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.20.2 |
| 1221 | - vite: 3.2.4_ajklay5k626t46b6fyghkbup3i | |
| 1200 | + vite: 3.2.4_clvymlzunojxjbv3h6i2warera | |
| 1222 | 1201 | vue: 3.2.45 |
| 1223 | 1202 | transitivePeerDependencies: |
| 1224 | 1203 | - supports-color |
| ... | ... | @@ -1231,7 +1210,7 @@ packages: |
| 1231 | 1210 | vite: ^3.0.0 |
| 1232 | 1211 | vue: ^3.2.25 |
| 1233 | 1212 | dependencies: |
| 1234 | - vite: 3.2.4_ajklay5k626t46b6fyghkbup3i | |
| 1213 | + vite: 3.2.4_clvymlzunojxjbv3h6i2warera | |
| 1235 | 1214 | vue: 3.2.45 |
| 1236 | 1215 | dev: true |
| 1237 | 1216 | |
| ... | ... | @@ -2297,7 +2276,7 @@ packages: |
| 2297 | 2276 | ts-node: '>=10' |
| 2298 | 2277 | typescript: '>=3' |
| 2299 | 2278 | dependencies: |
| 2300 | - '@types/node': 14.18.33 | |
| 2279 | + '@types/node': registry.npmmirror.com/@types/node/14.18.33 | |
| 2301 | 2280 | cosmiconfig: 7.1.0 |
| 2302 | 2281 | ts-node: 10.9.1_kluoused5zacjtflizwvdqgpom |
| 2303 | 2282 | typescript: 4.9.3 |
| ... | ... | @@ -3968,11 +3947,6 @@ packages: |
| 3968 | 3947 | resolution: {integrity: sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==} |
| 3969 | 3948 | dev: true |
| 3970 | 3949 | |
| 3971 | - /js-cookie/3.0.1: | |
| 3972 | - resolution: {integrity: sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==} | |
| 3973 | - engines: {node: '>=12'} | |
| 3974 | - dev: false | |
| 3975 | - | |
| 3976 | 3950 | /js-sdsl/4.1.5: |
| 3977 | 3951 | resolution: {integrity: sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==} |
| 3978 | 3952 | dev: true |
| ... | ... | @@ -4934,10 +4908,6 @@ packages: |
| 4934 | 4908 | resolution: {integrity: sha512-sTitTPYnn23esFR3RlqYBWn4c45WGeLcsKzQiUpXJAyfcWkolvlYpV8FLo7JishK946oQwMFUCHXQ9AjGPKExw==} |
| 4935 | 4909 | dev: true |
| 4936 | 4910 | |
| 4937 | - /pathe/0.3.9: | |
| 4938 | - resolution: {integrity: sha512-6Y6s0vT112P3jD8dGfuS6r+lpa0qqNrLyHPOwvXMnyNTQaYiwgau2DP3aNDsR13xqtGj7rrPo+jFUATpU6/s+g==} | |
| 4939 | - dev: true | |
| 4940 | - | |
| 4941 | 4911 | /picocolors/1.0.0: |
| 4942 | 4912 | resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} |
| 4943 | 4913 | |
| ... | ... | @@ -5206,7 +5176,7 @@ packages: |
| 5206 | 5176 | /rd/2.0.1: |
| 5207 | 5177 | resolution: {integrity: sha512-/XdKU4UazUZTXFmI0dpABt8jSXPWcEyaGdk340KdHnsEOdkTctlX23aAK7ChQDn39YGNlAJr1M5uvaKt4QnpNw==} |
| 5208 | 5178 | dependencies: |
| 5209 | - '@types/node': 10.17.60 | |
| 5179 | + '@types/node': registry.npmmirror.com/@types/node/10.17.60 | |
| 5210 | 5180 | dev: true |
| 5211 | 5181 | |
| 5212 | 5182 | /read-pkg-up/7.0.1: |
| ... | ... | @@ -6082,7 +6052,7 @@ packages: |
| 6082 | 6052 | '@tsconfig/node12': 1.0.11 |
| 6083 | 6053 | '@tsconfig/node14': 1.0.3 |
| 6084 | 6054 | '@tsconfig/node16': 1.0.3 |
| 6085 | - '@types/node': 14.18.33 | |
| 6055 | + '@types/node': registry.npmmirror.com/@types/node/14.18.33 | |
| 6086 | 6056 | acorn: 8.8.1 |
| 6087 | 6057 | acorn-walk: 8.2.0 |
| 6088 | 6058 | arg: 4.1.3 |
| ... | ... | @@ -6272,7 +6242,7 @@ packages: |
| 6272 | 6242 | chalk: 4.1.2 |
| 6273 | 6243 | debug: 4.3.4 |
| 6274 | 6244 | fs-extra: 10.1.0 |
| 6275 | - vite: 3.2.4_ajklay5k626t46b6fyghkbup3i | |
| 6245 | + vite: 3.2.4_clvymlzunojxjbv3h6i2warera | |
| 6276 | 6246 | transitivePeerDependencies: |
| 6277 | 6247 | - supports-color |
| 6278 | 6248 | dev: true |
| ... | ... | @@ -6287,7 +6257,7 @@ packages: |
| 6287 | 6257 | '@types/eslint': 8.4.10 |
| 6288 | 6258 | eslint: 8.28.0 |
| 6289 | 6259 | rollup: 2.79.1 |
| 6290 | - vite: 3.2.4_ajklay5k626t46b6fyghkbup3i | |
| 6260 | + vite: 3.2.4_clvymlzunojxjbv3h6i2warera | |
| 6291 | 6261 | dev: true |
| 6292 | 6262 | |
| 6293 | 6263 | /vite-plugin-html/3.2.0_vite@3.2.4: |
| ... | ... | @@ -6307,7 +6277,7 @@ packages: |
| 6307 | 6277 | html-minifier-terser: 6.1.0 |
| 6308 | 6278 | node-html-parser: 5.4.2 |
| 6309 | 6279 | pathe: 0.2.0 |
| 6310 | - vite: 3.2.4_ajklay5k626t46b6fyghkbup3i | |
| 6280 | + vite: 3.2.4_clvymlzunojxjbv3h6i2warera | |
| 6311 | 6281 | dev: true |
| 6312 | 6282 | |
| 6313 | 6283 | /vite-plugin-progress/0.0.6_vite@3.2.4: |
| ... | ... | @@ -6319,7 +6289,7 @@ packages: |
| 6319 | 6289 | picocolors: 1.0.0 |
| 6320 | 6290 | progress: 2.0.3 |
| 6321 | 6291 | rd: 2.0.1 |
| 6322 | - vite: 3.2.4_ajklay5k626t46b6fyghkbup3i | |
| 6292 | + vite: 3.2.4_clvymlzunojxjbv3h6i2warera | |
| 6323 | 6293 | dev: true |
| 6324 | 6294 | |
| 6325 | 6295 | /vite-plugin-purge-icons/0.9.1_vite@3.2.4: |
| ... | ... | @@ -6331,7 +6301,7 @@ packages: |
| 6331 | 6301 | '@purge-icons/core': 0.9.1 |
| 6332 | 6302 | '@purge-icons/generated': 0.9.0 |
| 6333 | 6303 | rollup-plugin-purge-icons: 0.9.1 |
| 6334 | - vite: 3.2.4_ajklay5k626t46b6fyghkbup3i | |
| 6304 | + vite: 3.2.4_clvymlzunojxjbv3h6i2warera | |
| 6335 | 6305 | transitivePeerDependencies: |
| 6336 | 6306 | - encoding |
| 6337 | 6307 | - supports-color |
| ... | ... | @@ -6349,7 +6319,7 @@ packages: |
| 6349 | 6319 | fs-extra: 10.1.0 |
| 6350 | 6320 | magic-string: 0.25.9 |
| 6351 | 6321 | pathe: 0.2.0 |
| 6352 | - vite: 3.2.4_ajklay5k626t46b6fyghkbup3i | |
| 6322 | + vite: 3.2.4_clvymlzunojxjbv3h6i2warera | |
| 6353 | 6323 | dev: true |
| 6354 | 6324 | |
| 6355 | 6325 | /vite-plugin-svg-icons/2.0.1_vite@3.2.4: |
| ... | ... | @@ -6365,7 +6335,7 @@ packages: |
| 6365 | 6335 | pathe: 0.2.0 |
| 6366 | 6336 | svg-baker: 1.7.0 |
| 6367 | 6337 | svgo: 2.8.0 |
| 6368 | - vite: 3.2.4_ajklay5k626t46b6fyghkbup3i | |
| 6338 | + vite: 3.2.4_clvymlzunojxjbv3h6i2warera | |
| 6369 | 6339 | transitivePeerDependencies: |
| 6370 | 6340 | - supports-color |
| 6371 | 6341 | dev: true |
| ... | ... | @@ -6377,7 +6347,7 @@ packages: |
| 6377 | 6347 | dependencies: |
| 6378 | 6348 | '@vue/compiler-sfc': 3.2.45 |
| 6379 | 6349 | magic-string: 0.25.9 |
| 6380 | - vite: 3.2.4_ajklay5k626t46b6fyghkbup3i | |
| 6350 | + vite: 3.2.4_clvymlzunojxjbv3h6i2warera | |
| 6381 | 6351 | dev: true |
| 6382 | 6352 | |
| 6383 | 6353 | /vite-plugin-windicss/1.8.8_vite@3.2.4: |
| ... | ... | @@ -6388,13 +6358,13 @@ packages: |
| 6388 | 6358 | '@windicss/plugin-utils': 1.8.8 |
| 6389 | 6359 | debug: 4.3.4 |
| 6390 | 6360 | kolorist: 1.6.0 |
| 6391 | - vite: 3.2.4_ajklay5k626t46b6fyghkbup3i | |
| 6361 | + vite: 3.2.4_clvymlzunojxjbv3h6i2warera | |
| 6392 | 6362 | windicss: 3.5.6 |
| 6393 | 6363 | transitivePeerDependencies: |
| 6394 | 6364 | - supports-color |
| 6395 | 6365 | dev: true |
| 6396 | 6366 | |
| 6397 | - /vite/3.2.4_ajklay5k626t46b6fyghkbup3i: | |
| 6367 | + /vite/3.2.4_clvymlzunojxjbv3h6i2warera: | |
| 6398 | 6368 | resolution: {integrity: sha512-Z2X6SRAffOUYTa+sLy3NQ7nlHFU100xwanq1WDwqaiFiCe+25zdxP1TfCS5ojPV2oDDcXudHIoPnI1Z/66B7Yw==} |
| 6399 | 6369 | engines: {node: ^14.18.0 || >=16.0.0} |
| 6400 | 6370 | hasBin: true |
| ... | ... | @@ -6419,7 +6389,7 @@ packages: |
| 6419 | 6389 | terser: |
| 6420 | 6390 | optional: true |
| 6421 | 6391 | dependencies: |
| 6422 | - '@types/node': 18.11.9 | |
| 6392 | + '@types/node': registry.npmmirror.com/@types/node/18.11.10 | |
| 6423 | 6393 | esbuild: 0.15.14 |
| 6424 | 6394 | postcss: 8.4.19 |
| 6425 | 6395 | resolve: 1.22.1 |
| ... | ... | @@ -6764,6 +6734,21 @@ packages: |
| 6764 | 6734 | dev: true |
| 6765 | 6735 | optional: true |
| 6766 | 6736 | |
| 6737 | + registry.npmmirror.com/@iconify/json/2.1.146: | |
| 6738 | + resolution: {integrity: sha512-wIGCtWvxNjWbHPOuJK1e7VaRn0EVrcpzTyC1TaSDRJFsBoGki9Z2NEPEPOS4VaEukh8MLHzLor1IMGgiLhfohg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@iconify/json/-/json-2.1.146.tgz} | |
| 6739 | + name: '@iconify/json' | |
| 6740 | + version: 2.1.146 | |
| 6741 | + dependencies: | |
| 6742 | + '@iconify/types': registry.npmmirror.com/@iconify/types/2.0.0 | |
| 6743 | + pathe: registry.npmmirror.com/pathe/0.3.9 | |
| 6744 | + dev: true | |
| 6745 | + | |
| 6746 | + registry.npmmirror.com/@iconify/types/2.0.0: | |
| 6747 | + resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@iconify/types/-/types-2.0.0.tgz} | |
| 6748 | + name: '@iconify/types' | |
| 6749 | + version: 2.0.0 | |
| 6750 | + dev: true | |
| 6751 | + | |
| 6767 | 6752 | registry.npmmirror.com/@intlify/message-compiler/9.3.0-beta.10: |
| 6768 | 6753 | resolution: {integrity: sha512-RoOC6yceOykLRhN0NlbkNOBUx1el6iphx3W8NfOx3jHVNtfT1FYokx14/5sU3F1F0uxeG4sp6q+ppKvaF8o+ww==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-9.3.0-beta.10.tgz} |
| 6769 | 6754 | name: '@intlify/message-compiler' |
| ... | ... | @@ -6793,6 +6778,24 @@ packages: |
| 6793 | 6778 | version: 2.11.7 |
| 6794 | 6779 | dev: false |
| 6795 | 6780 | |
| 6781 | + registry.npmmirror.com/@types/node/10.17.60: | |
| 6782 | + resolution: {integrity: sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/node/-/node-10.17.60.tgz} | |
| 6783 | + name: '@types/node' | |
| 6784 | + version: 10.17.60 | |
| 6785 | + dev: true | |
| 6786 | + | |
| 6787 | + registry.npmmirror.com/@types/node/14.18.33: | |
| 6788 | + resolution: {integrity: sha512-qelS/Ra6sacc4loe/3MSjXNL1dNQ/GjxNHVzuChwMfmk7HuycRLVQN2qNY3XahK+fZc5E2szqQSKUyAF0E+2bg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/node/-/node-14.18.33.tgz} | |
| 6789 | + name: '@types/node' | |
| 6790 | + version: 14.18.33 | |
| 6791 | + dev: true | |
| 6792 | + | |
| 6793 | + registry.npmmirror.com/@types/node/18.11.10: | |
| 6794 | + resolution: {integrity: sha512-juG3RWMBOqcOuXC643OAdSA525V44cVgGV6dUDuiFtss+8Fk5x1hI93Rsld43VeJVIeqlP9I7Fn9/qaVqoEAuQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/node/-/node-18.11.10.tgz} | |
| 6795 | + name: '@types/node' | |
| 6796 | + version: 18.11.10 | |
| 6797 | + dev: true | |
| 6798 | + | |
| 6796 | 6799 | registry.npmmirror.com/@volar/language-core/1.0.10: |
| 6797 | 6800 | resolution: {integrity: sha512-7WNzjvdUXjggEZvYu9EInABl4mvXtyiiaJDOJM+plHJT7xW5voLja0BrYYji6TUn8Q4HakLvTPpQddPLq134mg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@volar/language-core/-/language-core-1.0.10.tgz} |
| 6798 | 6801 | name: '@volar/language-core' |
| ... | ... | @@ -7227,6 +7230,12 @@ packages: |
| 7227 | 7230 | hasBin: true |
| 7228 | 7231 | dev: true |
| 7229 | 7232 | |
| 7233 | + registry.npmmirror.com/pathe/0.3.9: | |
| 7234 | + resolution: {integrity: sha512-6Y6s0vT112P3jD8dGfuS6r+lpa0qqNrLyHPOwvXMnyNTQaYiwgau2DP3aNDsR13xqtGj7rrPo+jFUATpU6/s+g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/pathe/-/pathe-0.3.9.tgz} | |
| 7235 | + name: pathe | |
| 7236 | + version: 0.3.9 | |
| 7237 | + dev: true | |
| 7238 | + | |
| 7230 | 7239 | registry.npmmirror.com/picocolors/1.0.0: |
| 7231 | 7240 | resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz} |
| 7232 | 7241 | name: picocolors | ... | ... |
yudao-ui-admin-vue3/src/utils/auth.ts
| 1 | -import Cookies from 'js-cookie' | |
| 1 | +import { useCache } from '@/hooks/web/useCache' | |
| 2 | 2 | import { TokenType } from '@/api/login/types' |
| 3 | 3 | import { decrypt, encrypt } from '@/utils/jsencrypt' |
| 4 | 4 | |
| 5 | +const { wsCache } = useCache() | |
| 6 | + | |
| 5 | 7 | const AccessTokenKey = 'ACCESS_TOKEN' |
| 6 | 8 | const RefreshTokenKey = 'REFRESH_TOKEN' |
| 7 | 9 | |
| 8 | 10 | // 获取token |
| 9 | 11 | export const getAccessToken = () => { |
| 10 | 12 | // 此处与TokenKey相同,此写法解决初始化时Cookies中不存在TokenKey报错 |
| 11 | - return Cookies.get(AccessTokenKey) ? Cookies.get(AccessTokenKey) : Cookies.get('ACCESS_TOKEN') | |
| 13 | + return wsCache.get(AccessTokenKey) ? wsCache.get(AccessTokenKey) : wsCache.get('ACCESS_TOKEN') | |
| 12 | 14 | } |
| 13 | 15 | |
| 14 | 16 | // 刷新token |
| 15 | 17 | export const getRefreshToken = () => { |
| 16 | - return Cookies.get(RefreshTokenKey) | |
| 18 | + return wsCache.get(RefreshTokenKey) | |
| 17 | 19 | } |
| 18 | 20 | |
| 19 | 21 | // 设置token |
| 20 | 22 | export const setToken = (token: TokenType) => { |
| 21 | - Cookies.set(RefreshTokenKey, token.refreshToken, token.expiresTime) | |
| 22 | - Cookies.set(AccessTokenKey, token.accessToken) | |
| 23 | + wsCache.set(RefreshTokenKey, token.refreshToken, { exp: token.expiresTime }) | |
| 24 | + wsCache.set(AccessTokenKey, token.accessToken) | |
| 23 | 25 | } |
| 24 | 26 | |
| 25 | 27 | // 删除token |
| 26 | 28 | export const removeToken = () => { |
| 27 | - Cookies.remove(AccessTokenKey) | |
| 28 | - Cookies.remove(RefreshTokenKey) | |
| 29 | + wsCache.delete(AccessTokenKey) | |
| 30 | + wsCache.delete(RefreshTokenKey) | |
| 29 | 31 | } |
| 30 | 32 | |
| 31 | 33 | /** 格式化token(jwt格式) */ |
| ... | ... | @@ -39,40 +41,40 @@ const PasswordKey = 'PASSWORD' |
| 39 | 41 | const RememberMeKey = 'REMEMBER_ME' |
| 40 | 42 | |
| 41 | 43 | export const getUsername = () => { |
| 42 | - return Cookies.get(UsernameKey) | |
| 44 | + return wsCache.get(UsernameKey) | |
| 43 | 45 | } |
| 44 | 46 | |
| 45 | 47 | export const setUsername = (username: string) => { |
| 46 | - Cookies.set(UsernameKey, username) | |
| 48 | + wsCache.set(UsernameKey, username) | |
| 47 | 49 | } |
| 48 | 50 | |
| 49 | 51 | export const removeUsername = () => { |
| 50 | - Cookies.remove(UsernameKey) | |
| 52 | + wsCache.delete(UsernameKey) | |
| 51 | 53 | } |
| 52 | 54 | |
| 53 | 55 | export const getPassword = () => { |
| 54 | - const password = Cookies.get(PasswordKey) | |
| 56 | + const password = wsCache.get(PasswordKey) | |
| 55 | 57 | return password ? decrypt(password) : undefined |
| 56 | 58 | } |
| 57 | 59 | |
| 58 | 60 | export const setPassword = (password: string) => { |
| 59 | - Cookies.set(PasswordKey, encrypt(password)) | |
| 61 | + wsCache.set(PasswordKey, encrypt(password)) | |
| 60 | 62 | } |
| 61 | 63 | |
| 62 | 64 | export const removePassword = () => { |
| 63 | - Cookies.remove(PasswordKey) | |
| 65 | + wsCache.delete(PasswordKey) | |
| 64 | 66 | } |
| 65 | 67 | |
| 66 | 68 | export const getRememberMe = () => { |
| 67 | - return Cookies.get(RememberMeKey) === 'true' | |
| 69 | + return wsCache.get(RememberMeKey) === 'true' | |
| 68 | 70 | } |
| 69 | 71 | |
| 70 | 72 | export const setRememberMe = (rememberMe: string) => { |
| 71 | - Cookies.set(RememberMeKey, rememberMe) | |
| 73 | + wsCache.set(RememberMeKey, rememberMe) | |
| 72 | 74 | } |
| 73 | 75 | |
| 74 | 76 | export const removeRememberMe = () => { |
| 75 | - Cookies.remove(RememberMeKey) | |
| 77 | + wsCache.delete(RememberMeKey) | |
| 76 | 78 | } |
| 77 | 79 | |
| 78 | 80 | // ========== 租户相关 ========== |
| ... | ... | @@ -81,25 +83,25 @@ const TenantIdKey = 'TENANT_ID' |
| 81 | 83 | const TenantNameKey = 'TENANT_NAME' |
| 82 | 84 | |
| 83 | 85 | export const getTenantName = () => { |
| 84 | - return Cookies.get(TenantNameKey) | |
| 86 | + return wsCache.get(TenantNameKey) | |
| 85 | 87 | } |
| 86 | 88 | |
| 87 | 89 | export const setTenantName = (username: string) => { |
| 88 | - Cookies.set(TenantNameKey, username) | |
| 90 | + wsCache.set(TenantNameKey, username) | |
| 89 | 91 | } |
| 90 | 92 | |
| 91 | 93 | export const removeTenantName = () => { |
| 92 | - Cookies.remove(TenantNameKey) | |
| 94 | + wsCache.delete(TenantNameKey) | |
| 93 | 95 | } |
| 94 | 96 | |
| 95 | 97 | export const getTenantId = () => { |
| 96 | - return Cookies.get(TenantIdKey) | |
| 98 | + return wsCache.get(TenantIdKey) | |
| 97 | 99 | } |
| 98 | 100 | |
| 99 | 101 | export const setTenantId = (username: string) => { |
| 100 | - Cookies.set(TenantIdKey, username) | |
| 102 | + wsCache.set(TenantIdKey, username) | |
| 101 | 103 | } |
| 102 | 104 | |
| 103 | 105 | export const removeTenantId = () => { |
| 104 | - Cookies.remove(TenantIdKey) | |
| 106 | + wsCache.delete(TenantIdKey) | |
| 105 | 107 | } | ... | ... |
yudao-ui-admin-vue3/src/views/Login/components/LoginForm.vue
| ... | ... | @@ -150,11 +150,11 @@ import { |
| 150 | 150 | ElDivider, |
| 151 | 151 | ElLoading |
| 152 | 152 | } from 'element-plus' |
| 153 | -import Cookies from 'js-cookie' | |
| 154 | 153 | import { useRouter } from 'vue-router' |
| 155 | 154 | import type { RouteLocationNormalizedLoaded } from 'vue-router' |
| 156 | 155 | import { useI18n } from '@/hooks/web/useI18n' |
| 157 | 156 | import { useIcon } from '@/hooks/web/useIcon' |
| 157 | +import { useCache } from '@/hooks/web/useCache' | |
| 158 | 158 | import { required } from '@/utils/formRules' |
| 159 | 159 | import { setToken, setTenantId } from '@/utils/auth' |
| 160 | 160 | import { decrypt, encrypt } from '@/utils/jsencrypt' |
| ... | ... | @@ -166,6 +166,7 @@ import { LoginStateEnum, useLoginState, useFormValid } from './useLogin' |
| 166 | 166 | |
| 167 | 167 | const { t } = useI18n() |
| 168 | 168 | const formLogin = ref() |
| 169 | +const { wsCache } = useCache() | |
| 169 | 170 | const { validForm } = useFormValid(formLogin) |
| 170 | 171 | const { setLoginState, getLoginState } = useLoginState() |
| 171 | 172 | const { currentRoute, push } = useRouter() |
| ... | ... | @@ -194,10 +195,10 @@ const loginData = reactive({ |
| 194 | 195 | signIn: false |
| 195 | 196 | }, |
| 196 | 197 | loginForm: { |
| 197 | - tenantName: Cookies.get('tenantName') ? Cookies.get('tenantName') : '芋道源码', | |
| 198 | - username: Cookies.get('username') ? Cookies.get('username') : 'admin', | |
| 199 | - password: Cookies.get('password') | |
| 200 | - ? (decrypt(Cookies.get('password')) as unknown as string) | |
| 198 | + tenantName: wsCache.get('tenantName') ? wsCache.get('tenantName') : '芋道源码', | |
| 199 | + username: wsCache.get('username') ? wsCache.get('username') : 'admin', | |
| 200 | + password: wsCache.get('password') | |
| 201 | + ? (decrypt(wsCache.get('password')) as unknown as string) | |
| 201 | 202 | : 'admin123', |
| 202 | 203 | captchaVerification: '', |
| 203 | 204 | rememberMe: false |
| ... | ... | @@ -222,12 +223,12 @@ const getTenantId = async () => { |
| 222 | 223 | } |
| 223 | 224 | // 记住我 |
| 224 | 225 | const getCookie = () => { |
| 225 | - const username = Cookies.get('username') | |
| 226 | - const password = Cookies.get('password') | |
| 227 | - ? (decrypt(Cookies.get('password')) as unknown as string) | |
| 226 | + const username = wsCache.get('username') | |
| 227 | + const password = wsCache.get('password') | |
| 228 | + ? (decrypt(wsCache.get('password')) as unknown as string) | |
| 228 | 229 | : undefined |
| 229 | - const rememberMe = Cookies.get('rememberMe') | |
| 230 | - const tenantName = Cookies.get('tenantName') | |
| 230 | + const rememberMe = wsCache.get('rememberMe') | |
| 231 | + const tenantName = wsCache.get('tenantName') | |
| 231 | 232 | loginData.loginForm = { |
| 232 | 233 | ...loginData.loginForm, |
| 233 | 234 | username: username ? username : loginData.loginForm.username, |
| ... | ... | @@ -256,17 +257,17 @@ const handleLogin = async (params) => { |
| 256 | 257 | background: 'rgba(0, 0, 0, 0.7)' |
| 257 | 258 | }) |
| 258 | 259 | if (loginData.loginForm.rememberMe) { |
| 259 | - Cookies.set('username', loginData.loginForm.username, { expires: 30 }) | |
| 260 | - Cookies.set('password', encrypt(loginData.loginForm.password as unknown as string), { | |
| 261 | - expires: 30 | |
| 260 | + wsCache.set('username', loginData.loginForm.username, { exp: 30 * 24 * 60 * 60 }) | |
| 261 | + wsCache.set('password', encrypt(loginData.loginForm.password as unknown as string), { | |
| 262 | + exp: 30 | |
| 262 | 263 | }) |
| 263 | - Cookies.set('rememberMe', loginData.loginForm.rememberMe, { expires: 30 }) | |
| 264 | - Cookies.set('tenantName', loginData.loginForm.tenantName, { expires: 30 }) | |
| 264 | + wsCache.set('rememberMe', loginData.loginForm.rememberMe, { exp: 30 * 24 * 60 * 60 }) | |
| 265 | + wsCache.set('tenantName', loginData.loginForm.tenantName, { exp: 30 * 24 * 60 * 60 }) | |
| 265 | 266 | } else { |
| 266 | - Cookies.remove('username') | |
| 267 | - Cookies.remove('password') | |
| 268 | - Cookies.remove('rememberMe') | |
| 269 | - Cookies.remove('tenantName') | |
| 267 | + wsCache.delete('username') | |
| 268 | + wsCache.delete('password') | |
| 269 | + wsCache.delete('rememberMe') | |
| 270 | + wsCache.delete('tenantName') | |
| 270 | 271 | } |
| 271 | 272 | setToken(res) |
| 272 | 273 | if (!redirect.value) { | ... | ... |
yudao-ui-admin-vue3/vite.config.ts
| ... | ... | @@ -142,25 +142,30 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { |
| 142 | 142 | optimizeDeps: { |
| 143 | 143 | include: [ |
| 144 | 144 | 'vue', |
| 145 | + 'sass', | |
| 145 | 146 | 'vue-router', |
| 146 | 147 | 'vue-types', |
| 147 | 148 | 'vue-i18n', |
| 148 | 149 | 'vxe-table', |
| 150 | + 'vxe-table/es/style', | |
| 149 | 151 | 'xe-utils', |
| 150 | 152 | 'lodash-es', |
| 151 | - 'element-plus/es', | |
| 153 | + 'element-plus', | |
| 152 | 154 | 'element-plus/es/locale/lang/zh-cn', |
| 153 | 155 | 'element-plus/es/locale/lang/en', |
| 154 | 156 | '@iconify/iconify', |
| 155 | 157 | '@vueuse/core', |
| 156 | - 'axios', | |
| 157 | 158 | 'qs', |
| 159 | + 'axios', | |
| 160 | + 'pinia', | |
| 158 | 161 | 'dayjs', |
| 159 | - 'echarts', | |
| 162 | + 'qrcode', | |
| 163 | + 'echarts/core', | |
| 164 | + 'echarts/charts', | |
| 165 | + 'echarts/components', | |
| 166 | + 'echarts/renderers', | |
| 160 | 167 | 'echarts-wordcloud', |
| 161 | 168 | 'intro.js', |
| 162 | - 'qrcode', | |
| 163 | - 'pinia', | |
| 164 | 169 | 'crypto-js', |
| 165 | 170 | '@wangeditor/editor', |
| 166 | 171 | '@wangeditor/editor-for-vue' | ... | ... |