From fcc65c37510736bb74ed434f41511df886be221e Mon Sep 17 00:00:00 2001 From: Soybean Date: Wed, 16 Nov 2022 22:51:57 +0800 Subject: [PATCH 1/4] build(deps): update deps --- package.json | 8 ++-- pnpm-lock.yaml | 124 ++++++++++++++++++++++++++----------------------- 2 files changed, 69 insertions(+), 63 deletions(-) diff --git a/package.json b/package.json index d6fc2810..88ba694a 100644 --- a/package.json +++ b/package.json @@ -81,11 +81,11 @@ "vue-router": "^4.1.6", "vuedraggable": "^4.1.0", "wangeditor": "^4.7.15", - "xgplayer": "^2.32.1" + "xgplayer": "^2.32.2" }, "devDependencies": { "@amap/amap-jsapi-types": "^0.0.10", - "@iconify/json": "^2.1.136", + "@iconify/json": "^2.1.139", "@iconify/vue": "^4.0.0", "@soybeanjs/router-page": "1.0.3", "@types/bmapgl": "^0.0.5", @@ -107,7 +107,7 @@ "esno": "^0.16.3", "husky": "^8.0.2", "mockjs": "^1.1.0", - "npm-check-updates": "^16.3.25", + "npm-check-updates": "^16.4.1", "rimraf": "^3.0.2", "rollup-plugin-visualizer": "^5.8.3", "sass": "^1.56.1", @@ -117,7 +117,7 @@ "unplugin-vue-components": "0.22.9", "unplugin-vue-macros": "^0.16.3", "utility-types": "^3.10.0", - "vite": "^3.2.3", + "vite": "^3.2.4", "vite-plugin-compression": "^0.5.1", "vite-plugin-html": "^3.2.0", "vite-plugin-mock": "^2.9.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d477609e..3955ac05 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,7 +10,7 @@ specifiers: '@antv/data-set': ^0.11.8 '@antv/g2': ^4.2.8 '@better-scroll/core': ^2.5.0 - '@iconify/json': ^2.1.136 + '@iconify/json': ^2.1.139 '@iconify/vue': ^4.0.0 '@soybeanjs/router-page': 1.0.3 '@soybeanjs/vue-admin-layout': ^1.1.1 @@ -44,7 +44,7 @@ specifiers: lodash-es: ^4.17.21 mockjs: ^1.1.0 naive-ui: 2.33.5 - npm-check-updates: ^16.3.25 + npm-check-updates: ^16.4.1 pinia: ^2.0.23 print-js: ^1.6.0 qs: ^6.11.0 @@ -60,7 +60,7 @@ specifiers: unplugin-vue-macros: ^0.16.3 utility-types: ^3.10.0 vditor: ^3.8.18 - vite: ^3.2.3 + vite: ^3.2.4 vite-plugin-compression: ^0.5.1 vite-plugin-html: ^3.2.0 vite-plugin-mock: ^2.9.6 @@ -73,7 +73,7 @@ specifiers: vue-tsc: ^1.0.9 vuedraggable: ^4.1.0 wangeditor: ^4.7.15 - xgplayer: ^2.32.1 + xgplayer: ^2.32.2 zx: ^7.1.1 dependencies: @@ -103,11 +103,11 @@ dependencies: vue-router: 4.1.6_vue@3.2.45 vuedraggable: 4.1.0_vue@3.2.45 wangeditor: 4.7.15 - xgplayer: 2.32.1 + xgplayer: 2.32.2 devDependencies: '@amap/amap-jsapi-types': 0.0.10 - '@iconify/json': 2.1.136 + '@iconify/json': 2.1.139 '@iconify/vue': 4.0.0_vue@3.2.45 '@soybeanjs/router-page': 1.0.3 '@types/bmapgl': 0.0.5 @@ -116,9 +116,9 @@ devDependencies: '@types/qs': 6.9.7 '@types/ua-parser-js': 0.7.36 '@unocss/preset-uno': 0.46.5 - '@unocss/vite': 0.46.5_rollup@2.79.1+vite@3.2.3 - '@vitejs/plugin-vue': 3.2.0_vite@3.2.3+vue@3.2.45 - '@vitejs/plugin-vue-jsx': 2.1.1_vite@3.2.3+vue@3.2.45 + '@unocss/vite': 0.46.5_rollup@2.79.1+vite@3.2.4 + '@vitejs/plugin-vue': 3.2.0_vite@3.2.4+vue@3.2.45 + '@vitejs/plugin-vue-jsx': 2.1.1_vite@3.2.4+vue@3.2.45 commitlint: 17.2.0 conventional-changelog: 3.1.25 cross-env: 7.0.3 @@ -129,7 +129,7 @@ devDependencies: esno: 0.16.3 husky: 8.0.2 mockjs: 1.1.0_3y7clh66jsbznbjsqlxuh6722u - npm-check-updates: 16.3.25 + npm-check-updates: 16.4.1 rimraf: 3.0.2 rollup-plugin-visualizer: 5.8.3_rollup@2.79.1 sass: 1.56.1 @@ -137,15 +137,15 @@ devDependencies: typescript: 4.8.4 unplugin-icons: 0.14.13 unplugin-vue-components: 0.22.9_rollup@2.79.1+vue@3.2.45 - unplugin-vue-macros: 0.16.3_mtjmd4d7yri6vok5vdb7foxsoq + unplugin-vue-macros: 0.16.3_wngx4xzvqgttz6r2laqlxyas2u utility-types: 3.10.0 - vite: 3.2.3_ajklay5k626t46b6fyghkbup3i - vite-plugin-compression: 0.5.1_vite@3.2.3 - vite-plugin-html: 3.2.0_vite@3.2.3 - vite-plugin-mock: 2.9.6_qj5sox3st75utfpfnxdchh4ucq - vite-plugin-progress: 0.0.6_vite@3.2.3 - vite-plugin-pwa: 0.13.3_jklrv2undatkozcsn24zow6xuu - vite-plugin-svg-icons: 2.0.1_vite@3.2.3 + vite: 3.2.4_ajklay5k626t46b6fyghkbup3i + vite-plugin-compression: 0.5.1_vite@3.2.4 + vite-plugin-html: 3.2.0_vite@3.2.4 + vite-plugin-mock: 2.9.6_55m5mhr4n72hhmialh5t5h2xye + vite-plugin-progress: 0.0.6_vite@3.2.4 + vite-plugin-pwa: 0.13.3_ncfuj3sngaz4xbo7yyj2tfhvju + vite-plugin-svg-icons: 2.0.1_vite@3.2.4 vue-tsc: 1.0.9_typescript@4.8.4 zx: 7.1.1 @@ -1637,11 +1637,11 @@ packages: '@types/node': 14.18.33 chalk: 4.1.2 cosmiconfig: 7.1.0 - cosmiconfig-typescript-loader: 4.2.0_zhrz2lclwdmp54iaqottwiuipu + cosmiconfig-typescript-loader: 4.2.0_qoh33be55smklb2oyrgdyddh4a lodash: 4.17.21 resolve-from: 5.0.0 ts-node: 10.9.1_cbe7ovvae6zqfnmtgctpgpys54 - typescript: 4.8.4 + typescript: 4.9.3 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -1833,8 +1833,8 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@iconify/json/2.1.136: - resolution: {integrity: sha512-tO5hV+yXn87+OCQqiVzis6i4YQiRX4044ZjubP6GmbeclE6tsypK+by/tXjbm90GTX0jhsOJ6YLzWl3szivywg==} + /@iconify/json/2.1.139: + resolution: {integrity: sha512-H/DQ/yVgdUk4x4hU696fy0mZOkvLQaR6REQU/okFLgaiIFOS+EWw6GV5JDSKbbkh0YVaxUrAUaqB8XTSFVrFeA==} dependencies: '@iconify/types': 2.0.0 pathe: 0.3.9 @@ -2569,7 +2569,7 @@ packages: css-tree: 2.2.1 dev: true - /@unocss/vite/0.46.5_rollup@2.79.1+vite@3.2.3: + /@unocss/vite/0.46.5_rollup@2.79.1+vite@3.2.4: resolution: {integrity: sha512-/auNcS1L3PjwAA3U/i9scJf2Zx3kkgCdKiXyfetjws4ddAnVE+LrDmIKbbdSUiWFoq9W2QOPpOPpV2xips2gmg==} peerDependencies: vite: ^2.9.0 || ^3.0.0-0 @@ -2582,12 +2582,12 @@ packages: '@unocss/scope': 0.46.5 '@unocss/transformer-directives': 0.46.5 magic-string: 0.26.7 - vite: 3.2.3_ajklay5k626t46b6fyghkbup3i + vite: 3.2.4_ajklay5k626t46b6fyghkbup3i transitivePeerDependencies: - rollup dev: true - /@vitejs/plugin-vue-jsx/2.1.1_vite@3.2.3+vue@3.2.45: + /@vitejs/plugin-vue-jsx/2.1.1_vite@3.2.4+vue@3.2.45: resolution: {integrity: sha512-JgDhxstQlwnHBvZ1BSnU5mbmyQ14/t5JhREc6YH5kWyu2QdAAOsLF6xgHoIWarj8tddaiwFrNzLbWJPudpXKYA==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -2597,20 +2597,20 @@ packages: '@babel/core': 7.20.2 '@babel/plugin-transform-typescript': 7.20.2_@babel+core@7.20.2 '@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.20.2 - vite: 3.2.3_ajklay5k626t46b6fyghkbup3i + vite: 3.2.4_ajklay5k626t46b6fyghkbup3i vue: 3.2.45 transitivePeerDependencies: - supports-color dev: true - /@vitejs/plugin-vue/3.2.0_vite@3.2.3+vue@3.2.45: + /@vitejs/plugin-vue/3.2.0_vite@3.2.4+vue@3.2.45: resolution: {integrity: sha512-E0tnaL4fr+qkdCNxJ+Xd0yM31UwMkQje76fsDVBBUCoGOUPexu2VDUYHL8P4CwV+zMvWw6nlRw19OnRKmYAJpw==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^3.0.0 vue: ^3.2.25 dependencies: - vite: 3.2.3_ajklay5k626t46b6fyghkbup3i + vite: 3.2.4_ajklay5k626t46b6fyghkbup3i vue: 3.2.45 dev: true @@ -2742,16 +2742,16 @@ packages: unplugin: 0.10.2 dev: true - /@vue-macros/named-template/0.0.5_pwzry6ifamiyy66hle7uchcfiy: + /@vue-macros/named-template/0.0.5_2aqiuug577r2uhg7pi2e2y3u2a: resolution: {integrity: sha512-bZRUljNyvOOqeE9dyqXvKPQCLUCcPt1EkThmXqSbxagV29ohyviF8+CCs/8OdmNygLTBIChjP8DexQ3nUIFzUg==} engines: {node: '>=14.19.0'} dependencies: '@rollup/pluginutils': 4.2.1 - '@vitejs/plugin-vue': 3.2.0_vite@3.2.3+vue@3.2.45 + '@vitejs/plugin-vue': 3.2.0_vite@3.2.4+vue@3.2.45 '@vue-macros/common': 0.13.3 '@vue/compiler-dom': 3.2.45 unplugin: 0.10.2 - unplugin-combine: 0.2.8_rollup@2.79.1+vite@3.2.3 + unplugin-combine: 0.2.8_rollup@2.79.1+vite@3.2.4 transitivePeerDependencies: - esbuild - rollup @@ -2760,14 +2760,14 @@ packages: - webpack dev: true - /@vue-macros/setup-component/0.12.7_rollup@2.79.1+vite@3.2.3: + /@vue-macros/setup-component/0.12.7_rollup@2.79.1+vite@3.2.4: resolution: {integrity: sha512-L0WkJgw0QDwZh4tOjjKIDR0DMIybiOunsaxVqkJjicTb2YaiRUSLq4Wadl8Ttrsd0IEfI51CSlg7Sx0/dKLrlQ==} engines: {node: '>=14.19.0'} dependencies: '@rollup/pluginutils': 4.2.1 '@vue-macros/common': 0.13.3 unplugin: 0.10.2 - unplugin-combine: 0.2.8_rollup@2.79.1+vite@3.2.3 + unplugin-combine: 0.2.8_rollup@2.79.1+vite@3.2.4 transitivePeerDependencies: - esbuild - rollup @@ -4006,7 +4006,7 @@ packages: vary: 1.1.2 dev: true - /cosmiconfig-typescript-loader/4.2.0_zhrz2lclwdmp54iaqottwiuipu: + /cosmiconfig-typescript-loader/4.2.0_qoh33be55smklb2oyrgdyddh4a: resolution: {integrity: sha512-NkANeMnaHrlaSSlpKGyvn2R4rqUDeE/9E5YHx+b4nwo0R8dZyAqcih8/gxpCZvqWP9Vf6xuLpMSzSgdVEIM78g==} engines: {node: '>=12', npm: '>=6'} peerDependencies: @@ -4018,7 +4018,7 @@ packages: '@types/node': 14.18.33 cosmiconfig: 7.1.0 ts-node: 10.9.1_cbe7ovvae6zqfnmtgctpgpys54 - typescript: 4.8.4 + typescript: 4.9.3 dev: true /cosmiconfig/7.1.0: @@ -7820,8 +7820,8 @@ packages: npm-normalize-package-bin: 3.0.0 dev: true - /npm-check-updates/16.3.25: - resolution: {integrity: sha512-zrjx6P7LGHYS5e3TNuSqkWQc9m1KLjJIxFERGANN+xEY826NQYG08RwucUD9nRxIlRE9PsGCcMsJJTYJu1DHbA==} + /npm-check-updates/16.4.1: + resolution: {integrity: sha512-g0Uf1kCw0p5boutvu5E4htsjYEDuFT9LxYHYFLldAzWs5012jVikEH1Wdae68xedu4twF4EVbKcs83+G2nGnQg==} engines: {node: '>=14.14'} hasBin: true dependencies: @@ -10396,6 +10396,12 @@ packages: engines: {node: '>=4.2.0'} hasBin: true + /typescript/4.9.3: + resolution: {integrity: sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: true + /ua-parser-js/1.0.32: resolution: {integrity: sha512-dXVsz3M4j+5tTiovFVyVqssXBu5HM47//YSOeZ9fQkdDKkfzv2v3PP1jmH6FUyPW+yCSn7aBVK1fGGKNhowdDA==} dev: false @@ -10595,7 +10601,7 @@ packages: engines: {node: '>= 0.8'} dev: true - /unplugin-combine/0.2.8_rollup@2.79.1+vite@3.2.3: + /unplugin-combine/0.2.8_rollup@2.79.1+vite@3.2.4: resolution: {integrity: sha512-Z38AC/TEjXbVyZ5HjVqo+lADj0/dcfwWC0Z4y0LNhybJzJQwmcMxm+ZsqHY3faauj4YigmlRMdptR5JEW9RuLg==} engines: {node: '>=14.19.0'} peerDependencies: @@ -10616,7 +10622,7 @@ packages: '@antfu/utils': 0.6.3 rollup: 2.79.1 unplugin: 0.10.2 - vite: 3.2.3_ajklay5k626t46b6fyghkbup3i + vite: 3.2.4_ajklay5k626t46b6fyghkbup3i dev: true /unplugin-icons/0.14.13: @@ -10683,7 +10689,7 @@ packages: unplugin: 0.10.2 dev: true - /unplugin-vue-macros/0.16.3_mtjmd4d7yri6vok5vdb7foxsoq: + /unplugin-vue-macros/0.16.3_wngx4xzvqgttz6r2laqlxyas2u: resolution: {integrity: sha512-ADdDS5EjHRZ2esEHSNBw7CS7QLWpqvNJIW0H5EqKgSvtQ+2Hnb8IeRVT0f4mR+wyQvl/ZrlpTs1GvZdsh8eSlw==} engines: {node: '>=14.19.0'} peerDependencies: @@ -10696,12 +10702,12 @@ packages: '@vue-macros/define-render': 0.13.8_vue@3.2.45 '@vue-macros/define-slots': 0.0.5_vue@3.2.45 '@vue-macros/hoist-static': 0.12.7 - '@vue-macros/named-template': 0.0.5_pwzry6ifamiyy66hle7uchcfiy - '@vue-macros/setup-component': 0.12.7_rollup@2.79.1+vite@3.2.3 + '@vue-macros/named-template': 0.0.5_2aqiuug577r2uhg7pi2e2y3u2a + '@vue-macros/setup-component': 0.12.7_rollup@2.79.1+vite@3.2.4 '@vue-macros/setup-sfc': 0.12.7 '@vue-macros/short-emits': 0.12.8 local-pkg: 0.4.2 - unplugin-combine: 0.2.8_rollup@2.79.1+vite@3.2.3 + unplugin-combine: 0.2.8_rollup@2.79.1+vite@3.2.4 unplugin-vue-define-options: 0.12.7 vue: 3.2.45 transitivePeerDependencies: @@ -10862,7 +10868,7 @@ packages: vfile-message: 2.0.4 dev: true - /vite-plugin-compression/0.5.1_vite@3.2.3: + /vite-plugin-compression/0.5.1_vite@3.2.4: resolution: {integrity: sha512-5QJKBDc+gNYVqL/skgFAP81Yuzo9R+EAf19d+EtsMF/i8kFUpNi3J/H01QD3Oo8zBQn+NzoCIFkpPLynoOzaJg==} peerDependencies: vite: '>=2.0.0' @@ -10870,12 +10876,12 @@ packages: chalk: 4.1.2 debug: 4.3.4 fs-extra: 10.1.0 - vite: 3.2.3_ajklay5k626t46b6fyghkbup3i + vite: 3.2.4_ajklay5k626t46b6fyghkbup3i transitivePeerDependencies: - supports-color dev: true - /vite-plugin-html/3.2.0_vite@3.2.3: + /vite-plugin-html/3.2.0_vite@3.2.4: resolution: {integrity: sha512-2VLCeDiHmV/BqqNn5h2V+4280KRgQzCFN47cst3WiNK848klESPQnzuC3okH5XHtgwHH/6s1Ho/YV6yIO0pgoQ==} peerDependencies: vite: '>=2.0.0' @@ -10892,10 +10898,10 @@ packages: html-minifier-terser: 6.1.0 node-html-parser: 5.4.2 pathe: 0.2.0 - vite: 3.2.3_ajklay5k626t46b6fyghkbup3i + vite: 3.2.4_ajklay5k626t46b6fyghkbup3i dev: true - /vite-plugin-mock/2.9.6_qj5sox3st75utfpfnxdchh4ucq: + /vite-plugin-mock/2.9.6_55m5mhr4n72hhmialh5t5h2xye: resolution: {integrity: sha512-/Rm59oPppe/ncbkSrUuAxIQihlI2YcBmnbR4ST1RA2VzM1C0tEQc1KlbQvnUGhXECAGTaQN2JyasiwXP6EtKgg==} engines: {node: '>=12.0.0'} peerDependencies: @@ -10912,13 +10918,13 @@ packages: fast-glob: 3.2.12 mockjs: 1.1.0_3y7clh66jsbznbjsqlxuh6722u path-to-regexp: 6.2.1 - vite: 3.2.3_ajklay5k626t46b6fyghkbup3i + vite: 3.2.4_ajklay5k626t46b6fyghkbup3i transitivePeerDependencies: - rollup - supports-color dev: true - /vite-plugin-progress/0.0.6_vite@3.2.3: + /vite-plugin-progress/0.0.6_vite@3.2.4: resolution: {integrity: sha512-pIK2TVEY4XFGrz10CQDdEufBBCDaV0geRHfXV3abGTBr+OF9O0Zmd3ZDrHJXDv4Rl3qAQP4BTCuPYQ3XqstmqA==} engines: {node: '>=14', pnpm: '>=7.0.0'} peerDependencies: @@ -10927,10 +10933,10 @@ packages: picocolors: 1.0.0 progress: 2.0.3 rd: 2.0.1 - vite: 3.2.3_ajklay5k626t46b6fyghkbup3i + vite: 3.2.4_ajklay5k626t46b6fyghkbup3i dev: true - /vite-plugin-pwa/0.13.3_jklrv2undatkozcsn24zow6xuu: + /vite-plugin-pwa/0.13.3_ncfuj3sngaz4xbo7yyj2tfhvju: resolution: {integrity: sha512-cjWXpZ7slAY14OKz7M8XdgTIi9wjf6OD6NkhiMAc+ogxnbUrecUwLdRtfGPCPsN2ftut5gaN1jTghb11p6IQAA==} peerDependencies: vite: ^3.1.0 @@ -10942,14 +10948,14 @@ packages: fast-glob: 3.2.12 pretty-bytes: 6.0.0 rollup: 2.79.1 - vite: 3.2.3_ajklay5k626t46b6fyghkbup3i + vite: 3.2.4_ajklay5k626t46b6fyghkbup3i workbox-build: 6.5.4 workbox-window: 6.5.4 transitivePeerDependencies: - supports-color dev: true - /vite-plugin-svg-icons/2.0.1_vite@3.2.3: + /vite-plugin-svg-icons/2.0.1_vite@3.2.4: resolution: {integrity: sha512-6ktD+DhV6Rz3VtedYvBKKVA2eXF+sAQVaKkKLDSqGUfnhqXl3bj5PPkVTl3VexfTuZy66PmINi8Q6eFnVfRUmA==} peerDependencies: vite: '>=2.0.0' @@ -10962,13 +10968,13 @@ packages: pathe: 0.2.0 svg-baker: 1.7.0 svgo: 2.8.0 - vite: 3.2.3_ajklay5k626t46b6fyghkbup3i + vite: 3.2.4_ajklay5k626t46b6fyghkbup3i transitivePeerDependencies: - supports-color dev: true - /vite/3.2.3_ajklay5k626t46b6fyghkbup3i: - resolution: {integrity: sha512-h8jl1TZ76eGs3o2dIBSsvXDLb1m/Ec1iej8ZMdz+PsaFUsftZeWe2CZOI3qogEsMNaywc17gu0q6cQDzh/weCQ==} + /vite/3.2.4_ajklay5k626t46b6fyghkbup3i: + resolution: {integrity: sha512-Z2X6SRAffOUYTa+sLy3NQ7nlHFU100xwanq1WDwqaiFiCe+25zdxP1TfCS5ojPV2oDDcXudHIoPnI1Z/66B7Yw==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: @@ -11427,8 +11433,8 @@ packages: generate-source-map: 0.0.5 dev: false - /xgplayer/2.32.1: - resolution: {integrity: sha512-jUs6108INqnzEn3DTGre6pHW3KroM2w0VKuJNEvOIkoD2oUB+MW5ZZ0PsIwijX/oQRpmvq422CUgo4uqXVidEQ==} + /xgplayer/2.32.2: + resolution: {integrity: sha512-VWK8Hp5K3Fs5YoHadpyCw2zwuiOimRjkPo2PSJZPYKj59VNnL9oLruZp6cy86LHoAgWELRIQj6Nmw5SkQNByWQ==} hasBin: true dependencies: chalk: 2.4.2 From 57bfe278190d72aaf57b17784393aa2cbf639ffa Mon Sep 17 00:00:00 2001 From: Soybean Date: Wed, 16 Nov 2022 23:35:26 +0800 Subject: [PATCH 2/4] =?UTF-8?q?refactor(projects):=20refactor=20app=20init?= =?UTF-8?q?=20loading=20[=E9=87=8D=E6=9E=84=E7=B3=BB=E7=BB=9F=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E7=9A=84=E5=8A=A0=E8=BD=BD]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 15 +---- public/resource/loading.css | 91 ---------------------------- public/resource/loading.js | 44 -------------- src/components/common/AppLoading.vue | 42 +++++++++++++ src/main.ts | 6 ++ 5 files changed, 49 insertions(+), 149 deletions(-) delete mode 100644 public/resource/loading.css delete mode 100644 public/resource/loading.js create mode 100644 src/components/common/AppLoading.vue diff --git a/index.html b/index.html index be0f0d68..6b249216 100644 --- a/index.html +++ b/index.html @@ -3,25 +3,12 @@ - <%= appName %>
-
- -
-
-
-
-
-
-
-
-
<%= appTitle %>
-
- +
diff --git a/public/resource/loading.css b/public/resource/loading.css deleted file mode 100644 index 4f2a1bdb..00000000 --- a/public/resource/loading.css +++ /dev/null @@ -1,91 +0,0 @@ -.loading-container { - position: fixed; - left: 0; - top: 0; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - width: 100%; - height: 100%; -} - -.loading-svg { - width: 128px; - height: 128px; - color: var(--primary-color); -} - -.loading-spin__container { - width: 56px; - height: 56px; - margin: 36px 0; -} - -.loading-spin { - position: relative; - height: 100%; - animation: loadingSpin 1s linear infinite; -} - -.left-0 { - left: 0; -} -.right-0 { - right: 0; -} -.top-0 { - top: 0; -} -.bottom-0 { - bottom: 0; -} - -.loading-spin-item { - position: absolute; - height: 16px; - width: 16px; - background-color: var(--primary-color); - border-radius: 8px; - -webkit-animation: loadingPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; - animation: loadingPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; -} - -@keyframes loadingSpin { - from { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - to { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} - -@keyframes loadingPulse { - 0%, 100% { - opacity: 1; - } - 50% { - opacity: .5; - } -} - -.loading-delay-500 { - -webkit-animation-delay: 500ms; - animation-delay: 500ms; -} -.loading-delay-1000 { - -webkit-animation-delay: 1000ms; - animation-delay: 1000ms; -} -.loading-delay-1500 { - -webkit-animation-delay: 1500ms; - animation-delay: 1500ms; -} - -.loading-title { - font-size: 28px; - font-weight: 500; - color: #646464; -} diff --git a/public/resource/loading.js b/public/resource/loading.js deleted file mode 100644 index f9aa943d..00000000 --- a/public/resource/loading.js +++ /dev/null @@ -1,44 +0,0 @@ -/** - * 初始化加载效果的svg格式logo - * @param {string} id - 元素id - */ -function initSvgLogo(id) { - const svgStr = ` - - - - - - `; - const appEl = document.querySelector(id); - const div = document.createElement('div'); - div.innerHTML = svgStr; - if (appEl) { - appEl.appendChild(div); - } -} - -function addThemeColorCssVars() { - const key = '__THEME_COLOR__'; - const defaultColor = '#1890ff'; - const themeColor = window.localStorage.getItem(key) || defaultColor; - const cssVars = `--primary-color: ${themeColor}`; - document.documentElement.style.cssText = cssVars; -} - -addThemeColorCssVars(); - -initSvgLogo('#loadingLogo'); diff --git a/src/components/common/AppLoading.vue b/src/components/common/AppLoading.vue new file mode 100644 index 00000000..836dcb79 --- /dev/null +++ b/src/components/common/AppLoading.vue @@ -0,0 +1,42 @@ + + + + + diff --git a/src/main.ts b/src/main.ts index 6a81dfb8..61517e21 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,6 @@ import { createApp } from 'vue'; import App from './App.vue'; +import AppLoading from './components/common/AppLoading.vue'; import { setupDirectives } from './directives'; import { setupRouter } from './router'; import { setupAssets } from './plugins'; @@ -10,6 +11,11 @@ async function setupApp() { // import assets: js、css setupAssets(); + // app loading + const appLoading = createApp(AppLoading); + + appLoading.mount('#appLoading'); + const app = createApp(App); // store plugin: pinia From 7a5803551419f65ca55ba797b49273b3a0dc6067 Mon Sep 17 00:00:00 2001 From: Soybean Date: Wed, 16 Nov 2022 23:46:18 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix(projects):=20add=20router-page.d.ts=20t?= =?UTF-8?q?o=20git=20[=E5=B0=86router-page.d.ts=E6=B7=BB=E5=8A=A0git?= =?UTF-8?q?=E6=8F=90=E4=BA=A4]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 - src/typings/router-page.d.ts | 67 ++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 src/typings/router-page.d.ts diff --git a/.gitignore b/.gitignore index 872102ee..1f0bea9a 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,5 @@ stats.html *.sw? /src/typings/components.d.ts -/src/typings/router-page.d.ts package-lock.json yarn.lock diff --git a/src/typings/router-page.d.ts b/src/typings/router-page.d.ts new file mode 100644 index 00000000..3f4dd3a1 --- /dev/null +++ b/src/typings/router-page.d.ts @@ -0,0 +1,67 @@ +declare namespace RouterPage { + /** 根路由 */ + type RootRouteKey = 'root'; + + /** 未找到路由(捕获无效路径的路由) */ + type NotFoundRouteKey = 'not-found'; + + /** 页面路由 */ + type RouteKey = + | '403' + | '404' + | '500' + | 'about' + | 'auth-demo' + | 'auth-demo_permission' + | 'auth-demo_super' + | 'component' + | 'component_button' + | 'component_card' + | 'component_table' + | 'constant-page' + | 'dashboard' + | 'dashboard_analysis' + | 'dashboard_workbench' + | 'document' + | 'document_naive' + | 'document_project' + | 'document_project-link' + | 'document_vite' + | 'document_vue' + | 'exception' + | 'exception_403' + | 'exception_404' + | 'exception_500' + | 'function' + | 'function_tab' + | 'function_tab-detail' + | 'function_tab-multi-detail' + | 'login' + | 'management' + | 'management_auth' + | 'management_role' + | 'management_route' + | 'management_user' + | 'multi-menu' + | 'multi-menu_first' + | 'multi-menu_first_second' + | 'multi-menu_first_second-new' + | 'multi-menu_first_second-new_third' + | 'not-found' + | 'plugin' + | 'plugin_charts' + | 'plugin_charts_antv' + | 'plugin_charts_echarts' + | 'plugin_copy' + | 'plugin_editor' + | 'plugin_editor_markdown' + | 'plugin_editor_quill' + | 'plugin_icon' + | 'plugin_map' + | 'plugin_print' + | 'plugin_swiper' + | 'plugin_video'; + + /** 最后一级路由(该级路有对应的vue文件) */ + type LastDegreeRouteKey = Extract +} From 971915948b852be27940d232b11b510b286b4381 Mon Sep 17 00:00:00 2001 From: Soybean Date: Thu, 17 Nov 2022 01:47:06 +0800 Subject: [PATCH 4/4] =?UTF-8?q?refactor(projects):=20new=20storage=20syste?= =?UTF-8?q?m=20[=E6=96=B0=E7=9A=84=E6=9C=AC=E5=9C=B0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E7=B3=BB=E7=BB=9F]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/AppLoading.vue | 5 +- src/enum/common.ts | 16 ------ src/router/guard/dynamic.ts | 4 +- src/router/guard/permission.ts | 4 +- src/service/request/helpers.ts | 9 ++-- src/service/request/instance.ts | 4 +- src/store/modules/auth/helpers.ts | 25 +++++++++ src/store/modules/auth/index.ts | 9 ++-- src/store/modules/route/index.ts | 12 +++-- src/store/modules/tab/helpers.ts | 12 ++--- src/store/modules/tab/index.ts | 6 +-- src/store/modules/theme/helpers.ts | 22 ++------ src/store/modules/theme/index.ts | 7 +-- src/store/subscribe/theme.ts | 4 +- src/typings/storage.d.ts | 22 ++++++++ src/utils/auth/index.ts | 1 - src/utils/auth/user.ts | 60 --------------------- src/utils/common/index.ts | 2 - src/utils/common/object.ts | 4 -- src/utils/common/theme.ts | 16 ------ src/utils/index.ts | 1 - src/utils/storage/local.ts | 78 ++++++++++++++++------------ src/utils/storage/session.ts | 34 ++++++++++++ 23 files changed, 166 insertions(+), 191 deletions(-) create mode 100644 src/store/modules/auth/helpers.ts create mode 100644 src/typings/storage.d.ts delete mode 100644 src/utils/auth/index.ts delete mode 100644 src/utils/auth/user.ts delete mode 100644 src/utils/common/object.ts delete mode 100644 src/utils/common/theme.ts diff --git a/src/components/common/AppLoading.vue b/src/components/common/AppLoading.vue index 836dcb79..1d2bab3b 100644 --- a/src/components/common/AppLoading.vue +++ b/src/components/common/AppLoading.vue @@ -16,9 +16,8 @@