Commit 31134103 authored by sunguoshu's avatar sunguoshu

unocss

parent db1a2091
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -58,6 +58,7 @@
"swagger-editor-dist": "^4.10.0",
"terser": "^5.18.2",
"typescript": "^5.1.5",
"unocss": "^0.53.6",
"unplugin-auto-import": "^0.16.4",
"unplugin-vue-components": "^0.25.1",
"unplugin-vue-macros": "^2.3.6",
......
......@@ -118,6 +118,9 @@ devDependencies:
typescript:
specifier: ^5.1.5
version: 5.1.6
unocss:
specifier: ^0.53.6
version: 0.53.6(postcss@8.4.26)(vite@4.4.4)
unplugin-auto-import:
specifier: ^0.16.4
version: 0.16.6
......@@ -186,6 +189,13 @@ packages:
resolution: {integrity: sha512-jCH+k2Vjlno4YWl6g535nHR09PwCEmTBKAG6VqF+rhkrSPRLfgpU2maagwbZPLjaHuU5Jd1DFQ2KJpQuI6uG8w==}
dev: false
/@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/utils@0.7.5:
resolution: {integrity: sha512-dlR6LdS+0SzOAPx/TPRhnoi7hE251OVeT2Snw0RguNbBSbjUHdWr0l3vcUUDg26rEysT89kCbtw1lVorBXLLCg==}
dev: true
......@@ -1614,6 +1624,19 @@ packages:
resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==}
dev: true
/@iconify/utils@2.1.7:
resolution: {integrity: sha512-P8S3z/L1LcV4Qem9AoCfVAaTFGySEMzFEY4CHZLkfRj0Fv9LiR+AwjDgrDrzyI93U2L2mg9JHsbTJ52mF8suNw==}
dependencies:
'@antfu/install-pkg': 0.1.1
'@antfu/utils': 0.7.5
'@iconify/types': 2.0.0
debug: 4.3.4
kolorist: 1.8.0
local-pkg: 0.4.3
transitivePeerDependencies:
- supports-color
dev: true
/@iconify/vue2@2.1.0(vue@2.7.14):
resolution: {integrity: sha512-+R4T9EqrUecMKh/tdiscju/mJS+HCzHFFuJ9XnNcFLaIj3lBOdh8RJolPY9n4k7XRG5V/tY16Lzx+mv+vOmjhA==}
peerDependencies:
......@@ -1935,6 +1958,195 @@ packages:
vue: 2.7.14
dev: false
/@unocss/astro@0.53.6(vite@4.4.4):
resolution: {integrity: sha512-RA0H8iujvMhH7ga6RWOzzdtNRP8qB++1eu7ffajJTktih6xYXh1I5lRR9uYajW2riShhtMQ7FXLRnlEIa1Vwog==}
dependencies:
'@unocss/core': 0.53.6
'@unocss/reset': 0.53.6
'@unocss/vite': 0.53.6(vite@4.4.4)
transitivePeerDependencies:
- rollup
- vite
dev: true
/@unocss/cli@0.53.6:
resolution: {integrity: sha512-igUdBRT2cNreuT/8LKJp+0D6Sj+NQADs2fj1auPrh9Z6lOk0Ot8mY2hnKzdszHUosoOgdGyy8pLiAtQ09TFtRA==}
engines: {node: '>=14'}
hasBin: true
dependencies:
'@ampproject/remapping': 2.2.1
'@rollup/pluginutils': 5.0.2(rollup@3.26.3)
'@unocss/config': 0.53.6
'@unocss/core': 0.53.6
'@unocss/preset-uno': 0.53.6
cac: 6.7.14
chokidar: 3.5.3
colorette: 2.0.20
consola: 3.2.3
fast-glob: 3.3.0
magic-string: 0.30.1
pathe: 1.1.1
perfect-debounce: 1.0.0
transitivePeerDependencies:
- rollup
dev: true
/@unocss/config@0.53.6:
resolution: {integrity: sha512-mlp1cb1lsVIfQ0WMoUBmdeTXc8FADQsQGC3cZkHMLdkrcdvp8e19YvkvA0rZxNcwLMWgr9l+uvyBLAl1Y/5Q3w==}
engines: {node: '>=14'}
dependencies:
'@unocss/core': 0.53.6
unconfig: 0.3.9
dev: true
/@unocss/core@0.53.6:
resolution: {integrity: sha512-wuaLjWCzKUisHUxo4pjIdzcimdSmVa2hMHA3V7wVFBiSFX96/s7l0bvhHGFF/gMjbOnvJ+y+lBl3VKqcj9kwbA==}
dev: true
/@unocss/extractor-arbitrary-variants@0.53.6:
resolution: {integrity: sha512-5MQD/9pIflZT5LXFx6qFUgPuVszFj+Pyq97UPI1YH4Lf4prDpfUtR4vKrXeMQv0XFvXqKluIWovgG9c6nrpg9w==}
dependencies:
'@unocss/core': 0.53.6
dev: true
/@unocss/inspector@0.53.6:
resolution: {integrity: sha512-y9Z6JRKmQU0SBPw115CcTpiAir9qccsPxke070no5Kutnnap/18JtOECEd1Vd5ZBj6HAW0OQuBG7gWm0X6K2IA==}
dependencies:
gzip-size: 6.0.0
sirv: 2.0.3
dev: true
/@unocss/postcss@0.53.6(postcss@8.4.26):
resolution: {integrity: sha512-/Xi1f32uWgvlGqW7YejV5gJQYOFKKHU3TxQSrqUHVtHmtG5ZS8Ow6ZIumcReWnazpI/grq0H0O/ZPrXsUvPcpg==}
engines: {node: '>=14'}
peerDependencies:
postcss: ^8.4.21
dependencies:
'@unocss/config': 0.53.6
'@unocss/core': 0.53.6
css-tree: 2.3.1
fast-glob: 3.3.0
magic-string: 0.30.1
postcss: 8.4.26
dev: true
/@unocss/preset-attributify@0.53.6:
resolution: {integrity: sha512-mjYQTFMbT9d/bghxh+O02u06YiOxZUSI+XsepwRt28LUSRtM/MjQm1v/7uvCfyNgA3cfIFUB3MxkIprWIShDZQ==}
dependencies:
'@unocss/core': 0.53.6
dev: true
/@unocss/preset-icons@0.53.6:
resolution: {integrity: sha512-UhP+7pQCCKxtv7x4jzHd9LnbLUDRLWLq7iyLAMxI9Bq7Qg/XYaygeFUk1RlYBb+um0CGvU3jAVuXzwwlX3WncQ==}
dependencies:
'@iconify/utils': 2.1.7
'@unocss/core': 0.53.6
ofetch: 1.1.1
transitivePeerDependencies:
- supports-color
dev: true
/@unocss/preset-mini@0.53.6:
resolution: {integrity: sha512-hUuA3Y6CSlja63EeLvRha3ftk1Xc/3YfZm8iqVk0eU0Wm/JUxejSSJs6EYB2wtOSyVJkf/kJRQtjB29bIQmYhQ==}
dependencies:
'@unocss/core': 0.53.6
'@unocss/extractor-arbitrary-variants': 0.53.6
dev: true
/@unocss/preset-tagify@0.53.6:
resolution: {integrity: sha512-RZUvXIaxJviu7CCbGIaizT08exMSaoCcmhLEotrY1vLcmgne6q6IMK9m4hCFlFuaidrFxPqLd1FjsDTSaNWQvw==}
dependencies:
'@unocss/core': 0.53.6
dev: true
/@unocss/preset-typography@0.53.6:
resolution: {integrity: sha512-JEnP9wDq+HckW4zObZosfKSCH93TB0h18fA9Dao2Sbr/DQ4/kt0gQfxqxhUlVgozqjlOGn/+vA/6HQrLF8JExQ==}
dependencies:
'@unocss/core': 0.53.6
'@unocss/preset-mini': 0.53.6
dev: true
/@unocss/preset-uno@0.53.6:
resolution: {integrity: sha512-e4EVxk1mhKthcmk3a1VkyULYNIvgSScoR/2zLL7OBIokOUVnx63fQHIPy9RbEf/LKap5ZNwZ8zB5zbAg3gaF2Q==}
dependencies:
'@unocss/core': 0.53.6
'@unocss/preset-mini': 0.53.6
'@unocss/preset-wind': 0.53.6
dev: true
/@unocss/preset-web-fonts@0.53.6:
resolution: {integrity: sha512-IWswKHaqD6A7baTQxdt01lkFKe7qDpt6OzRMRgrCF9fDV4gsD7mJdpQOGFE9HolDbEHJbxS2NObzXXZChI/u2w==}
dependencies:
'@unocss/core': 0.53.6
ofetch: 1.1.1
dev: true
/@unocss/preset-wind@0.53.6:
resolution: {integrity: sha512-f3/LskBGcouL9k/VEb+FHaapFFUEkQ3SjLesE0AMka5e6aKCefxtyje700cH2Sm/1RE+qdZLvrHpwLi05GVBlA==}
dependencies:
'@unocss/core': 0.53.6
'@unocss/preset-mini': 0.53.6
dev: true
/@unocss/reset@0.53.6:
resolution: {integrity: sha512-WtZU0Q5Y9CHzitYPJ+ZGPUssVuDnRakmHETQ2EuBJgWZhgsmTECrpb78+tnJdFVowuYYQyV0CP6a07uwkFNm6g==}
dev: true
/@unocss/scope@0.53.6:
resolution: {integrity: sha512-Wf5pRuRf85w8H4EuHRUnKOsAB4kLvScEQ0Y+MFSvnSuf0ig58Fdqda3jZ++rFCnMPF5vJIyl8Ay6y93M2R4puA==}
dev: true
/@unocss/transformer-attributify-jsx-babel@0.53.6:
resolution: {integrity: sha512-UjGQM/9C0y9qrcBqz7J60U9P6gIxkrKTtrnntciIhS71ejjbN+QpyiuLN1nFPaRtde803/ncqEjxrXvwIVkRNA==}
dependencies:
'@unocss/core': 0.53.6
dev: true
/@unocss/transformer-attributify-jsx@0.53.6:
resolution: {integrity: sha512-LMksixCVn+QYZMi22+6t1OeLrynTWOnrA0lPCXKceFj+kRggv9ZKhaAwVITqEDdHjublOYMrBb9J3PtX8j6A+A==}
dependencies:
'@unocss/core': 0.53.6
dev: true
/@unocss/transformer-compile-class@0.53.6:
resolution: {integrity: sha512-jR9ZGjU7cNturWifdCz9R0PABHs55NTOaWATmgeZVN/FWpvVFN6x2dQaNSEqRptQwpxDGQNw45JLL8qFKfXUqQ==}
dependencies:
'@unocss/core': 0.53.6
dev: true
/@unocss/transformer-directives@0.53.6:
resolution: {integrity: sha512-tgG7ZOyLFRWB980BthwcDzKqe44JCyDMWGRzPsmPmNKVHZ86tDHibJOJYDgFu25PlPtJTzQpc3OA8Lw2xCCGKA==}
dependencies:
'@unocss/core': 0.53.6
css-tree: 2.3.1
dev: true
/@unocss/transformer-variant-group@0.53.6:
resolution: {integrity: sha512-tGg1gR7MzPhAJridwXTkiZ6SHIjU28CD+FXQnwUn0Cyrg7WA5swC+IsrRMqeAq4wH5XVlMnM37Z5TE2p65YfBg==}
dependencies:
'@unocss/core': 0.53.6
dev: true
/@unocss/vite@0.53.6(vite@4.4.4):
resolution: {integrity: sha512-EfbtSqozWC8NVG0P+x02k6L77cEr0H/bfVtEtvwLIrzSyLoVU/Z+li248cB7v8ZSDQXYKJe9uiItx/GTc04A4g==}
peerDependencies:
vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0
dependencies:
'@ampproject/remapping': 2.2.1
'@rollup/pluginutils': 5.0.2(rollup@3.26.3)
'@unocss/config': 0.53.6
'@unocss/core': 0.53.6
'@unocss/inspector': 0.53.6
'@unocss/scope': 0.53.6
'@unocss/transformer-directives': 0.53.6
chokidar: 3.5.3
fast-glob: 3.3.0
magic-string: 0.30.1
vite: 4.4.4(@types/node@20.4.2)(less@3.13.1)(terser@5.19.1)
transitivePeerDependencies:
- rollup
dev: true
/@vitejs/plugin-legacy@4.1.0(terser@5.19.1)(vite@4.4.4):
resolution: {integrity: sha512-bLPHaKAKtPq40Cx2Hauz/VE39kStx7gUC21RM+0/OvBgiOlqrK3b1mIMUc4Cak1xLOrK99j174/7xczfu4OLHA==}
engines: {node: ^14.18.0 || >=16.0.0}
......@@ -2977,6 +3189,10 @@ packages:
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
dev: true
/colorette@2.0.20:
resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==}
dev: true
/combined-stream@1.0.8:
resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
engines: {node: '>= 0.8'}
......@@ -3006,6 +3222,11 @@ packages:
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
dev: true
/consola@3.2.3:
resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==}
engines: {node: ^14.18.0 || >=16.10.0}
dev: true
/convert-source-map@1.9.0:
resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==}
dev: true
......@@ -3071,6 +3292,14 @@ packages:
which: 2.0.2
dev: true
/css-tree@2.3.1:
resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==}
engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0}
dependencies:
mdn-data: 2.0.30
source-map-js: 1.0.2
dev: true
/csstype@3.1.2:
resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==}
......@@ -3149,6 +3378,10 @@ packages:
has-property-descriptors: 1.0.0
object-keys: 1.1.1
/defu@6.1.2:
resolution: {integrity: sha512-+uO4+qr7msjNNWKYPHqN/3+Dx3NFkmIzayk2L1MyZQlvgZb/J1A0fo410dpKrN2SnqFjt8n4JL8fDJE0wIgjFQ==}
dev: true
/delayed-stream@1.0.0:
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
engines: {node: '>=0.4.0'}
......@@ -3162,6 +3395,10 @@ packages:
resolution: {integrity: sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==}
dev: true
/destr@2.0.0:
resolution: {integrity: sha512-FJ9RDpf3GicEBvzI3jxc2XhHzbqD8p4ANw/1kPsFBfTvP1b7Gn/Lg1vO7R9J4IVgoMbyUmFrFGZafJ1hPZpvlg==}
dev: true
/dezalgo@1.0.4:
resolution: {integrity: sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==}
dependencies:
......@@ -3192,6 +3429,10 @@ packages:
resolution: {integrity: sha512-bvVTQe1lfaUr1oFzZX80ce9KLDlZ3iU+XGNE/bz9HnGdklTieqsbmsLHe+rT2XWqopvL0PckkYqN7ksmm5pe3w==}
dev: false
/duplexer@0.1.2:
resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==}
dev: true
/electron-to-chromium@1.4.466:
resolution: {integrity: sha512-TSkRvbXRXD8BwhcGlZXDsbI2lRoP8dvqR7LQnqQNk9KxXBc4tG8O+rTuXgTyIpEdiqSGKEBSqrxdqEntnjNncA==}
dev: true
......@@ -3298,6 +3539,21 @@ packages:
resolution: {integrity: sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg==}
dev: false
/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
/extend@3.0.2:
resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==}
dev: false
......@@ -3338,6 +3594,14 @@ packages:
to-regex-range: 5.0.1
dev: true
/find-up@5.0.0:
resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==}
engines: {node: '>=10'}
dependencies:
locate-path: 6.0.0
path-exists: 4.0.0
dev: true
/follow-redirects@1.15.2(debug@4.3.4):
resolution: {integrity: sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==}
engines: {node: '>=4.0'}
......@@ -3439,6 +3703,11 @@ packages:
has-proto: 1.0.1
has-symbols: 1.0.3
/get-stream@6.0.1:
resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==}
engines: {node: '>=10'}
dev: true
/glob-parent@5.1.2:
resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
engines: {node: '>= 6'}
......@@ -3472,6 +3741,13 @@ packages:
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
dev: true
/gzip-size@6.0.0:
resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==}
engines: {node: '>=10'}
dependencies:
duplexer: 0.1.2
dev: true
/has-bigints@1.0.2:
resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==}
dev: true
......@@ -3549,6 +3825,11 @@ packages:
engines: {node: '>= 0.4.0'}
dev: true
/human-signals@2.1.0:
resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==}
engines: {node: '>=10.17.0'}
dev: true
/iconv-lite@0.4.24:
resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==}
engines: {node: '>=0.10.0'}
......@@ -3716,6 +3997,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-string@1.0.7:
resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==}
engines: {node: '>= 0.4'}
......@@ -3804,6 +4090,11 @@ packages:
istanbul-lib-report: 3.0.0
dev: true
/jiti@1.19.1:
resolution: {integrity: sha512-oVhqoRDaBXf7sjkll95LHVS6Myyyb1zaunVwk4Z0+WPSW4gjS0pl01zYKHScTuyEhQsFxV5L4DR5r+YqSyqyyg==}
hasBin: true
dev: true
/js-tokens@4.0.0:
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
......@@ -3849,6 +4140,10 @@ packages:
tsscmp: 1.0.6
dev: true
/kolorist@1.8.0:
resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==}
dev: true
/less@3.13.1:
resolution: {integrity: sha512-SwA1aQXGUvp+P5XdZslUOhhLnClSLIjWvJhmd+Vgib5BFIr9lMNlQwmwUNOjXThF/A0x+MCYYPeWEfeWiLRnTw==}
engines: {node: '>=6'}
......@@ -3871,6 +4166,13 @@ packages:
engines: {node: '>=14'}
dev: true
/locate-path@6.0.0:
resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==}
engines: {node: '>=10'}
dependencies:
p-locate: 5.0.0
dev: true
/lodash.debounce@4.0.8:
resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==}
dev: true
......@@ -3943,11 +4245,19 @@ packages:
semver: 6.3.1
dev: true
/mdn-data@2.0.30:
resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==}
dev: true
/media-typer@0.3.0:
resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==}
engines: {node: '>= 0.6'}
dev: true
/merge-stream@2.0.0:
resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==}
dev: true
/merge2@1.4.1:
resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==}
engines: {node: '>= 8'}
......@@ -3979,6 +4289,11 @@ packages:
dev: true
optional: true
/mimic-fn@2.1.0:
resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==}
engines: {node: '>=6'}
dev: true
/minimatch@3.1.2:
resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==}
dependencies:
......@@ -4049,6 +4364,10 @@ packages:
lodash: 4.17.21
dev: false
/node-fetch-native@1.2.0:
resolution: {integrity: sha512-5IAMBTl9p6PaAjYCnMv5FmqIF6GcZnawAVnzaCG0rX2aYZJ4CxEkZNtVPuTRug7fL7wyM5BQYTlAzcyMPi6oTQ==}
dev: true
/node-fetch@2.6.12:
resolution: {integrity: sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==}
engines: {node: 4.x || >=6.0.0}
......@@ -4075,6 +4394,13 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
/npm-run-path@4.0.1:
resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==}
engines: {node: '>=8'}
dependencies:
path-key: 3.1.1
dev: true
/object-assign@4.1.1:
resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
engines: {node: '>=0.10.0'}
......@@ -4104,6 +4430,14 @@ packages:
object-keys: 1.1.1
dev: true
/ofetch@1.1.1:
resolution: {integrity: sha512-SSMoktrp9SNLi20BWfB/BnnKcL0RDigXThD/mZBeQxkIRv1xrd9183MtLdsqRYLYSqW0eTr5t8w8MqjNhvoOQQ==}
dependencies:
destr: 2.0.0
node-fetch-native: 1.2.0
ufo: 1.1.2
dev: true
/omit.js@1.0.2:
resolution: {integrity: sha512-/QPc6G2NS+8d4L/cQhbk6Yit1WTB6Us2g84A7A/1+w9d/eRGHyEqC5kkQtHVoHZ5NFWGG7tUGgrhVZwgZanKrQ==}
dependencies:
......@@ -4116,6 +4450,13 @@ packages:
wrappy: 1.0.2
dev: true
/onetime@5.1.2:
resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==}
engines: {node: '>=6'}
dependencies:
mimic-fn: 2.1.0
dev: true
/open@8.4.2:
resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==}
engines: {node: '>=12'}
......@@ -4129,6 +4470,13 @@ packages:
resolution: {integrity: sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==}
dev: true
/p-limit@3.1.0:
resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==}
engines: {node: '>=10'}
dependencies:
yocto-queue: 0.1.0
dev: true
/p-limit@4.0.0:
resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
......@@ -4136,6 +4484,13 @@ packages:
yocto-queue: 1.0.0
dev: true
/p-locate@5.0.0:
resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==}
engines: {node: '>=10'}
dependencies:
p-limit: 3.1.0
dev: true
/parchment@1.1.4:
resolution: {integrity: sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg==}
dev: false
......@@ -4145,6 +4500,11 @@ packages:
engines: {node: '>=6'}
dev: true
/path-exists@4.0.0:
resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==}
engines: {node: '>=8'}
dev: true
/path-is-absolute@1.0.1:
resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==}
engines: {node: '>=0.10.0'}
......@@ -4171,6 +4531,10 @@ packages:
resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==}
dev: true
/perfect-debounce@1.0.0:
resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==}
dev: true
/performance-now@2.1.0:
resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==}
dev: false
......@@ -4514,6 +4878,10 @@ packages:
resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==}
dev: true
/signal-exit@3.0.7:
resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
dev: true
/sirv@2.0.3:
resolution: {integrity: sha512-O9jm9BsID1P+0HOi81VpXPoDxYP374pkOLzACAoyUQ/3OUVndNpsz6wMnY2z+yOxzbllCKZrM+9QrWsv4THnyA==}
engines: {node: '>= 10'}
......@@ -4594,6 +4962,11 @@ packages:
ansi-regex: 5.0.1
dev: true
/strip-final-newline@2.0.0:
resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==}
engines: {node: '>=6'}
dev: true
/strip-literal@1.0.1:
resolution: {integrity: sha512-QZTsipNpa2Ppr6v1AmJHESqJ3Uz247MUS0OjrnnZjFAvEoWqxuyFuXn2xLgMtRnijJShAa1HL0gtJyUs7u7n3Q==}
dependencies:
......@@ -4730,6 +5103,14 @@ packages:
resolution: {integrity: sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==}
dev: true
/unconfig@0.3.9:
resolution: {integrity: sha512-8yhetFd48M641mxrkWA+C/lZU4N0rCOdlo3dFsyFPnBHBjMJfjT/3eAZBRT2RxCRqeBMAKBVgikejdS6yeBjMw==}
dependencies:
'@antfu/utils': 0.7.5
defu: 6.1.2
jiti: 1.19.1
dev: true
/unhead@1.1.32:
resolution: {integrity: sha512-WO1NTmljMZZzZjzmkcgZpYKpbEGGB3HC+2DIJxAZd0++WCPT9jD6o0MIgpA71UvueOCqLhIlyfGsa9Hgn0Gnog==}
dependencies:
......@@ -4789,6 +5170,42 @@ packages:
engines: {node: '>= 10.0.0'}
dev: true
/unocss@0.53.6(postcss@8.4.26)(vite@4.4.4):
resolution: {integrity: sha512-yZeSaa3ulfDyU7WaOeN5AZN/ciopY+f9GPuME4hgzxZmUnCSJmuwBW+5UHud2BSRKdem+mLIpBzNXTOsDP8gFA==}
engines: {node: '>=14'}
peerDependencies:
'@unocss/webpack': 0.53.6
peerDependenciesMeta:
'@unocss/webpack':
optional: true
dependencies:
'@unocss/astro': 0.53.6(vite@4.4.4)
'@unocss/cli': 0.53.6
'@unocss/core': 0.53.6
'@unocss/extractor-arbitrary-variants': 0.53.6
'@unocss/postcss': 0.53.6(postcss@8.4.26)
'@unocss/preset-attributify': 0.53.6
'@unocss/preset-icons': 0.53.6
'@unocss/preset-mini': 0.53.6
'@unocss/preset-tagify': 0.53.6
'@unocss/preset-typography': 0.53.6
'@unocss/preset-uno': 0.53.6
'@unocss/preset-web-fonts': 0.53.6
'@unocss/preset-wind': 0.53.6
'@unocss/reset': 0.53.6
'@unocss/transformer-attributify-jsx': 0.53.6
'@unocss/transformer-attributify-jsx-babel': 0.53.6
'@unocss/transformer-compile-class': 0.53.6
'@unocss/transformer-directives': 0.53.6
'@unocss/transformer-variant-group': 0.53.6
'@unocss/vite': 0.53.6(vite@4.4.4)
transitivePeerDependencies:
- postcss
- rollup
- supports-color
- vite
dev: true
/unpipe@1.0.0:
resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==}
engines: {node: '>= 0.8'}
......@@ -5435,6 +5852,11 @@ packages:
yargs-parser: 21.1.1
dev: true
/yocto-queue@0.1.0:
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
engines: {node: '>=10'}
dev: true
/yocto-queue@1.0.0:
resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==}
engines: {node: '>=12.20'}
......
......@@ -3,7 +3,6 @@
<div>
<router-view />
<TheLock v-if="configStore.isLock" />
<TheModal />
<TheMagnifierDialogVue />
</div>
</a-config-provider>
......@@ -13,7 +12,6 @@
import zhCN from 'ant-design-vue/lib/locale/zh_CN'
import TheLock from '@/components/TheLock'
import TheMagnifierDialogVue from '@/components/Magnifier/magnifierDialog.vue'
import TheModal from '@/components/TheModal/index.vue'
import { useConfigStore } from '@/store/modules'
const configStore = useConfigStore()
......
<template>
<div>
<a-modal :title="title" :visible="visible" @ok="handleOk" @cancel="handleCancel">
<p>{{ message }}</p>
</a-modal>
</div>
</template>
<script>
export default {
name: 'TheModal',
data() {
return {
title: 'title',
visible: false,
message: '内容',
handleOk: () => {}
}
},
methods: {
handleCancel() {
this.visible = false
}
},
created() {
this.$bus.$on('openModel', ({ title, message, ok }) => {
this.visible = true
this.title = title || ''
this.message = message || ''
this.handleOk = ok
? () => {
ok()
this.handleCancel()
}
: () => {
this.handleCancel()
}
})
},
mounted() {}
}
</script>
<style lang="less" scoped>
/deep/.ant-modal {
top: calc(50% - 100px);
max-height: 200px;
}
/deep/.ant-modal-body {
padding: 12px;
& > p {
max-height: 80px;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
margin: unset;
text-align: center;
}
}
</style>
......@@ -106,11 +106,11 @@ export default {
this.$message.error('系统开始接入时间不能大于系统关闭接入时间', 5)
return
}
if (firstHour == sedHour && firstMin > sedMin) {
if (firstHour === sedHour && firstMin > sedMin) {
this.$message.error('系统开始接入时间不能大于系统关闭接入时间', 5)
return
}
if (firstHour == sedHour && firstMin == sedMin && firstSeconds > sedSeconds) {
if (firstHour === sedHour && firstMin === sedMin && firstSeconds > sedSeconds) {
this.$message.error('系统开始接入时间不能大于系统关闭接入时间', 5)
return
}
......
......@@ -42,10 +42,10 @@ export default {
methods: {
closeItem() {
let menuList = this.menuStore.visitedMenu
if (menuList[this.menuIndex].name == 'home') {
if (menuList[this.menuIndex].name === 'home') {
return
}
if (this.menuStore.selectedMenu == menuList[this.menuIndex].name) {
if (this.menuStore.selectedMenu === menuList[this.menuIndex].name) {
this.$router.push(menuList[this.menuIndex - 1].path)
}
this.menuStore.removeVisitedMenu('index', this.menuIndex)
......@@ -59,7 +59,7 @@ export default {
},
closeRight() {
let menuList = this.menuStore.visitedMenu
if (this.menuIndex == menuList.length - 1) {
if (this.menuIndex === menuList.length - 1) {
return
}
if (this.$route.name !== menuList[this.menuIndex].name) {
......
<template>
<div>
<ul class="tabBox">
<li v-for="(menu, index) in menuList" :key="index">
<li v-for="(menu, index) in menuStore.visitedMenu" :key="index">
<span
:class="{ active: selectedMenu == menu.name }"
@contextmenu.prevent="showCloseMenu(index, menuList, $event)"
:class="{ active: selectedMenu === menu.name }"
@contextmenu.prevent="showCloseMenu(index, menuStore.visitedMenu, $event)"
>
<i @click="goPath(menu)">
{{ menu.meta.title }}
......@@ -27,7 +27,6 @@ import Close from './Close.vue'
const router = useRouter()
const menuStore = useMenuStore()
let menuList = ref(menuStore.visitedMenu)
let left = ref('')
let menuIndex = ref('')
......@@ -41,8 +40,8 @@ function goPath(menu) {
router.push(menu.path)
}
function closeMenu(index) {
if (menuStore.selectedMenu == menuList.value[index].name) {
router.push(menuList.value[index - 1].path)
if (menuStore.selectedMenu === menuStore.visitedMenu[index].name) {
router.push(menuStore.visitedMenu[index - 1].path)
}
menuStore.removeVisitedMenu('index', index)
}
......
......@@ -42,7 +42,7 @@ export const TheMenu = defineComponent({
return (
<a-menu-item
key={item.name}
class={menuStore.selectedMenu == item.name ? `${prefixCls}-selected` : ''}
class={menuStore.selectedMenu === item.name ? `${prefixCls}-selected` : ''}
>
<MenuLink item={item} />
</a-menu-item>
......@@ -82,7 +82,9 @@ const SubMenu = defineComponent({
return <SubMenu key={item.name} item={item} />
}
return (
<a-menu-item class={menuStore.selectedMenu == item.name ? `${prefixCls}-selected` : ''}>
<a-menu-item
class={menuStore.selectedMenu === item.name ? `${prefixCls}-selected` : ''}
>
<MenuLink item={item} />
</a-menu-item>
)
......
<template>
<div class="Notify">
<ul v-if="type == '1'">
<ul v-if="type === '1'">
<li v-for="(li, index) in list" :key="index">
<div class="left">
<!-- <img :src="li.userPic" alt="" /> -->
<span v-if="li.noticeType == 0">
<img src="../../../assets/img/systemIcon.png" alt="" />
<span v-if="li.noticeType === 0">
<img src="@/assets/img/systemIcon.png" alt="" />
</span>
<svg
v-else
......@@ -120,26 +120,26 @@
</div>
</li>
</ul>
<ul v-if="type == '2'">
<ul v-if="type === '2'">
<li v-for="(li, index) in list" :key="index">
<div class="left">
<img :src="getUrl(li.type)" alt="" />
</div>
<div class="right">
<h6 v-if="li.isFinish == true">{{ li.title }}</h6>
<h6 v-if="li.isFinish === true">{{ li.title }}</h6>
<h6 v-else>
<del> {{ li.title }}</del>
</h6>
<div class="time">
<span v-if="li.isFinish == true">{{ li.datetime }}</span>
<span v-if="li.isFinish === true">{{ li.datetime }}</span>
<del v-else>{{ li.datetime }}</del>
<span @click.stop="goDetail(li, index)"> 详情 </span>
</div>
</div>
</li>
</ul>
<ul v-if="type == '3'" class="waitDone">
<ul v-if="type === '3'" class="waitDone">
<li v-for="(li, index) in list" :key="index">
<div class="right">
<div class="title" style="display: flex; justify-content: space-between">
......@@ -248,10 +248,6 @@ export default {
text-overflow: ellipsis;
// 只要超过宽度就换行,不论中文还是英文
word-break: break-all;
//最多展示两行
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
//根据样式设置
line-height: 1.2em;
max-height: 2.4em;
......@@ -287,13 +283,7 @@ export default {
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
// 只要超过宽度就换行,不论中文还是英文
word-break: break-all;
//最多展示两行
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
//根据样式设置
line-height: 1.2em;
max-height: 2.4em;
}
......
......@@ -10,6 +10,7 @@ import { createHead, HeadVuePlugin } from '@vueuse/head'
import router from './router'
import './directives'
import { useAppStore } from '@/store/modules'
import 'virtual:uno.css'
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'
......@@ -19,7 +20,6 @@ import Step from '@/components/Step'
import magnifier from '@/components/Magnifier/magnifier.vue'
import { post } from '@/utils/remote/remote'
import api from '@/utils/remote'
import queryEnum from '@/utils/remote/queryEnum'
import dayjs from 'dayjs'
dayjs.locale('zh-cn')
......@@ -34,11 +34,9 @@ Vue.component('magnifier', magnifier)
// ********** 方法 **********
const bus = new Vue()
Vue.prototype.$bus = bus // 事件总线
Vue.prototype.$Modal = (data: any) => bus.$emit('openModel', data)
Vue.prototype.$moment = moment
Vue.prototype.$remote = post
Vue.prototype.$api = api
Vue.prototype.$queryEnum = queryEnum
Vue.prototype.$getTableFiled = (table: string, filed: string, index: string) =>
table + '[' + index + ']' + '.' + filed
// ********** 插件 **********
......
......@@ -5,17 +5,21 @@ import { postQueryMenu } from '@/apis'
import { useMenuStore, useConfigStore } from '@/store/modules'
export const useAppStore = defineStore('app', () => {
const userId = ref(localStorage.getItem('userId'))
const route = location.hash.slice(1)
const userId = localStorage.getItem('userId')
const loading = ref(true)
const menuStore = useMenuStore()
const configStore = useConfigStore()
if (!userId.value) {
if (!userId) {
location.hash = '#/login'
}
router.addRoutes(setupLayouts(generatedRoutes))
let authRoutes: string[] = [] // 权限路由
let currentMenu: any // 当前路由菜单
// 递归转换菜单
function transformToMenu(item: Menu[]): any[] {
return item.map((i) => {
let obj = {
......@@ -26,7 +30,12 @@ export const useAppStore = defineStore('app', () => {
}
}
if (i.type === 'menu') {
return { ...obj, path: i.path }
authRoutes.push(i.path!)
const menu = { ...obj, path: i.path }
if (i.path === route) {
currentMenu = menu
}
return menu
}
return {
...obj,
......@@ -35,15 +44,34 @@ export const useAppStore = defineStore('app', () => {
})
}
function setMenu(data: any[]) {
const menu = transformToMenu(data)
menuStore.setMenu(menu)
console.log(menu)
}
function setRoutes() {
const routes = generatedRoutes.filter((r) => authRoutes.includes(r.path))
router.addRoutes(setupLayouts(routes))
}
function setState() {
if (currentMenu) {
menuStore.setSelectedMenu(currentMenu.name)
}
}
postQueryMenu().then((r) => {
if (r.data) {
const menu = transformToMenu(r.data)
menuStore.setMenu(menu)
setMenu(r.data)
setRoutes()
setState()
loading.value = false
}
})
function logout() {
menuStore.clear()
configStore.clear()
localStorage.removeItem('userId')
location.hash = '#/login'
......
export const useMenuStore = defineStore('menu', {
state: () => ({
menuRoute: [] as any[],
menu: [] as any[],
selectedMenu: '',
openedMenu: [] as string[],
visitedMenu: [] as any[]
visitedMenu: [
{
name: 'Home',
path: '/home',
meta: {
title: '首页',
icon: 'material-symbols:home'
}
}
] as any[]
}),
actions: {
setMenuRoute(menuRoute: any[]) {
this.menuRoute = menuRoute
},
setMenu(menu: any[]): void {
this.menu = menu
},
......@@ -20,7 +25,7 @@ export const useMenuStore = defineStore('menu', {
this.openedMenu = menu
},
addVisitedMenu(menu: any): void {
if (menu.meta.title && !this.visitedMenu.some((item) => item?.name === this.selectedMenu)) {
if (menu.meta.title && !this.visitedMenu.some((item) => item?.name === menu.name)) {
this.visitedMenu.push(menu)
}
},
......@@ -41,7 +46,9 @@ export const useMenuStore = defineStore('menu', {
}
},
clear() {
localStorage.removeItem('menu')
this.selectedMenu = ''
this.openedMenu = []
this.visitedMenu = []
}
}
})
import { post } from '@/utils/remote'
export default function queryEnum(params) {
return post('/sso/resource/getOptions', params, undefined, undefined, {
headers: {
'Content-Type': 'application/json;'
}
})
}
<template>
<div>
<h1>首页</h1>
<div class="w-100 h-25 bg-violet">
<h1 class="text-3xl font-bold underline">Hello world!</h1>
</div>
</template>
......
<template>
<div class="w-24 h-24 bg-slate-100">
<h1>1001</h1>
</div>
</template>
<script setup lang="ts"></script>
<script>
export default {
name: '1001',
data() {
return {}
},
methods: {},
created() {},
mounted() {}
}
</script>
<style scoped lang="less"></style>
......@@ -12,6 +12,7 @@ import antdvFix from 'vite-plugin-antdv-fix'
import mockDevServerPlugin from 'vite-plugin-mock-dev-server'
import Pages from 'vite-plugin-pages'
import Layouts from 'vite-plugin-vue-layouts'
import UnoCSS from 'unocss/vite'
import postcssImport from 'postcss-import'
import autoprefixer from 'autoprefixer'
......@@ -83,6 +84,7 @@ export default defineConfig(({ mode }) => {
components({
dirs: ['src/components']
}),
UnoCSS(),
antdvFix(),
Pages({
dirs: 'src/views',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment