Compare commits
	
		
			557 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 0a47fc264b | ||
|  | edf43cdc25 | ||
|  | 5bd177dec6 | ||
|  | 223c0bbbdb | ||
|  | 3a916b1c4d | ||
|  | ec4b5f3928 | ||
|  | d149668dbd | ||
|  | 7c1b8dc968 | ||
|  | 1ea4817f6a | ||
|  | ecbb96f3a5 | ||
|  | 296a2d2f0e | ||
|  | 8c1ef4b0fd | ||
|  | 04d3330463 | ||
|  | 9e115daeb9 | ||
|  | 3eaf05bd4d | ||
|  | a195980547 | ||
|  | f04a929856 | ||
|  | 5b8af29496 | ||
|  | 766369f911 | ||
|  | f6c6dbd312 | ||
|  | 783648f516 | ||
|  | ead48f4502 | ||
|  | 305d95672a | ||
|  | 8a792c7d63 | ||
|  | 93ed5ad085 | ||
|  | 41f23386b2 | ||
|  | c91644b829 | ||
|  | 073fd16bd7 | ||
|  | f92ee770e0 | ||
|  | 1e6d52357e | ||
|  | 751ded44f3 | ||
|  | 8567f3e34e | ||
|  | 83f2514403 | ||
|  | ad6ac7222c | ||
|  | 3ae1952624 | ||
|  | 3db549af40 | ||
|  | 94179ae552 | ||
|  | 7f35e87ed8 | ||
|  | 00da0009ef | ||
|  | cffc30afa3 | ||
|  | 24cf1d9284 | ||
|  | 9296e6987d | ||
|  | 809fa85706 | ||
|  | b3ae7605d3 | ||
|  | 864ec4737d | ||
|  | 854d0bcf20 | ||
|  | 458e387b68 | ||
|  | 56c770c49d | ||
|  | 946447394d | ||
|  | 44ba3273cb | ||
|  | 0f7b9d5e2b | ||
|  | 8a3f66db7b | ||
|  | 0eaa327d47 | ||
|  | 08e0cf5ad5 | ||
|  | d7aea9d11c | ||
|  | 135ce77288 | ||
|  | 19141a73d2 | ||
|  | 9d1051b0bd | ||
|  | c46a5920e5 | ||
|  | 43ac23f113 | ||
|  | 13f6cd8ef4 | ||
|  | 0e6d289128 | ||
|  | bba68bff29 | ||
|  | 6e0cce4d49 | ||
|  | d3ebe95076 | ||
|  | cbda4a38a3 | ||
|  | 3318041b92 | ||
|  | af53ec7625 | ||
|  | de2829fde7 | ||
|  | c1bee4046c | ||
|  | 473095b01b | ||
|  | e6abf93457 | ||
|  | 882f281482 | ||
|  | 0b2f68ac04 | ||
|  | 2ca2b766f8 | ||
|  | da611fb10b | ||
|  | eb8e49e23c | ||
|  | 0907d38c06 | ||
|  | 2a9b725c6a | ||
|  | 8f24a94ed3 | ||
|  | 4eefc95baa | ||
|  | 1681c34a52 | ||
|  | 47ab0184b7 | ||
|  | 58591f660a | ||
|  | 3c7e1cf442 | ||
|  | 055d4cce33 | ||
|  | a3dfe61a7b | ||
|  | f9d47c081f | ||
|  | ff5bf62989 | ||
|  | 1f6d079644 | ||
|  | 5c085a1986 | ||
|  | 9a23817473 | ||
|  | 56ea8937f6 | ||
|  | 4f51263501 | ||
|  | bb2eab60f4 | ||
|  | 44e4c04811 | ||
|  | b5839eab26 | ||
|  | 780ac75bf6 | ||
|  | a252138594 | ||
|  | 270a055072 | ||
|  | 08e194efe9 | ||
|  | 5f6caab338 | ||
|  | 5aaa318142 | ||
|  | cebbef680f | ||
|  | 0abde46ef4 | ||
|  | f2b518ed26 | ||
|  | c6207f35e1 | ||
|  | ee8fa04814 | ||
|  | 7b746fa053 | ||
|  | b7fea53107 | ||
|  | f89f3e6a38 | ||
|  | a0da2f6e16 | ||
|  | 3b5380e0d1 | ||
|  | 35276bfe41 | ||
|  | 215c1ecbd9 | ||
|  | 1698b21d7a | ||
|  | ca1e66be47 | ||
|  | 22bf2823e8 | ||
|  | 32e98f1b3a | ||
|  | c1c4335ce7 | ||
|  | 6c50662280 | ||
|  | f3a1707b94 | ||
|  | 6ea755f2a8 | ||
|  | a989b44a15 | ||
|  | 40f8587fd6 | ||
|  | 9f5638f16d | ||
|  | 9b19f96ff6 | ||
|  | 15da557892 | ||
|  | 2d23c9a2e6 | ||
|  | ab49afd3db | ||
|  | 86a370fd69 | ||
|  | 36fc74ce07 | ||
|  | 8da8843fd0 | ||
|  | f68285fbe5 | ||
|  | 85b8ef8f88 | ||
|  | 3d48aa8bbe | ||
|  | a765da6e28 | ||
|  | c57640acd0 | ||
|  | c264216053 | ||
|  | 9d3c732993 | ||
|  | 34f023c4b1 | ||
|  | 5a4f842774 | ||
|  | bae1767141 | ||
|  | 5957833a4f | ||
|  | 397092c21f | ||
|  | f309003e67 | ||
|  | eaf3678758 | ||
|  | f2e82da7c8 | ||
|  | 211ae1f905 | ||
|  | db629593c6 | ||
|  | 80d58cce2b | ||
|  | a0f55aca69 | ||
|  | d203a3586c | ||
|  | f74a6424d0 | ||
|  | 209ef3d890 | ||
|  | b549b32cbb | ||
|  | 54e2cb51cf | ||
|  | 42e6de395f | ||
|  | c0066b22b0 | ||
|  | aaef0bec27 | ||
|  | 912c3531c5 | ||
|  | 488e6e3204 | ||
|  | f73e3f648d | ||
|  | 36e5feac98 | ||
|  | cc13fcc8aa | ||
|  | 7f748f2a61 | ||
|  | 4a6fec8af0 | ||
|  | e2b320ad27 | ||
|  | 21d5214247 | ||
|  | 44b544745d | ||
|  | 5499a559c8 | ||
|  | ebe2c56348 | ||
|  | 8debfe7e95 | ||
|  | 1ef1b6bda9 | ||
|  | fb46d7ec7c | ||
|  | cea600f12c | ||
|  | bf2f617255 | ||
|  | cf8c7cb258 | ||
|  | 4e87f0b665 | ||
|  | d8baba586b | ||
|  | 3cff2eb4ce | ||
|  | f355a698ad | ||
|  | c3d0b74c75 | ||
|  | b0f98e4bfa | ||
|  | 506ffb8adf | ||
|  | e1afc10b80 | ||
|  | 960b436c79 | ||
|  | 6059891556 | ||
|  | 3503dff663 | ||
|  | 61998886ac | ||
|  | 608d7fb34d | ||
|  | 6bb6d9f71e | ||
|  | 918894147a | ||
|  | 0b5afda287 | ||
|  | a8a6ed97b9 | ||
|  | 919376b77c | ||
|  | 7e505f9b96 | ||
|  | de517be613 | ||
|  | bd5dd2cf28 | ||
|  | da521b35e6 | ||
|  | 34ffd9c1f3 | ||
|  | 3131e00f0f | ||
|  | f71812d622 | ||
|  | 0c12665fda | ||
|  | 458b7adb29 | ||
|  | 264da00e5d | ||
|  | 0882c25034 | ||
|  | a3562d9212 | ||
|  | b08c389e4a | ||
|  | 91bc1519f1 | ||
|  | 58b27c9693 | ||
|  | 25daa23606 | ||
|  | 9110d87580 | ||
|  | c097b5681d | ||
|  | beb705f8a9 | ||
|  | fd9488673c | ||
|  | 70aeefea02 | ||
|  | 1b3d2a6168 | ||
|  | fcb7ad965d | ||
|  | 828a2f5b60 | ||
|  | be6d431485 | ||
|  | 61a43b8efd | ||
|  | e3a9c77fd1 | ||
|  | e772ff05fb | ||
|  | d064f6285a | ||
|  | 091ca1a4fe | ||
|  | 9cec6a31a5 | ||
|  | bb8af263e1 | ||
|  | 7211a17a81 | ||
|  | 810398abb8 | ||
|  | f2b580fc06 | ||
|  | 3bd8858121 | ||
|  | 5efd1dbec4 | ||
|  | 971915948b | ||
|  | a9a37036d5 | ||
|  | 7a58035514 | ||
|  | 57bfe27819 | ||
|  | fcc65c3751 | ||
|  | f2d8dfc3ef | ||
|  | b5c570adf5 | ||
|  | 94098d02e8 | ||
|  | 436b15f010 | ||
|  | 0282feb173 | ||
|  | 8456750901 | ||
|  | 1a02cab97c | ||
|  | 1bdd81a1d8 | ||
|  | a9d58f88aa | ||
|  | 6a344ff2c7 | ||
|  | cc00c8f03a | ||
|  | c7b6a3fbec | ||
|  | 40c1e13b50 | ||
|  | 288d586dbc | ||
|  | 7d69992694 | ||
|  | 6c14bfe6a9 | ||
|  | 6773659e89 | ||
|  | 9455ad9a4f | ||
|  | 428d41b485 | ||
|  | 74772a1f03 | ||
|  | 1f3e6e4fac | ||
|  | 41b3bcb445 | ||
|  | 8e801dd790 | ||
|  | d6b1530720 | ||
|  | b632b7ffed | ||
|  | 1b45b71f20 | ||
|  | 149d22a4a4 | ||
|  | 83a2e01070 | ||
|  | 11d615f807 | ||
|  | 853745587d | ||
|  | f29108aa14 | ||
|  | abd02d1990 | ||
|  | 65ac69ef71 | ||
|  | 8998581b99 | ||
|  | 468b4bb0e1 | ||
|  | 88e535f63c | ||
|  | 13d0c4153a | ||
|  | 331b14e74d | ||
|  | c29b887eb2 | ||
|  | 8a1ec938e7 | ||
|  | c045e3fe4e | ||
|  | 811f820644 | ||
|  | fe8cab3d1c | ||
|  | 78efd7793a | ||
|  | 82c4b09b94 | ||
|  | a539112a0f | ||
|  | 22c05674f8 | ||
|  | 7dd7c71d01 | ||
|  | 22c90257de | ||
|  | 3d03d6ddb5 | ||
|  | 6fbde1eb57 | ||
|  | 0ee16e0228 | ||
|  | af74046124 | ||
|  | d823ee5684 | ||
|  | f7ca2782b0 | ||
|  | af8c133914 | ||
|  | 21b6fb697e | ||
|  | 3e0cc8c2c1 | ||
|  | 3540b75557 | ||
|  | 73ce53a388 | ||
|  | f408ea017c | ||
|  | c5ba63182e | ||
|  | 07325a4236 | ||
|  | 7240be8495 | ||
|  | 71a753f323 | ||
|  | 639c4458be | ||
|  | 1ad92a2d1b | ||
|  | 49f95c4e45 | ||
|  | 44ab07779e | ||
|  | 40ecc320a5 | ||
|  | 695ec7e50d | ||
|  | 85901d2d5e | ||
|  | 97e2ffddf4 | ||
|  | 907cf44cc1 | ||
|  | d9324f07b5 | ||
|  | d7f5bf3373 | ||
|  | 36f06bc899 | ||
|  | 182dac0d2e | ||
|  | f4d37cf7f0 | ||
|  | 16dce9a4ce | ||
|  | 0f0cd0b759 | ||
|  | 472f93bfc1 | ||
|  | 77572855c3 | ||
|  | 19942625d5 | ||
|  | dbd676095b | ||
|  | ed9cd6ce39 | ||
|  | ee434b465a | ||
|  | 2aba58c973 | ||
|  | 2c56233155 | ||
|  | 8d11a6affc | ||
|  | f6b61418e5 | ||
|  | 7f9c98ab8d | ||
|  | 02992dc02d | ||
|  | b32bca4984 | ||
|  | c37d0ac788 | ||
|  | 35aeedf320 | ||
|  | 94ff787053 | ||
|  | d0823b030b | ||
|  | 2d722db243 | ||
|  | 6143605297 | ||
|  | e2d6554313 | ||
|  | 872bb84502 | ||
|  | ee7eb3ac0d | ||
|  | dd1132482e | ||
|  | c33b5ebfef | ||
|  | 711a4ae34f | ||
|  | d9cfeabb47 | ||
|  | 296b154be5 | ||
|  | cec0f25c6b | ||
|  | b18c49e9d2 | ||
|  | f64bc91ce2 | ||
|  | b60db89801 | ||
|  | da407b6653 | ||
|  | 6a9a362caa | ||
|  | aa2f78a86f | ||
|  | a444731e9e | ||
|  | 1523c7b075 | ||
|  | 896e6f2eac | ||
|  | 8dcfbb29f9 | ||
|  | 750000ec66 | ||
|  | a792bb5cb3 | ||
|  | 973ab14442 | ||
|  | 3fe4e92f4a | ||
|  | 9ce58073dd | ||
|  | e2727e6fa1 | ||
|  | 73fa3d14c5 | ||
|  | ea1a336535 | ||
|  | 69e39c142e | ||
|  | 718c36263e | ||
|  | 5c1b086cb4 | ||
|  | 414ccbe360 | ||
|  | 41147b34fa | ||
|  | 894b0f1c18 | ||
|  | d214bb2f2a | ||
|  | 9518372fe0 | ||
|  | afa0134fdd | ||
|  | c6ed9b1558 | ||
|  | 0523f08382 | ||
|  | 8237adb9c0 | ||
|  | 65c21812bb | ||
|  | c3c975ee11 | ||
|  | 833018a831 | ||
|  | 3eb7f6f593 | ||
|  | efcfa576d5 | ||
|  | 487213b648 | ||
|  | 4ee0d94f1b | ||
|  | 5fa822f4d4 | ||
|  | 8e6e787543 | ||
|  | 9917b5e53c | ||
|  | 8f3e855f41 | ||
|  | 808051b29d | ||
|  | 906aed5e75 | ||
|  | 2d64a2e57c | ||
|  | 0c70a9e083 | ||
|  | 08d83ecbea | ||
|  | 4122685803 | ||
|  | 434ab1c560 | ||
|  | ae99e57c52 | ||
|  | e3c4a6ece6 | ||
|  | c8717c25b8 | ||
|  | e9656c6e76 | ||
|  | fd78791229 | ||
|  | de09f82586 | ||
|  | c7762490de | ||
|  | 4558c24d1c | ||
|  | d9ac7e4de0 | ||
|  | 6a5a357f50 | ||
|  | 44b022aefd | ||
|  | 0a46ea0844 | ||
|  | 39854a492b | ||
|  | 4c2f535a9b | ||
|  | be45d83766 | ||
|  | d28b9039bb | ||
|  | 8f6d6ce3cb | ||
|  | 07baac7cf8 | ||
|  | 7487ab79b3 | ||
|  | a70e4161be | ||
|  | 095c432363 | ||
|  | 028096e53f | ||
|  | 44ab55d594 | ||
|  | 4b80a66114 | ||
|  | cc0bb088ec | ||
|  | 3e4f9e2824 | ||
|  | ebd16a4d1a | ||
|  | 84cb07baec | ||
|  | 0811ffa5ae | ||
|  | 3f822a7d76 | ||
|  | a1c7e10574 | ||
|  | 50d7ccd82d | ||
|  | e0233061d3 | ||
|  | a0c405dadd | ||
|  | 60f912508b | ||
|  | 3590b65e22 | ||
|  | 92b8406444 | ||
|  | e7ad08685e | ||
|  | 14c145eef1 | ||
|  | 518f7eed28 | ||
|  | 21e63998d0 | ||
|  | 38ee2a62cd | ||
|  | 716528206e | ||
|  | b81143e55e | ||
|  | 0243b27505 | ||
|  | 909c12d3c6 | ||
|  | 01d0bcbfd0 | ||
|  | ba07b695dd | ||
|  | 3d8befa376 | ||
|  | 97c92626cc | ||
|  | 55ddc9cab0 | ||
|  | 401f0c748d | ||
|  | d5c751153c | ||
|  | 69d51318ff | ||
|  | de5fb84215 | ||
|  | c275f2632c | ||
|  | e899914426 | ||
|  | 861c8b9852 | ||
|  | a782461453 | ||
|  | e8488e4d52 | ||
|  | 889c859865 | ||
|  | 3c8dd772f8 | ||
|  | 251b5b9664 | ||
|  | 41e46a5d80 | ||
|  | 5c75e9d958 | ||
|  | 7f4350aeb6 | ||
|  | 807448aec5 | ||
|  | b9c5c34979 | ||
|  | 20347b7d65 | ||
|  | dbeb595c0b | ||
|  | c9d3e5a3fd | ||
|  | 5e276421ad | ||
|  | 219f87f467 | ||
|  | b35ed8960d | ||
|  | 24010d05fb | ||
|  | ec0776e268 | ||
|  | cecce83bc3 | ||
|  | 4eb46ea3dd | ||
|  | e8b534b84e | ||
|  | 46e1ae7825 | ||
|  | 60a55a776e | ||
|  | bed4292ed3 | ||
|  | 6bed9ead38 | ||
|  | 3fb13ca9e7 | ||
|  | 2d6d179d66 | ||
|  | eebb753884 | ||
|  | bb1bbf2724 | ||
|  | df56abe18d | ||
|  | ca2dfa6185 | ||
|  | bbfdcc8276 | ||
|  | 1715504789 | ||
|  | 9a90f18e77 | ||
|  | 21645537d5 | ||
|  | e6c26fcb4a | ||
|  | 20911dd882 | ||
|  | cd7ca8f4c7 | ||
|  | ca707a456b | ||
|  | d0522ce514 | ||
|  | f83c7b59b8 | ||
|  | f5a043b11a | ||
|  | 094dca961f | ||
|  | 8191490f39 | ||
|  | 75de2b0604 | ||
|  | 4093dcd6dc | ||
|  | d00643c9f5 | ||
|  | b8db2116df | ||
|  | a0dfa3d30d | ||
|  | 4e31abd446 | ||
|  | f42ee9dbe5 | ||
|  | f5c56c355c | ||
|  | a1a57a185c | ||
|  | b298af1ddb | ||
|  | 43d685ccd3 | ||
|  | 72d7dcfa5e | ||
|  | 1e2fdda090 | ||
|  | 8d00b238f7 | ||
|  | 8cdad54236 | ||
|  | 6298e61328 | ||
|  | 9d4ed617fb | ||
|  | f92d7ecfbe | ||
|  | ce4e039f48 | ||
|  | 1a9efee591 | ||
|  | 378d55ac0e | ||
|  | 50c8b9daa1 | ||
|  | c4546bdfa3 | ||
|  | 5b401a79ba | ||
|  | 7add5c2edf | ||
|  | 811b15e672 | ||
|  | c1182fef0a | ||
|  | 7ba332cd6a | ||
|  | a810ef85b1 | ||
|  | 225e7128b6 | ||
|  | 3aded40461 | ||
|  | 57c692be74 | ||
|  | 284af63cfe | ||
|  | e856cdb7b2 | ||
|  | 114072277f | ||
|  | e65034d946 | ||
|  | a7a269d6a6 | ||
|  | 2c9660fdbf | ||
|  | e93b94cb24 | ||
|  | 3befb22903 | ||
|  | 7ed5d0de2d | ||
|  | 47f2871cb5 | ||
|  | 852ddb64ad | ||
|  | 7e1f9f1138 | ||
|  | 554d7fd611 | ||
|  | 1797f29a79 | ||
|  | 50063187ec | ||
|  | b16721b2b7 | ||
|  | facc00e8b4 | ||
|  | 02c51e6fb9 | ||
|  | be374089ba | ||
|  | 68b42304d5 | ||
|  | 32a7cc408e | ||
|  | 651e58dcb6 | ||
|  | b61b0ce25f | ||
|  | 21bab1f7c3 | ||
|  | 4f9d544d43 | ||
|  | db75c91400 | ||
|  | 37092974d3 | ||
|  | 1d63a83822 | 
| @@ -1,45 +0,0 @@ | |||||||
| module.exports = { |  | ||||||
|   types: [ |  | ||||||
|     { value: 'feat', name: 'feat:     新增功能' }, |  | ||||||
|     { value: 'fix', name: 'fix:      修复bug' }, |  | ||||||
|     { value: 'docs', name: 'docs:     文档变更' }, |  | ||||||
|     { value: 'style', name: 'style:    代码格式(不影响功能,例如空格、分号等格式修正)' }, |  | ||||||
|     { value: 'refactor', name: 'refactor: 代码重构(不包括 bug 修复、功能新增)' }, |  | ||||||
|     { value: 'perf', name: 'perf:     性能优化' }, |  | ||||||
|     { value: 'test', name: 'test:     添加、修改测试用例' }, |  | ||||||
|     { value: 'build', name: 'build:    构建流程、外部依赖变更(如升级 npm 包、修改 脚手架 配置等)' }, |  | ||||||
|     { value: 'ci', name: 'ci:       修改 CI 配置、脚本' }, |  | ||||||
|     { value: 'chore', name: 'chore:    对构建过程或辅助工具和库的更改(不影响源文件、测试用例)' }, |  | ||||||
|     { value: 'revert', name: 'revert:   回滚 commit' } |  | ||||||
|   ], |  | ||||||
|   scopes: [ |  | ||||||
| 		['projects', '项目搭建'], |  | ||||||
|     ['components', '组件相关'], |  | ||||||
|     ['hooks', 'hook 相关'], |  | ||||||
|     ['utils', 'utils 相关'], |  | ||||||
|     ['types', 'ts类型相关'], |  | ||||||
|     ['styles', '样式相关'], |  | ||||||
|     ['deps', '项目依赖'], |  | ||||||
|     ['auth', '对 auth 修改'], |  | ||||||
|     ['other', '其他修改'], |  | ||||||
|     ['custom', '以上都不是?我要自定义'] |  | ||||||
|   ].map(([value, description]) => { |  | ||||||
|     return { |  | ||||||
|       value, |  | ||||||
|       name: `${value.padEnd(30)} (${description})` |  | ||||||
|     } |  | ||||||
|   }), |  | ||||||
|   messages: { |  | ||||||
|     type: '确保本次提交遵循 Angular 规范!\n选择你要提交的类型:', |  | ||||||
|     scope: '\n选择一个 scope(可选):', |  | ||||||
|     customScope: '请输入自定义的 scope:', |  | ||||||
|     subject: '填写简短精炼的变更描述:\n', |  | ||||||
|     body: '填写更加详细的变更描述(可选)。使用 "|" 换行:\n', |  | ||||||
|     breaking: '列举非兼容性重大的变更(可选):\n', |  | ||||||
|     footer: '列举出所有变更的 ISSUES CLOSED(可选)。 例如: #31, #34:\n', |  | ||||||
|     confirmCommit: '确认提交?' |  | ||||||
|   }, |  | ||||||
|   allowBreakingChanges: ['feat', 'fix'], |  | ||||||
|   subjectLimit: 100, |  | ||||||
|   breaklineChar: '|' |  | ||||||
| } |  | ||||||
| @@ -1,12 +1,11 @@ | |||||||
| # Editor configuration, see http://editorconfig.org | # Editor configuration, see http://editorconfig.org | ||||||
|  |  | ||||||
| # 表示是最顶层的 EditorConfig 配置文件 |  | ||||||
| root = true | root = true | ||||||
|  |  | ||||||
| [*] # 表示所有文件适用 | [*] | ||||||
| charset = utf-8 # 设置文件字符集为 utf-8 | charset = utf-8 | ||||||
| indent_style = tab # 缩进风格(tab | space) | indent_style = tab | ||||||
| indent_size = 2 # 缩进大小 | indent_size = 2 | ||||||
| end_of_line = lf # 控制换行类型(lf | cr | crlf) | end_of_line = lf | ||||||
| trim_trailing_whitespace = true # 去除行首的任意空白字符 | trim_trailing_whitespace = true | ||||||
| insert_final_newline = true # 始终在文件末尾插入一个新行 | insert_final_newline = true | ||||||
|   | |||||||
							
								
								
									
										15
									
								
								.env
									
									
									
									
									
								
							
							
						
						| @@ -1,7 +1,20 @@ | |||||||
| BASE_URL=/ | VITE_BASE_URL=/ | ||||||
|  |  | ||||||
| VITE_APP_NAME=SoybeanAdmin | VITE_APP_NAME=SoybeanAdmin | ||||||
|  |  | ||||||
| VITE_APP_TITLE=Soybean管理系统 | VITE_APP_TITLE=Soybean管理系统 | ||||||
|  |  | ||||||
| VITE_APP_DESC=SoybeanAdmin是一个中后台管理系统模版 | VITE_APP_DESC=SoybeanAdmin是一个中后台管理系统模版 | ||||||
|  |  | ||||||
|  | # 权限路由模式: static | dynamic | ||||||
|  | VITE_AUTH_ROUTE_MODE=static | ||||||
|  |  | ||||||
|  | # 路由首页(根路由重定向), 用于static模式的权限路由,dynamic模式取决于后端返回的路由首页 | ||||||
|  | VITE_ROUTE_HOME_PATH=/dashboard/analysis | ||||||
|  |  | ||||||
|  | # iconify图标作为组件的前缀 | ||||||
|  | VITE_ICON_PREFIX=icon | ||||||
|  |  | ||||||
|  | # 本地SVG图标作为组件的前缀, 请注意一定要包含 VITE_ICON_PREFIX | ||||||
|  | # 格式 {VITE_ICON_PREFIX}-{本地图标集合名称} | ||||||
|  | VITE_ICON_LOCAL_PREFIX=icon-local | ||||||
|   | |||||||
| @@ -1,21 +1,30 @@ | |||||||
| /** 请求环境配置 */ | /** 请求服务的环境配置 */ | ||||||
| type ServiceEnv = { | type ServiceEnv = Record<ServiceEnvType, ServiceEnvConfig>; | ||||||
|   [key in Service.HttpEnv]: { |  | ||||||
|     /** 请求环境 */ |  | ||||||
|     env: Service.HttpEnv; |  | ||||||
|     /** 请求地址 */ |  | ||||||
|     url: string; |  | ||||||
|   }; |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| /** 请求的环境 */ | /** 不同请求服务的环境配置 */ | ||||||
| export const serviceEnv: ServiceEnv = { | const serviceEnv: ServiceEnv = { | ||||||
|  |   dev: { | ||||||
|  |     url: 'http://localhost:8080' | ||||||
|  |   }, | ||||||
|   test: { |   test: { | ||||||
|     env: 'test', |     url: 'http://localhost:8080' | ||||||
|     url: 'http://120.76.42.91:18888' |  | ||||||
|   }, |   }, | ||||||
|   prod: { |   prod: { | ||||||
|     env: 'prod', |     url: 'http://localhost:8080' | ||||||
|     url: 'http://120.76.42.91:18888' |  | ||||||
|   } |   } | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 获取当前环境模式下的请求服务的配置 | ||||||
|  |  * @param env 环境 | ||||||
|  |  */ | ||||||
|  | export function getServiceEnvConfig(env: ImportMetaEnv): ServiceEnvConfigWithProxyPattern { | ||||||
|  |   const { VITE_SERVICE_ENV = 'dev' } = env; | ||||||
|  |  | ||||||
|  |   const config = serviceEnv[VITE_SERVICE_ENV]; | ||||||
|  |  | ||||||
|  |   return { | ||||||
|  |     ...config, | ||||||
|  |     proxyPattern: '/proxy-pattern' | ||||||
|  |   }; | ||||||
|  | } | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								.env.development
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,2 @@ | |||||||
|  | VITE_HTTP_PROXY=Y | ||||||
|  | VITE_SOYBEAN_ROUTE_PLUGIN=Y | ||||||
							
								
								
									
										10
									
								
								.env.production
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,10 @@ | |||||||
|  | VITE_VISUALIZER=N | ||||||
|  |  | ||||||
|  | VITE_COMPRESS=N | ||||||
|  |  | ||||||
|  | # gzip | brotliCompress | deflate | deflateRaw | ||||||
|  | VITE_COMPRESS_TYPE=gzip | ||||||
|  |  | ||||||
|  | VITE_PWA=N | ||||||
|  |  | ||||||
|  | VITE_PROD_MOCK=Y | ||||||
| @@ -1,14 +1,3 @@ | |||||||
| *.sh |  | ||||||
| node_modules |  | ||||||
| lib |  | ||||||
| *.md |  | ||||||
| *.woff |  | ||||||
| *.ttf |  | ||||||
| .vscode |  | ||||||
| .idea |  | ||||||
| /dist/ |  | ||||||
| /public |  | ||||||
| /docs |  | ||||||
| .vscode |  | ||||||
| .local |  | ||||||
| !.env-config.ts | !.env-config.ts | ||||||
|  | router-page.d.ts | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										97
									
								
								.eslintrc.js
									
									
									
									
									
								
							
							
						
						| @@ -1,30 +1,24 @@ | |||||||
| module.exports = { | module.exports = { | ||||||
|   env: { |   extends: ['soybeanjs/vue'], | ||||||
|     browser: true, |   overrides: [ | ||||||
|     es2021: true |     { | ||||||
|  |       files: ['./scripts/*.ts'], | ||||||
|  |       rules: { | ||||||
|  |         'no-unused-expressions': 'off' | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       files: ['*.vue'], | ||||||
|  |       rules: { | ||||||
|  |         'no-undef': 'off', // use tsc to check the ts code of the vue | ||||||
|  |         'vue/no-setup-props-destructure': 'off' // wait to fix this rule | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   ], | ||||||
|  |   settings: { | ||||||
|  |     'import/core-modules': ['uno.css', '~icons/*', 'virtual:svg-icons-register'] | ||||||
|   }, |   }, | ||||||
|   globals: { |  | ||||||
|     defineProps: 'readonly', |  | ||||||
|     defineEmits: 'readonly', |  | ||||||
|     defineExpose: 'readonly', |  | ||||||
|     withDefaults: 'readonly', |  | ||||||
|     PROJECT_BUILD_TIME: 'readonly', |  | ||||||
|     AMap: 'readonly', |  | ||||||
|     BMap: 'readonly', |  | ||||||
|     TMap: 'readonly' |  | ||||||
|   }, |  | ||||||
|   parser: 'vue-eslint-parser', |  | ||||||
|   parserOptions: { |  | ||||||
|     ecmaVersion: 12, |  | ||||||
|     parser: '@typescript-eslint/parser', |  | ||||||
|     sourceType: 'module' |  | ||||||
|   }, |  | ||||||
|   plugins: ['vue', '@typescript-eslint'], |  | ||||||
|   extends: ['plugin:vue/vue3-recommended', 'airbnb-base', '@vue/typescript/recommended', 'plugin:prettier/recommended'], |  | ||||||
|   rules: { |   rules: { | ||||||
|     'import/extensions': 'off', |  | ||||||
|     'import/no-extraneous-dependencies': 'off', |  | ||||||
|     'import/no-unresolved': 0, |  | ||||||
|     'import/order': [ |     'import/order': [ | ||||||
|       'error', |       'error', | ||||||
|       { |       { | ||||||
| @@ -51,6 +45,11 @@ module.exports = { | |||||||
|             group: 'external', |             group: 'external', | ||||||
|             position: 'before' |             position: 'before' | ||||||
|           }, |           }, | ||||||
|  |           { | ||||||
|  |             pattern: '@/constants', | ||||||
|  |             group: 'internal', | ||||||
|  |             position: 'before' | ||||||
|  |           }, | ||||||
|           { |           { | ||||||
|             pattern: '@/config', |             pattern: '@/config', | ||||||
|             group: 'internal', |             group: 'internal', | ||||||
| @@ -61,11 +60,6 @@ module.exports = { | |||||||
|             group: 'internal', |             group: 'internal', | ||||||
|             position: 'before' |             position: 'before' | ||||||
|           }, |           }, | ||||||
|           { |  | ||||||
|             pattern: '@/enum', |  | ||||||
|             group: 'internal', |  | ||||||
|             position: 'before' |  | ||||||
|           }, |  | ||||||
|           { |           { | ||||||
|             pattern: '@/plugins', |             pattern: '@/plugins', | ||||||
|             group: 'internal', |             group: 'internal', | ||||||
| @@ -76,11 +70,6 @@ module.exports = { | |||||||
|             group: 'internal', |             group: 'internal', | ||||||
|             position: 'before' |             position: 'before' | ||||||
|           }, |           }, | ||||||
|           { |  | ||||||
|             pattern: '@/layouts', |  | ||||||
|             group: 'internal', |  | ||||||
|             position: 'before' |  | ||||||
|           }, |  | ||||||
|           { |           { | ||||||
|             pattern: '@/views', |             pattern: '@/views', | ||||||
|             group: 'internal', |             group: 'internal', | ||||||
| @@ -96,11 +85,21 @@ module.exports = { | |||||||
|             group: 'internal', |             group: 'internal', | ||||||
|             position: 'before' |             position: 'before' | ||||||
|           }, |           }, | ||||||
|  |           { | ||||||
|  |             pattern: '@/service', | ||||||
|  |             group: 'internal', | ||||||
|  |             position: 'before' | ||||||
|  |           }, | ||||||
|           { |           { | ||||||
|             pattern: '@/store', |             pattern: '@/store', | ||||||
|             group: 'internal', |             group: 'internal', | ||||||
|             position: 'before' |             position: 'before' | ||||||
|           }, |           }, | ||||||
|  |           { | ||||||
|  |             pattern: '@/context', | ||||||
|  |             group: 'internal', | ||||||
|  |             position: 'before' | ||||||
|  |           }, | ||||||
|           { |           { | ||||||
|             pattern: '@/composables', |             pattern: '@/composables', | ||||||
|             group: 'internal', |             group: 'internal', | ||||||
| @@ -111,11 +110,6 @@ module.exports = { | |||||||
|             group: 'internal', |             group: 'internal', | ||||||
|             position: 'before' |             position: 'before' | ||||||
|           }, |           }, | ||||||
|           { |  | ||||||
|             pattern: '@/service', |  | ||||||
|             group: 'internal', |  | ||||||
|             position: 'before' |  | ||||||
|           }, |  | ||||||
|           { |           { | ||||||
|             pattern: '@/utils', |             pattern: '@/utils', | ||||||
|             group: 'internal', |             group: 'internal', | ||||||
| @@ -130,33 +124,10 @@ module.exports = { | |||||||
|             pattern: '@/**', |             pattern: '@/**', | ||||||
|             group: 'internal', |             group: 'internal', | ||||||
|             position: 'before' |             position: 'before' | ||||||
|           }, |  | ||||||
|           { |  | ||||||
|             pattern: '@/interface', |  | ||||||
|             group: 'internal', |  | ||||||
|             position: 'before' |  | ||||||
|           } |           } | ||||||
|         ], |         ], | ||||||
|         pathGroupsExcludedImportTypes: ['vue', 'vue-router', 'pinia', 'naive-ui'] |         pathGroupsExcludedImportTypes: ['vue', 'vue-router', 'pinia', 'naive-ui'] | ||||||
|       } |       } | ||||||
|     ], |     ] | ||||||
|     'import/prefer-default-export': 0, |  | ||||||
|     'max-classes-per-file': 0, |  | ||||||
|     'no-shadow': 0, |  | ||||||
|     'no-unused-vars': 'off', |  | ||||||
|     'no-use-before-define': 'off', |  | ||||||
|     'vue/comment-directive': 0, |  | ||||||
|     'vue/multi-word-component-names': 0, |  | ||||||
|     '@typescript-eslint/ban-types': 'off', |  | ||||||
|     '@typescript-eslint/ban-ts-ignore': 'off', |  | ||||||
|     '@typescript-eslint/explicit-function-return-type': 'off', |  | ||||||
|     '@typescript-eslint/explicit-module-boundary-types': 'off', |  | ||||||
|     '@typescript-eslint/no-empty-function': 'off', |  | ||||||
|     '@typescript-eslint/no-explicit-any': 0, |  | ||||||
|     '@typescript-eslint/no-inferrable-types': 0, |  | ||||||
|     '@typescript-eslint/no-non-null-assertion': 'off', |  | ||||||
|     '@typescript-eslint/no-unused-vars': ['warn', { ignoreRestSiblings: true }], |  | ||||||
|     '@typescript-eslint/no-use-before-define': ['error', { classes: true, functions: false, typedefs: false }], |  | ||||||
|     '@typescript-eslint/no-var-requires': 'off' |  | ||||||
|   } |   } | ||||||
| }; | }; | ||||||
|   | |||||||
							
								
								
									
										17
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,17 @@ | |||||||
|  | "*.vue"    eol=lf | ||||||
|  | "*.js"     eol=lf | ||||||
|  | "*.ts"     eol=lf | ||||||
|  | "*.jsx"    eol=lf | ||||||
|  | "*.tsx"    eol=lf | ||||||
|  | "*.cjs"    eol=lf | ||||||
|  | "*.cts"    eol=lf | ||||||
|  | "*.mjs"    eol=lf | ||||||
|  | "*.mts"    eol=lf | ||||||
|  | "*.json"   eol=lf | ||||||
|  | "*.html"   eol=lf | ||||||
|  | "*.css"    eol=lf | ||||||
|  | "*.less"   eol=lf | ||||||
|  | "*.scss"   eol=lf | ||||||
|  | "*.sass"   eol=lf | ||||||
|  | "*.styl"   eol=lf | ||||||
|  | "*.md"   eol=lf | ||||||
							
								
								
									
										90
									
								
								.github/ISSUE_TEMPLATE/bug-report.yaml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,90 @@ | |||||||
|  | name: Bug提交 | ||||||
|  | description: 在使用软件或功能的过程中遇到了错误 | ||||||
|  | title: '[Bug]: ' | ||||||
|  | labels: [ "bug?" ] | ||||||
|  |  | ||||||
|  | body: | ||||||
|  |   - type: markdown | ||||||
|  |     attributes: | ||||||
|  |       value: | | ||||||
|  |         ## 请按照以下要求进行提交 | ||||||
|  |         ### 1. 提交后需要指定标签和截止时间。 | ||||||
|  |         --- | ||||||
|  |  | ||||||
|  |   - type: markdown | ||||||
|  |     attributes: | ||||||
|  |       value: | | ||||||
|  |         ## 环境信息 | ||||||
|  |         请根据实际使用环境修改以下信息。 | ||||||
|  |  | ||||||
|  |   - type: input | ||||||
|  |     id: env-program-ver | ||||||
|  |     attributes: | ||||||
|  |       label: 软件版本 | ||||||
|  |     validations: | ||||||
|  |       required: true | ||||||
|  |  | ||||||
|  |   - type: dropdown | ||||||
|  |     id: env-vm-ver | ||||||
|  |     attributes: | ||||||
|  |       label: 运行环境 | ||||||
|  |       description: 选择运行软件的系统版本 | ||||||
|  |       options: | ||||||
|  |         - Windows (64) | ||||||
|  |         - Windows (32/x84) | ||||||
|  |         - MacOS | ||||||
|  |         - Linux | ||||||
|  |         - Ubuntu | ||||||
|  |         - CentOS | ||||||
|  |         - ArchLinux | ||||||
|  |         - UNIX (Android) | ||||||
|  |         - 其它(请在下方说明) | ||||||
|  |     validations: | ||||||
|  |       required: true | ||||||
|  |  | ||||||
|  |   - type: dropdown | ||||||
|  |     id: env-vm-arch | ||||||
|  |     attributes: | ||||||
|  |       label: 运行架构 | ||||||
|  |       description: (可选) 选择运行软件的系统架构 | ||||||
|  |       options: | ||||||
|  |         - AMD64 | ||||||
|  |         - x86 | ||||||
|  |         - ARM [32] (别名:AArch32 / ARMv7) | ||||||
|  |         - ARM [64] (别名:AArch64 / ARMv8) | ||||||
|  |         - 其它 | ||||||
|  |  | ||||||
|  |   - type: textarea | ||||||
|  |     id: reproduce-steps | ||||||
|  |     attributes: | ||||||
|  |       label: 重现步骤 | ||||||
|  |       description: | | ||||||
|  |         我们需要执行哪些操作才能让 bug 出现? | ||||||
|  |         简洁清晰的重现步骤能够帮助我们更迅速地定位问题所在。 | ||||||
|  |     validations: | ||||||
|  |       required: true | ||||||
|  |  | ||||||
|  |   - type: textarea | ||||||
|  |     id: expected | ||||||
|  |     attributes: | ||||||
|  |       label: 期望的结果是什么? | ||||||
|  |     validations: | ||||||
|  |       required: true | ||||||
|  |  | ||||||
|  |   - type: textarea | ||||||
|  |     id: actual | ||||||
|  |     attributes: | ||||||
|  |       label: 实际的结果是什么? | ||||||
|  |     validations: | ||||||
|  |       required: true | ||||||
|  |  | ||||||
|  |   - type: textarea | ||||||
|  |     id: logging | ||||||
|  |     attributes: | ||||||
|  |       label: 日志记录(可选) | ||||||
|  |       render: golang | ||||||
|  |  | ||||||
|  |   - type: textarea | ||||||
|  |     id: extra-desc | ||||||
|  |     attributes: | ||||||
|  |       label: 补充说明(可选) | ||||||
							
								
								
									
										11
									
								
								.github/PULL_REQUEST_TEMPLATE.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,11 @@ | |||||||
|  | ## Pull Request 详情 | ||||||
|  |  | ||||||
|  | 请根据实际使用情况修改以下信息。 | ||||||
|  |  | ||||||
|  | ## 版本信息 | ||||||
|  |  | ||||||
|  | ## 解决了哪些问题 | ||||||
|  |  | ||||||
|  | ## 是否关闭了某个 Issue | ||||||
|  |  | ||||||
|  | Closes # | ||||||
							
								
								
									
										30
									
								
								.github/workflows/linter.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,30 @@ | |||||||
|  | --- | ||||||
|  | name: Lint Code | ||||||
|  |  | ||||||
|  | permissions: | ||||||
|  |   contents: write | ||||||
|  |  | ||||||
|  | on: | ||||||
|  |   pull_request: | ||||||
|  |     branches: [main] | ||||||
|  |  | ||||||
|  | jobs: | ||||||
|  |   lint: | ||||||
|  |     name: Lint All Code | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  |  | ||||||
|  |     steps: | ||||||
|  |       - name: Checkout Code | ||||||
|  |         uses: actions/checkout@v3 | ||||||
|  |         with: | ||||||
|  |           fetch-depth: 0 | ||||||
|  |  | ||||||
|  |       - name: Lint Code Base | ||||||
|  |         uses: github/super-linter@v4 | ||||||
|  |         env: | ||||||
|  |           VALIDATE_ALL_CODEBASE: false | ||||||
|  |           DEFAULT_BRANCH: main | ||||||
|  |           # To change branch master or main | ||||||
|  |           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||
|  |           FILTER_REGEX_EXCLUDE: (docs|.github) | ||||||
|  |           VALIDATE_MARKDOWN: false | ||||||
							
								
								
									
										25
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,25 @@ | |||||||
|  | name: Release | ||||||
|  |  | ||||||
|  | permissions: | ||||||
|  |   contents: write | ||||||
|  |  | ||||||
|  | on: | ||||||
|  |   push: | ||||||
|  |     tags: | ||||||
|  |       - "v*" | ||||||
|  |  | ||||||
|  | jobs: | ||||||
|  |   release: | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  |     steps: | ||||||
|  |       - uses: actions/checkout@v3 | ||||||
|  |         with: | ||||||
|  |           fetch-depth: 0 | ||||||
|  |  | ||||||
|  |       - uses: actions/setup-node@v3 | ||||||
|  |         with: | ||||||
|  |           node-version: 16.x | ||||||
|  |  | ||||||
|  |       - run: npx githublogen | ||||||
|  |         env: | ||||||
|  |           GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||||||
							
								
								
									
										12
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -11,12 +11,19 @@ node_modules | |||||||
| .DS_Store | .DS_Store | ||||||
| dist | dist | ||||||
| dist-ssr | dist-ssr | ||||||
|  | dist.zip | ||||||
|  | coverage | ||||||
| *.local | *.local | ||||||
|  | stats.html | ||||||
|  |  | ||||||
| /cypress/videos/ | /cypress/videos/ | ||||||
| /cypress/screenshots/ | /cypress/screenshots/ | ||||||
|  |  | ||||||
| # Editor directories and files | # Editor directories and files | ||||||
|  | .vscode/* | ||||||
|  | !.vscode/extensions.json | ||||||
|  | !.vscode/launch.json | ||||||
|  | !.vscode/settings.json | ||||||
| .idea | .idea | ||||||
| *.suo | *.suo | ||||||
| *.ntvs* | *.ntvs* | ||||||
| @@ -24,4 +31,7 @@ dist-ssr | |||||||
| *.sln | *.sln | ||||||
| *.sw? | *.sw? | ||||||
|  |  | ||||||
| stats.html | /src/typings/components.d.ts | ||||||
|  | package-lock.json | ||||||
|  | yarn.lock | ||||||
|  | pnpm-lock.yaml | ||||||
|   | |||||||
| @@ -1,4 +0,0 @@ | |||||||
| #!/bin/sh |  | ||||||
| . "$(dirname "$0")/_/husky.sh" |  | ||||||
|  |  | ||||||
| npx --no-install commitlint --edit |  | ||||||
| @@ -1,4 +0,0 @@ | |||||||
| #!/bin/sh |  | ||||||
| . "$(dirname "$0")/_/husky.sh" |  | ||||||
|  |  | ||||||
| pnpm lint && pnpm typecheck |  | ||||||
							
								
								
									
										2
									
								
								.npmrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,2 @@ | |||||||
|  | registry=https://registry.npmmirror.com/ | ||||||
|  | shamefully-hoist=true | ||||||
| @@ -1,27 +0,0 @@ | |||||||
| module.exports = { |  | ||||||
|   printWidth: 120, // 超过最大值换行 |  | ||||||
|   tabWidth: 2, // 缩进字节数 |  | ||||||
|   useTabs: false, // 缩进使用tab,不使用空格 |  | ||||||
|   semi: true, // 句尾添加分号 |  | ||||||
|   singleQuote: true, // 使用单引号代替双引号 |  | ||||||
|   proseWrap: 'preserve', // 默认值。因为使用了一些折行敏感型的渲染器(如GitHub comment)而按照markdown文本样式进行折行 |  | ||||||
|   arrowParens: 'avoid', //  (x) => {} 箭头函数参数只有一个时是否要有小括号。avoid:省略括号 |  | ||||||
|   bracketSpacing: true, // 在对象,数组括号与文字之间加空格 "{ foo: bar }" |  | ||||||
|   endOfLine: 'auto', // 结尾是 \n \r \n\r auto |  | ||||||
|   eslintIntegration: false, //不让prettier使用eslint的代码格式进行校验 |  | ||||||
|   htmlWhitespaceSensitivity: 'ignore', // 指定HTML文件的全局空白区域敏感度 有效选项:"css"- 遵守CSS display属性的默认值。"strict" - 空格被认为是敏感的。"ignore" - 空格被认为是不敏感的。html 中空格也会占位,影响布局,prettier 格式化的时候可能会将文本换行,造成布局错乱 |  | ||||||
|   ignorePath: '.prettierignore', // 不使用prettier格式化的文件填写在项目的.prettierignore文件中 |  | ||||||
|   jsxSingleQuote: false, // 在jsx中使用单引号代替双引号 |  | ||||||
|   requireConfig: false, // Require a 'prettierconfig' to format prettier |  | ||||||
|   stylelintIntegration: false, //不让prettier使用stylelint的代码格式进行校验 |  | ||||||
|   trailingComma: 'none', // 在对象或数组最后一个元素后面是否加逗号(在ES5中加尾逗号) |  | ||||||
|   tslintIntegration: false, // 不让prettier使用tslint的代码格式进行校验 |  | ||||||
|   overrides: [ |  | ||||||
|     { |  | ||||||
|       files: '*.html', |  | ||||||
|       options: { |  | ||||||
|         parser: 'html' |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
|   ] |  | ||||||
| }; |  | ||||||
							
								
								
									
										50
									
								
								.vscode/extensions.json
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,35 +1,19 @@ | |||||||
| { | { | ||||||
| 	"recommendations": [ |   "recommendations": [ | ||||||
| 		"formulahendry.auto-close-tag", |     "antfu.unocss", | ||||||
| 		"formulahendry.auto-complete-tag", |     "dbaeumer.vscode-eslint", | ||||||
| 		"steoates.autoimport", |     "editorconfig.editorconfig", | ||||||
| 		"formulahendry.auto-rename-tag", |     "esbenp.prettier-vscode", | ||||||
| 		"coenraads.bracket-pair-colorizer-2", |     "formulahendry.auto-complete-tag", | ||||||
| 		"naumovs.color-highlight", |     "formulahendry.auto-close-tag", | ||||||
| 		"pranaygp.vscode-css-peek", |     "formulahendry.auto-rename-tag", | ||||||
| 		"mikestead.dotenv", |     "kisstkondoros.vscode-gutter-preview", | ||||||
| 		"editorconfig.editorconfig", |     "lokalise.i18n-ally", | ||||||
| 		"dsznajder.es7-react-js-snippets", |     "mariusalchimavicius.json-to-ts", | ||||||
| 		"dbaeumer.vscode-eslint", |     "mhutchie.git-graph", | ||||||
| 		"miguelsolorio.fluent-icons", |     "sdras.vue-vscode-snippets", | ||||||
| 		"mhutchie.git-graph", |     "streetsidesoftware.code-spell-checker", | ||||||
| 		"eamodio.gitlens", |     "vue.volar", | ||||||
| 		"lokalise.i18n-ally", |     "vue.vscode-typescript-vue-plugin" | ||||||
| 		"afzalsayed96.icones", |   ] | ||||||
| 		"antfu.iconify", |  | ||||||
| 		"kisstkondoros.vscode-gutter-preview", |  | ||||||
| 		"xabikos.javascriptsnippets", |  | ||||||
| 		"whtouche.vscode-js-console-utils", |  | ||||||
| 		"ritwickdey.liveserver", |  | ||||||
| 		"yzhang.markdown-all-in-one", |  | ||||||
| 		"pkief.material-icon-theme", |  | ||||||
| 		"zhuangtongfa.material-theme", |  | ||||||
| 		"christian-kohler.path-intellisense", |  | ||||||
| 		"esbenp.prettier-vscode", |  | ||||||
| 		"johnsoncodehk.volar", |  | ||||||
| 		"johnsoncodehk.vscode-typescript-vue-plugin", |  | ||||||
| 		"dariofuzinato.vue-peek", |  | ||||||
| 		"wscats.vue", |  | ||||||
| 		"voorjaar.windicss-intellisense" |  | ||||||
| 	] |  | ||||||
| } | } | ||||||
|   | |||||||
							
								
								
									
										20
									
								
								.vscode/launch.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,20 @@ | |||||||
|  | { | ||||||
|  |   "version": "0.2.0", | ||||||
|  |   "configurations": [ | ||||||
|  |     { | ||||||
|  |       "type": "chrome", | ||||||
|  |       "request": "launch", | ||||||
|  |       "name": "Vue debugger", | ||||||
|  |       "url": "http://localhost:3200", | ||||||
|  |       "webRoot": "${workspaceFolder}" | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       "type": "node", | ||||||
|  |       "request": "launch", | ||||||
|  |       "name": "TS debugger", | ||||||
|  |       "skipFiles": ["<node_internals>/**"], | ||||||
|  |       "runtimeArgs": ["--loader", "tsx"], | ||||||
|  |       "program": "${relativeFile}" | ||||||
|  |     } | ||||||
|  |   ] | ||||||
|  | } | ||||||
							
								
								
									
										147
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -1,74 +1,77 @@ | |||||||
| { | { | ||||||
| 	"editor.quickSuggestions": { |   "cSpell.ignorePaths": [ | ||||||
| 		"strings": true |     "package.json", | ||||||
| 	}, |     "package-lock.json", | ||||||
| 	"workbench.iconTheme": "material-icon-theme", |     "yarn.lock", | ||||||
| 	"workbench.colorTheme": "One Dark Pro", |     "pnpm-lock.yaml", | ||||||
| 	"editor.tabSize": 2, |     "node_modules", | ||||||
| 	"editor.fontLigatures": true, |     "vscode-extension", | ||||||
| 	"editor.codeActionsOnSave": { |     ".git/objects", | ||||||
| 		"source.fixAll.eslint": true |     ".vscode", | ||||||
| 	}, |     ".vscode-insiders", | ||||||
| 	"editor.bracketPairColorization.enabled": true, |     "CHANGELOG.md", | ||||||
| 	"editor.guides.bracketPairs": "active", |     "dist", | ||||||
| 	"git.enableSmartCommit": true, |     "public", | ||||||
| 	"path-intellisense.mappings": { |     "styles" | ||||||
| 		"@": "${workspaceFolder}/src", |   ], | ||||||
| 		"~@": "${workspaceFolder}/src", |   "cSpell.words": [ | ||||||
| 	}, |     "AMAP", | ||||||
| 	"gutterpreview.paths": { |     "antdesign", | ||||||
| 		"@": "/src", |     "antv", | ||||||
| 		"~@": "/src" |     "apacheecharts", | ||||||
| 	}, |     "areaspline", | ||||||
| 	"terminal.integrated.cursorStyle": "line", |     "bmapgl", | ||||||
| 	"files.associations": { |     "colord", | ||||||
| 		"*.env.*": "dotenv" |     "echarts", | ||||||
| 	}, |     "gitee", | ||||||
| 	"[jsonc]": { |     "gridicons", | ||||||
| 		"editor.defaultFormatter": "vscode.json-language-features" |     "iconify", | ||||||
| 	}, |     "jsapi", | ||||||
| 	"[json]": { |     "naiveui", | ||||||
| 		"editor.defaultFormatter": "vscode.json-language-features" |     "Popconfirm", | ||||||
| 	}, |     "Posva", | ||||||
| 	"[javascript]": { |     "Shenzhen", | ||||||
| 		"editor.defaultFormatter": "esbenp.prettier-vscode" |     "Sider", | ||||||
| 	}, |     "tauri", | ||||||
| 	"javascript.updateImportsOnFileMove.enabled": "always", |     "unocss", | ||||||
| 	"[javascriptreact]": { |     "unplugin", | ||||||
| 		"editor.defaultFormatter": "esbenp.prettier-vscode" |     "vditor", | ||||||
| 	}, |     "VERCEL", | ||||||
| 	"terminal.integrated.fontSize": 14, |     "Vite", | ||||||
| 	"terminal.integrated.fontWeight": 500, |     "vitejs", | ||||||
| 	"i18n-ally.displayLanguage": "zh", |     "vuedraggable", | ||||||
| 	"[html]": { |     "vueuse", | ||||||
| 		"editor.defaultFormatter": "esbenp.prettier-vscode" |     "wangeditor", | ||||||
| 	}, |     "wechat", | ||||||
| 	"[typescript]": { |     "xgplayer", | ||||||
| 		"editor.defaultFormatter": "esbenp.prettier-vscode" |     "yanbowe", | ||||||
| 	}, |     "ភាសាខ្មែរ" | ||||||
| 	"[vue]": { |   ], | ||||||
| 		"editor.defaultFormatter": "johnsoncodehk.volar" |   "editor.codeActionsOnSave": { | ||||||
| 	}, |     "source.fixAll.eslint": true | ||||||
| 	"terminal.integrated.tabs.enabled": true, |   }, | ||||||
| 	"[typescriptreact]": { |   "editor.fontLigatures": true, | ||||||
| 		"editor.defaultFormatter": "esbenp.prettier-vscode" |   "editor.formatOnSave": false, | ||||||
| 	}, |   "editor.quickSuggestions": { | ||||||
| 	"[markdown]": { |     "strings": true | ||||||
| 		"editor.defaultFormatter": "yzhang.markdown-all-in-one" |   }, | ||||||
| 	}, |   "editor.tabSize": 2, | ||||||
| 	"vue3snippets.enable-compile-vue-file-on-did-save-code": false, |   "eslint.validate": ["json"], | ||||||
| 	"editor.formatOnSave": false, |   "files.associations": { | ||||||
| 	"material-icon-theme.activeIconPack": "angular", |     "*.env.*": "dotenv", | ||||||
| 	"material-icon-theme.files.associations": {}, |     "*.svg": "html" | ||||||
| 	"material-icon-theme.folders.associations": { |   }, | ||||||
| 		"enum": "typescript", |   "files.eol": "\n", | ||||||
| 		"enums": "typescript", |   "i18n-ally.displayLanguage": "zh-CN", | ||||||
| 		"store": "context", |   "i18n-ally.enabledParsers": ["ts"], | ||||||
| 		"stores": "context", |   "i18n-ally.enabledFrameworks": ["vue"], | ||||||
| 		"composable": "hook", |   "i18n-ally.editor.preferEditor": true, | ||||||
| 		"composables": "hook", |   "i18n-ally.keystyle": "nested", | ||||||
| 		"directive": "tools", |   "i18n-ally.localesPaths": ["src/locales/lang"], | ||||||
| 		"directives": "tools", |   "material-icon-theme.activeIconPack": "vue", | ||||||
| 		"business": "core" |   "[html][css][less][scss][sass][markdown][yaml][yml][jsonc]": { | ||||||
| 	} |     "editor.defaultFormatter": "esbenp.prettier-vscode", | ||||||
|  |     "editor.formatOnSave": true | ||||||
|  |   }, | ||||||
|  |   "prettier": {} | ||||||
| } | } | ||||||
|   | |||||||
							
								
								
									
										1313
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
							
								
								
									
										21
									
								
								LICENSE
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,21 @@ | |||||||
|  | MIT License | ||||||
|  |  | ||||||
|  | Copyright (c) 2021 Soybean | ||||||
|  |  | ||||||
|  | Permission is hereby granted, free of charge, to any person obtaining a copy | ||||||
|  | of this software and associated documentation files (the "Software"), to deal | ||||||
|  | in the Software without restriction, including without limitation the rights | ||||||
|  | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||||
|  | copies of the Software, and to permit persons to whom the Software is | ||||||
|  | furnished to do so, subject to the following conditions: | ||||||
|  |  | ||||||
|  | The above copyright notice and this permission notice shall be included in all | ||||||
|  | copies or substantial portions of the Software. | ||||||
|  |  | ||||||
|  | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||||
|  | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||||
|  | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||||
|  | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||||
|  | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||||
|  | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||||
|  | SOFTWARE. | ||||||
							
								
								
									
										16
									
								
								Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,16 @@ | |||||||
|  | ImageTag ?=v0.9.6 | ||||||
|  | SoybeanAdminImg ?= soybeanjs/soybean-admin:$(ImageTag) | ||||||
|  |  | ||||||
|  | VERSION=$(shell git rev-parse --short HEAD) | ||||||
|  |  | ||||||
|  | soybean-admin: soybean-admin-build soybean-admin-push | ||||||
|  |  | ||||||
|  | soybean-admin-build: | ||||||
|  | 	docker build --build-arg version=$(VERSION) -t ${SoybeanAdminImg} -f docker/Dockerfile . | ||||||
|  |  | ||||||
|  | soybean-admin-push: | ||||||
|  | 	docker push ${SoybeanAdminImg} | ||||||
|  |  | ||||||
|  | # run tauri app: | ||||||
|  | run: | ||||||
|  | 	pnpm tauri dev | ||||||
							
								
								
									
										154
									
								
								README.md
									
									
									
									
									
								
							
							
						
						| @@ -1,55 +1,118 @@ | |||||||
| <div align="center"> | <div align="center"> | ||||||
| 	<img src="https://i.loli.net/2021/11/24/x5lLfuSnEawBAgi.png"/> | 	<img src="./public/favicon.svg" style="width: 160px;"/> | ||||||
| 	<h1>Soybean Admin Thin</h1> | 	<h1>Soybean Admin</h1> | ||||||
| </div> | </div> | ||||||
|  |  | ||||||
| [](./LICENSE) | [](./LICENSE)   | ||||||
|  |  | ||||||
|  | ## 注意 SoybeanAdmin 正在重构,全新 1.0 即将发布 | ||||||
|  |  | ||||||
|  | Soybean Admin v1.0 : | ||||||
|  |  | ||||||
|  | - [x] 采用基于 pnpm 的 monorepo 管理项目 | ||||||
|  | - [x] 第三方 soybeanjs 的工具库直接抽离到项目中(ElegantRouter除外),不再作为依赖 | ||||||
|  | - [x] 采用全新的路由插件 ElegantRouter | ||||||
|  | - [x] 使用基于 ApiFox 的远程 mock 代替本地 mock | ||||||
|  | - [x] 基于现有路由插件迁移至新路由插件的指南 | ||||||
|  | - [x] 代码实现遵循 SoybeanJS 的代码规范 | ||||||
|  | - [ ] 项目的 main 分支保留系统核心部分,示例页面和无关核心的插件移至 example 分支 | ||||||
|  | - [ ] 完整 1.0 版本的文档 | ||||||
|  |  | ||||||
|  |   1.0 源代码:[v1.0-beta](https://github.com/honghuangdc/soybean-admin/tree/v1.0-beta) | ||||||
|  |  | ||||||
|  | > 同时推出开源的 [AntDesignVue 版本](https://github.com/soybeanjs/soybean-admin-antd) 和 ElementPlus 版本 | ||||||
|  |  | ||||||
|  | > 新开项目建议直接使用 [v1.0-beta](https://github.com/honghuangdc/soybean-admin/tree/v1.0-beta) 或 [AntDesignVue 版本](https://github.com/soybeanjs/soybean-admin-antd) | ||||||
|  |  | ||||||
| ## 简介 | ## 简介 | ||||||
|  |  | ||||||
| Soybean Admin Thin 是Soybean Admin的精简版。 | [Soybean Admin](https://github.com/honghuangdc/soybean-admin) 是一个基于 Vue3、Vite3、TypeScript、NaiveUI、Pinia 和 UnoCSS 的清新优雅的中后台模版,它使用了最新流行的前端技术栈,内置丰富的主题配置,有着极高的代码规范,基于文件的路由系统以及基于 Mock 的动态权限路由,开箱即用的中后台前端解决方案,也可用于学习参考。 | ||||||
|  |  | ||||||
| ## 特性 | ## 特性 | ||||||
|  |  | ||||||
| - **最新技术栈**:使用 Vue3/vite2 等前端前沿技术开发, 使用高效率的npm包管理器pnpm | - **最新流行技术栈**:使用 Vue3/Vite 等前端前沿技术开发, 使用高效率的 npm 包管理器 pnpm | ||||||
| - **TypeScript**: 应用程序级 JavaScript 的语言 | - **TypeScript**: 应用程序级 JavaScript 的语言 | ||||||
| - **主题**:丰富可配置的主题 | - **主题**:丰富可配置的主题、暗黑模式,基于原子 css 框架 - UnoCss 的动态主题颜色 | ||||||
| - **代码规范**:丰富的规范插件及极高的代码规范 | - **代码规范**:丰富的规范插件及极高的代码规范 | ||||||
| - **路由配置**:简易的路由配置 | - **文件路由系统**:基于文件的路由系统,根据页面文件自动生成路由声明、路由导入和路由模块 | ||||||
|  | - **权限路由**:提供前端静态和后端动态两种路由模式,基于 mock 的动态路由能快速实现后端动态路由 | ||||||
|  | - **请求函数**:基于 axios 的完善的请求函数封装,提供 Promise 和 hooks 两种请求函数,加入请求结果数据转换的适配器 | ||||||
|  |  | ||||||
| ## 预览 | ## SoybeanJS 工具库 | ||||||
|  |  | ||||||
| - [soybean-admin](https://soybean.pro/) | - [@soybeanjs/cli](https://github.com/soybeanjs/cli): SoybeanJS 命令行工具,包含发布、git 和依赖等相关的实用命令 | ||||||
|  | - [@soybeanjs/changelog](https://github.com/soybeanjs/changelog): 根据 git tags 和 commits 生成 changelog [示例](./CHANGELOG.md) | ||||||
|  | - [eslint-config-soybeanjs](https://github.com/soybeanjs/eslint-config): SoybeanJS 的 eslint 预设配置 | ||||||
|  | - [@soybeanjs/materials](https://github.com/soybeanjs/materials): SoybeanJS 的物料仓库 | ||||||
|  | - [@soybeanjs/vite-plugin-vue-page-route](https://github.com/soybeanjs/vite-plugin-vue-page-route): SoybeanAdmin 的路由插件 | ||||||
|  |  | ||||||
|  | ## 基于 SoybeanAdmin 二次开发的项目 | ||||||
|  |  | ||||||
|  | - [electron-mock-admin](https://github.com/lixin59/electron-mock-api): 一个 Mock Api 管理系统,帮助前端开发伙伴快速实现接口的 mock。 | ||||||
|  | - [T-Shell](https://github.com/TheBlindM/T-Shell): 是一个可配置命令提示的终端模拟器和 SSH 客户端。 | ||||||
|  |  | ||||||
|  | ## 在线预览 | ||||||
|  |  | ||||||
|  | - [Soybean Admin 预览地址](https://admin.soybeanjs.cn/) | ||||||
|  |  | ||||||
| ## 文档 | ## 文档 | ||||||
|  |  | ||||||
| - [项目文档](https://docs.soybean.pro) | - [项目文档预览地址](https://admin-docs.soybeanjs.cn/) | ||||||
|  |  | ||||||
| ### 代码仓库 | ## 代码仓库 | ||||||
|  |  | ||||||
| - [github](https://github.com/honghuangdc/soybean-admin) | | 仓库           | GitHub 地址                                                                   | gitee 镜像                                                                   | 预览                                                      | | ||||||
|  | | -------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | --------------------------------------------------------- | | ||||||
|  | | soybean-admin  | [GitHub](https://github.com/honghuangdc/soybean-admin)                        | [gitee](https://gitee.com/honghuangdc/soybean-admin)                         | [预览](https://admin.soybeanjs.cn/)                       | | ||||||
|  | | tauri 版       | [tauri 版](https://github.com/honghuangdc/soybean-admin/tree/tauri)           | [tauri 版](https://gitee.com/honghuangdc/soybean-admin/tree/tauri)           |                                                           | | ||||||
|  | | 精简版         | [精简版](https://github.com/honghuangdc/soybean-admin/tree/thin)              | [精简版](https://gitee.com/honghuangdc/soybean-admin/tree/thin)              |                                                           | | ||||||
|  | | 集成 fast-crud | [集成 fast-crud](https://github.com/honghuangdc/soybean-admin/tree/fast-crud) | [集成 fast-crud](https://gitee.com/honghuangdc/soybean-admin/tree/fast-crud) | [预览](http://fast-crud.docmirror.cn/soybean/#/crud/demo) | | ||||||
|  |  | ||||||
| - [gitee](https://gitee.com/honghuangdc/soybean-admin) | ## 更新日志 | ||||||
|  |  | ||||||
|  | [CHANGELOG](./CHANGELOG.md) | ||||||
|  |  | ||||||
|  | ## 后端服务 | ||||||
|  |  | ||||||
|  | - [soybean-admin-java](https://github.com/honghuangdc/soybean-admin-java) | ||||||
|  |  | ||||||
| ## 项目示例图 | ## 项目示例图 | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| ### 使用 Gitpod |  | ||||||
|  |  | ||||||
| 在 Gitpod(适用于 GitHub 的免费在线开发环境)中打开项目,并立即开始编码. |  | ||||||
|  |  | ||||||
| [](https://gitpod.io/#https://github.com/honghuangdc/soybean-admin) |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | <div align="center"> | ||||||
|  | 	<img style="width:380px;margin-right:18px;border:1px solid #dedede;" src="https://s2.loli.net/2023/06/07/A5Nonc9vI6pB1lr.png" /> | ||||||
|  | 	  | ||||||
|  | 	<img style="width:380px;border:1px solid #dedede;" src="https://s2.loli.net/2023/06/07/VwBjqEhTke3OxXF.png" /> | ||||||
|  | </div> | ||||||
|  |  | ||||||
| ## 安装使用 | ## 安装使用 | ||||||
|  |  | ||||||
|  | - 环境配置 | ||||||
|  |   **本地环境需要安装 pnpm 7.x 、Node.js 14.18+ 和 Git** | ||||||
|  |  | ||||||
| - 克隆代码 | - 克隆代码 | ||||||
|  |  | ||||||
| ```bash | ```bash | ||||||
| @@ -74,19 +137,28 @@ pnpm dev | |||||||
| pnpm build | pnpm build | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
|  | ## Docker 部署 | ||||||
|  |  | ||||||
|  | - Docker 部署 Soybean | ||||||
|  |  | ||||||
|  | ```bash | ||||||
|  | docker build -t soybean-admin-image -f docker/Dockerfile . | ||||||
|  | docker run -d -p 80:80 soybean-admin-image | ||||||
|  | ``` | ||||||
|  |  | ||||||
|  | - 访问 SoybeanAdmin | ||||||
|  |  | ||||||
|  | 打开本地浏览器访问`http://localhost` | ||||||
|  |  | ||||||
| ## 如何贡献 | ## 如何贡献 | ||||||
|  |  | ||||||
| 非常欢迎您的加入 或者提交一个 Pull Request。 | 非常欢迎您的加入 或者提交一个 Pull Request。 | ||||||
|  |  | ||||||
| ## Git 贡献提交规范 | ## Git 贡献提交规范 | ||||||
|  |  | ||||||
| 项目已经内置angular提交规范,通过git cz 代替git commit 命令即可。 | 项目已经内置 Angular 提交规范,直接执行 commit 命令即可生成符合 Angular 提交规范的 commit。 | ||||||
|  |  | ||||||
| git cz命令需要全局安装 commitizen | 项目已用 simple-git-hooks 代替了 husky, 旧版本用了 husky,执行 pnpm soy init-simple-git-hooks 进行初始化配置 | ||||||
|  |  | ||||||
| ```bash |  | ||||||
| pnpm i -g commitizen |  | ||||||
| ``` |  | ||||||
|  |  | ||||||
| ## 浏览器支持 | ## 浏览器支持 | ||||||
|  |  | ||||||
| @@ -95,8 +167,8 @@ pnpm i -g commitizen | |||||||
| 支持现代浏览器, 不支持 IE | 支持现代浏览器, 不支持 IE | ||||||
|  |  | ||||||
| | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png" alt="IE" width="24px" height="24px"  />](http://godban.github.io/browsers-support-badges/)IE | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Safari | | | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png" alt="IE" width="24px" height="24px"  />](http://godban.github.io/browsers-support-badges/)IE | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Safari | | ||||||
| | :-: | :-: | :-: | :-: | :-: | | | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | ||||||
| | not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions | | |                                                                                                                not support                                                                                                                |                                                                                          last 2 versions                                                                                          |                                                                                               last 2 versions                                                                                                |                                                                                             last 2 versions                                                                                              |                                                                                             last 2 versions                                                                                              | | ||||||
|  |  | ||||||
| ## 开源作者 | ## 开源作者 | ||||||
|  |  | ||||||
| @@ -104,21 +176,25 @@ pnpm i -g commitizen | |||||||
|  |  | ||||||
| ## 交流 | ## 交流 | ||||||
|  |  | ||||||
| `Soybean Admin` 是完全开源免费的项目,在帮助开发者更方便地进行中大型管理系统开发,同时也提供 QQ 交流群使用问题欢迎在群内提问。 | `Soybean Admin` 是完全开源免费的项目,在帮助开发者更方便地进行中大型管理系统开发,同时也提供微信和 QQ 交流群,使用问题欢迎在群内提问。 | ||||||
|  |  | ||||||
| - 微信交流群: |   <div style="display:flex;"> | ||||||
|   <div style="text-align:left"> |   	<div style="padding-right:24px;"> | ||||||
|     <img src="https://s2.loli.net/2021/12/29/m65oExs7yHcPbKZ.jpg" style="width:200px" /> |   		<p>QQ交流群</p> | ||||||
|  |       <img src="https://i.loli.net/2021/11/24/1J6REWXiHomU2kM.jpg" style="width:200px" /> | ||||||
|  |   	</div> | ||||||
|  | 		<div> | ||||||
|  | 			<p>添加本人微信,欢迎来业务咨询(技术交流请加QQ群)</p> | ||||||
|  | 			<img src="https://s2.loli.net/2023/06/07/sVyCUFBvzQ9f5b7.jpg" style="width:200px" /> | ||||||
|  | 		</div> | ||||||
|   </div> |   </div> | ||||||
|  |  | ||||||
| - QQ 群 `711301266` | ## 捐赠 | ||||||
|  |  | ||||||
|   <div style="text-align:left"> | 如果你觉得这个项目对你有帮助,可以请 Soybean 喝杯饮料表示支持,Soybean 开源的动力离不开各位的支持和鼓励。 | ||||||
|     <img src="https://i.loli.net/2021/11/24/1J6REWXiHomU2kM.jpg" style="width:200px" /> |  | ||||||
|   </div> |  | ||||||
|  |  | ||||||
| - 本人微信号:honghuangdc,欢迎来技术交流,业务咨询。 |  | ||||||
|  |  | ||||||
| ## License | ## License | ||||||
|  |  | ||||||
| [MIT © Soybean-2021](./LICENSE) | 本项目基于[MIT © Soybean-2021](./LICENSE) 协议,仅供参考学习,商用时请保留作者的版权信息,作者不对软件做担保和负责。 | ||||||
|   | |||||||
| @@ -3,6 +3,6 @@ import dayjs from 'dayjs'; | |||||||
| /** 项目构建时间 */ | /** 项目构建时间 */ | ||||||
| const PROJECT_BUILD_TIME = JSON.stringify(dayjs().format('YYYY-MM-DD HH:mm:ss')); | const PROJECT_BUILD_TIME = JSON.stringify(dayjs().format('YYYY-MM-DD HH:mm:ss')); | ||||||
| 
 | 
 | ||||||
| export const define = { | export const viteDefine = { | ||||||
|   PROJECT_BUILD_TIME |   PROJECT_BUILD_TIME | ||||||
| }; | }; | ||||||
							
								
								
									
										2
									
								
								build/config/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,2 @@ | |||||||
|  | export * from './define'; | ||||||
|  | export * from './proxy'; | ||||||
							
								
								
									
										20
									
								
								build/config/proxy.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,20 @@ | |||||||
|  | import type { ProxyOptions } from 'vite'; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 设置网络代理 | ||||||
|  |  * @param isOpenProxy - 是否开启代理 | ||||||
|  |  * @param envConfig - env环境配置 | ||||||
|  |  */ | ||||||
|  | export function createViteProxy(isOpenProxy: boolean, envConfig: ServiceEnvConfigWithProxyPattern) { | ||||||
|  |   if (!isOpenProxy) return undefined; | ||||||
|  |  | ||||||
|  |   const proxy: Record<string, string | ProxyOptions> = { | ||||||
|  |     [envConfig.proxyPattern]: { | ||||||
|  |       target: envConfig.url, | ||||||
|  |       changeOrigin: true, | ||||||
|  |       rewrite: path => path.replace(new RegExp(`^${envConfig.proxyPattern}`), '') | ||||||
|  |     } | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   return proxy; | ||||||
|  | } | ||||||
| @@ -1,2 +1,3 @@ | |||||||
| export * from './plugins'; | export * from './plugins'; | ||||||
| export * from './define'; | export * from './config'; | ||||||
|  | export * from './utils'; | ||||||
|   | |||||||
							
								
								
									
										6
									
								
								build/plugins/compress.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,6 @@ | |||||||
|  | import ViteCompression from 'vite-plugin-compression'; | ||||||
|  |  | ||||||
|  | export default (viteEnv: ImportMetaEnv) => { | ||||||
|  |   const { VITE_COMPRESS_TYPE = 'gzip' } = viteEnv; | ||||||
|  |   return ViteCompression({ algorithm: VITE_COMPRESS_TYPE }); | ||||||
|  | }; | ||||||
| @@ -1,17 +0,0 @@ | |||||||
| import { loadEnv } from 'vite'; |  | ||||||
| import type { ConfigEnv, PluginOption } from 'vite'; |  | ||||||
| import { minifyHtml, injectHtml } from 'vite-plugin-html'; // html插件(使用变量、压缩) |  | ||||||
|  |  | ||||||
| export default (config: ConfigEnv): PluginOption[] => { |  | ||||||
|   const viteEnv = loadEnv(config.mode, `.env.${config.mode}`); |  | ||||||
|  |  | ||||||
|   return [ |  | ||||||
|     minifyHtml(), |  | ||||||
|     injectHtml({ |  | ||||||
|       injectData: { |  | ||||||
|         appName: viteEnv.VITE_APP_NAME, |  | ||||||
|         appTitle: viteEnv.VITE_APP_TITLE |  | ||||||
|       } |  | ||||||
|     }) |  | ||||||
|   ]; |  | ||||||
| }; |  | ||||||
| @@ -1,11 +0,0 @@ | |||||||
| import Icons from 'unplugin-icons/vite'; // iconify图标 |  | ||||||
| import IconsResolver from 'unplugin-icons/resolver'; |  | ||||||
| import Components from 'unplugin-vue-components/vite'; // 从指定目录自动导入组件 |  | ||||||
|  |  | ||||||
| export default [ |  | ||||||
|   Components({ |  | ||||||
|     dts: false, |  | ||||||
|     resolvers: [IconsResolver({ componentPrefix: 'icon' })] |  | ||||||
|   }), |  | ||||||
|   Icons({ scale: 1, defaultClass: 'inline-block' }) |  | ||||||
| ]; |  | ||||||
| @@ -1,16 +1,46 @@ | |||||||
| import type { ConfigEnv, PluginOption } from 'vite'; | import type { PluginOption } from 'vite'; | ||||||
| import vue from './vue'; | import vue from '@vitejs/plugin-vue'; | ||||||
| import html from './html'; | import vueJsx from '@vitejs/plugin-vue-jsx'; | ||||||
| import iconify from './iconify'; | import unocss from '@unocss/vite'; | ||||||
| import windicss from './windicss'; | import progress from 'vite-plugin-progress'; | ||||||
|  | import VueDevtools from 'vite-plugin-vue-devtools'; | ||||||
|  | import pageRoute from '@soybeanjs/vite-plugin-vue-page-route'; | ||||||
|  | import unplugin from './unplugin'; | ||||||
| import mock from './mock'; | import mock from './mock'; | ||||||
| import visualizer from './visualizer'; | import visualizer from './visualizer'; | ||||||
|  | import compress from './compress'; | ||||||
|  | import pwa from './pwa'; | ||||||
|  |  | ||||||
| export function setupVitePlugins(configEnv: ConfigEnv): (PluginOption | PluginOption[])[] { | /** | ||||||
|   const plugins = [vue, ...html(configEnv), ...iconify, windicss, mock]; |  * vite插件 | ||||||
|  |  * @param viteEnv - 环境变量配置 | ||||||
|  |  */ | ||||||
|  | export function setupVitePlugins(viteEnv: ImportMetaEnv): (PluginOption | PluginOption[])[] { | ||||||
|  |   const plugins = [ | ||||||
|  |     vue({ | ||||||
|  |       script: { | ||||||
|  |         defineModel: true | ||||||
|  |       } | ||||||
|  |     }), | ||||||
|  |     vueJsx(), | ||||||
|  |     VueDevtools(), | ||||||
|  |     ...unplugin(viteEnv), | ||||||
|  |     unocss(), | ||||||
|  |     mock(viteEnv), | ||||||
|  |     progress() | ||||||
|  |   ]; | ||||||
|  |  | ||||||
|   if (configEnv.command === 'build') { |   if (viteEnv.VITE_VISUALIZER === 'Y') { | ||||||
|     plugins.push(visualizer); |     plugins.push(visualizer as PluginOption); | ||||||
|  |   } | ||||||
|  |   if (viteEnv.VITE_COMPRESS === 'Y') { | ||||||
|  |     plugins.push(compress(viteEnv)); | ||||||
|  |   } | ||||||
|  |   if (viteEnv.VITE_PWA === 'Y' || viteEnv.VITE_VERCEL === 'Y') { | ||||||
|  |     plugins.push(pwa()); | ||||||
|  |   } | ||||||
|  |   if (viteEnv.VITE_SOYBEAN_ROUTE_PLUGIN === 'Y') { | ||||||
|  |     plugins.push(pageRoute()); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   return plugins; |   return plugins; | ||||||
|   | |||||||
| @@ -1,9 +1,14 @@ | |||||||
| import { viteMockServe } from 'vite-plugin-mock'; | import { viteMockServe } from 'vite-plugin-mock'; | ||||||
|  |  | ||||||
| export default viteMockServe({ | export default (viteEnv: ImportMetaEnv) => { | ||||||
|   mockPath: 'mock', |   const prodMock = viteEnv.VITE_PROD_MOCK === 'Y'; | ||||||
|   injectCode: ` |  | ||||||
| 		import { setupMockServer } from '../mock'; |   return viteMockServe({ | ||||||
| 		setupMockServer(); |     mockPath: 'mock', | ||||||
| 	` |     prodEnabled: prodMock, | ||||||
| }); |     injectCode: ` | ||||||
|  | 			import { setupMockServer } from '../mock'; | ||||||
|  | 			setupMockServer(); | ||||||
|  | 		` | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|   | |||||||
							
								
								
									
										31
									
								
								build/plugins/pwa.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,31 @@ | |||||||
|  | import { VitePWA } from 'vite-plugin-pwa'; | ||||||
|  |  | ||||||
|  | export default function setupVitePwa() { | ||||||
|  |   return VitePWA({ | ||||||
|  |     registerType: 'autoUpdate', | ||||||
|  |     includeAssets: ['favicon.ico'], | ||||||
|  |     manifest: { | ||||||
|  |       name: 'SoybeanAdmin', | ||||||
|  |       short_name: 'SoybeanAdmin', | ||||||
|  |       theme_color: '#fff', | ||||||
|  |       icons: [ | ||||||
|  |         { | ||||||
|  |           src: '/logo.png', | ||||||
|  |           sizes: '192x192', | ||||||
|  |           type: 'image/png' | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           src: '/logo.png', | ||||||
|  |           sizes: '512x512', | ||||||
|  |           type: 'image/png' | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           src: '/logo.png', | ||||||
|  |           sizes: '512x512', | ||||||
|  |           type: 'image/png', | ||||||
|  |           purpose: 'any maskable' | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }); | ||||||
|  | } | ||||||
							
								
								
									
										44
									
								
								build/plugins/unplugin.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,44 @@ | |||||||
|  | import Icons from 'unplugin-icons/vite'; | ||||||
|  | import IconsResolver from 'unplugin-icons/resolver'; | ||||||
|  | import Components from 'unplugin-vue-components/vite'; | ||||||
|  | import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'; | ||||||
|  | import { FileSystemIconLoader } from 'unplugin-icons/loaders'; | ||||||
|  | import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'; | ||||||
|  | import { getSrcPath } from '../utils'; | ||||||
|  |  | ||||||
|  | export default function unplugin(viteEnv: ImportMetaEnv) { | ||||||
|  |   const { VITE_ICON_PREFIX, VITE_ICON_LOCAL_PREFIX } = viteEnv; | ||||||
|  |  | ||||||
|  |   const srcPath = getSrcPath(); | ||||||
|  |   const localIconPath = `${srcPath}/assets/svg-icon`; | ||||||
|  |  | ||||||
|  |   /** 本地svg图标集合名称 */ | ||||||
|  |   const collectionName = VITE_ICON_LOCAL_PREFIX.replace(`${VITE_ICON_PREFIX}-`, ''); | ||||||
|  |  | ||||||
|  |   return [ | ||||||
|  |     Icons({ | ||||||
|  |       compiler: 'vue3', | ||||||
|  |       customCollections: { | ||||||
|  |         [collectionName]: FileSystemIconLoader(localIconPath, svg => | ||||||
|  |           svg.replace(/^<svg\s/, '<svg width="1em" height="1em" ') | ||||||
|  |         ) | ||||||
|  |       }, | ||||||
|  |       scale: 1, | ||||||
|  |       defaultClass: 'inline-block' | ||||||
|  |     }), | ||||||
|  |     Components({ | ||||||
|  |       dts: 'src/typings/components.d.ts', | ||||||
|  |       types: [{ from: 'vue-router', names: ['RouterLink', 'RouterView'] }], | ||||||
|  |       resolvers: [ | ||||||
|  |         NaiveUiResolver(), | ||||||
|  |         IconsResolver({ customCollections: [collectionName], componentPrefix: VITE_ICON_PREFIX }) | ||||||
|  |       ] | ||||||
|  |     }), | ||||||
|  |     createSvgIconsPlugin({ | ||||||
|  |       iconDirs: [localIconPath], | ||||||
|  |       symbolId: `${VITE_ICON_LOCAL_PREFIX}-[dir]-[name]`, | ||||||
|  |       inject: 'body-last', | ||||||
|  |       customDomId: '__SVG_ICON_LOCAL__' | ||||||
|  |     }) | ||||||
|  |   ]; | ||||||
|  | } | ||||||
| @@ -2,5 +2,6 @@ import { visualizer } from 'rollup-plugin-visualizer'; | |||||||
|  |  | ||||||
| export default visualizer({ | export default visualizer({ | ||||||
|   gzipSize: true, |   gzipSize: true, | ||||||
|   brotliSize: true |   brotliSize: true, | ||||||
|  |   open: true | ||||||
| }); | }); | ||||||
|   | |||||||
| @@ -1,3 +0,0 @@ | |||||||
| import vue from '@vitejs/plugin-vue'; |  | ||||||
|  |  | ||||||
| export default vue({}); |  | ||||||
| @@ -1,3 +0,0 @@ | |||||||
| import windiCSS from 'vite-plugin-windicss'; |  | ||||||
|  |  | ||||||
| export default windiCSS(); |  | ||||||
							
								
								
									
										20
									
								
								build/utils/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,20 @@ | |||||||
|  | import path from 'path'; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 获取项目根路径 | ||||||
|  |  * @descrition 末尾不带斜杠 | ||||||
|  |  */ | ||||||
|  | export function getRootPath() { | ||||||
|  |   return path.resolve(process.cwd()); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 获取项目src路径 | ||||||
|  |  * @param srcName - src目录名称(默认: "src") | ||||||
|  |  * @descrition 末尾不带斜杠 | ||||||
|  |  */ | ||||||
|  | export function getSrcPath(srcName = 'src') { | ||||||
|  |   const rootPath = getRootPath(); | ||||||
|  |  | ||||||
|  |   return `${rootPath}/${srcName}`; | ||||||
|  | } | ||||||
| @@ -1 +0,0 @@ | |||||||
| module.exports = { extends: ['@commitlint/config-conventional'] }; |  | ||||||
							
								
								
									
										32
									
								
								docker/.dockerignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,32 @@ | |||||||
|  | node_modules | ||||||
|  | .DS_Store | ||||||
|  | dist | ||||||
|  | .npmrc | ||||||
|  | .cache | ||||||
|  |  | ||||||
|  | tests/server/static | ||||||
|  | tests/server/static/upload | ||||||
|  |  | ||||||
|  | .local | ||||||
|  | # local env files | ||||||
|  | .env.local | ||||||
|  | .env.*.local | ||||||
|  | .eslintcache | ||||||
|  |  | ||||||
|  | # Log files | ||||||
|  | npm-debug.log* | ||||||
|  | yarn-debug.log* | ||||||
|  | yarn-error.log* | ||||||
|  | pnpm-debug.log* | ||||||
|  |  | ||||||
|  | # Editor directories and files | ||||||
|  | .idea | ||||||
|  | # .vscode | ||||||
|  | *.suo | ||||||
|  | *.ntvs* | ||||||
|  | *.njsproj | ||||||
|  | *.sln | ||||||
|  | *.sw? | ||||||
|  | yarn.lock | ||||||
|  | pnpm-lock.yaml | ||||||
|  | /vite-profile.cpuprofile | ||||||
							
								
								
									
										24
									
								
								docker/Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,24 @@ | |||||||
|  | FROM node:16.17.0 as builder | ||||||
|  |  | ||||||
|  | ENV WORKDIR=/soybean-admin | ||||||
|  |  | ||||||
|  | WORKDIR $WORKDIR | ||||||
|  |  | ||||||
|  | COPY ./ $WORKDIR/ | ||||||
|  |  | ||||||
|  | ARG version | ||||||
|  | ENV COMMITID=$version | ||||||
|  |  | ||||||
|  | RUN npm i -g pnpm | ||||||
|  |  | ||||||
|  | RUN pnpm install | ||||||
|  | RUN pnpm build | ||||||
|  |  | ||||||
|  | FROM nginx:alpine as prod | ||||||
|  |  | ||||||
|  | RUN mkdir /soybean | ||||||
|  |  | ||||||
|  | COPY --from=builder /soybean-admin/dist /soybean-admin | ||||||
|  | COPY --from=builder /soybean-admin/docker/nginx.conf /etc/nginx/nginx.conf | ||||||
|  |  | ||||||
|  | EXPOSE 80 | ||||||
							
								
								
									
										54
									
								
								docker/nginx.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,54 @@ | |||||||
|  | user  nginx; | ||||||
|  | worker_processes  1; | ||||||
|  | error_log  /var/log/nginx/error.log warn; | ||||||
|  | pid        /var/run/nginx.pid; | ||||||
|  |  | ||||||
|  | events { | ||||||
|  |   worker_connections  1024; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | http { | ||||||
|  |   include       /etc/nginx/mime.types; | ||||||
|  |   default_type  application/octet-stream; | ||||||
|  |   log_format  main  '$remote_addr - $remote_user [$time_local] "$request" ' | ||||||
|  |                     '$status $body_bytes_sent "$http_referer" ' | ||||||
|  |                     '"$http_user_agent" "$http_x_forwarded_for"'; | ||||||
|  |   access_log  /var/log/nginx/access.log  main; | ||||||
|  |   sendfile        on; | ||||||
|  |   keepalive_timeout  65; | ||||||
|  |  | ||||||
|  |   server { | ||||||
|  |     listen       80; | ||||||
|  |     server_name  localhost; | ||||||
|  |  | ||||||
|  |     location / { | ||||||
|  |       # 不缓存html,防止程序更新后缓存继续生效 | ||||||
|  |       if ($request_filename ~* .*\.(?:htm|html)$) { | ||||||
|  |         add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate"; | ||||||
|  |         access_log on; | ||||||
|  |       } | ||||||
|  |       root   /soybean-admin/; | ||||||
|  |       index  index.html index.htm; | ||||||
|  |       try_files $uri $uri/ /index.html; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     # location /soybean/soybean-webserver/v1 { | ||||||
|  |     #     proxy_set_header Host $host; | ||||||
|  |     #     proxy_set_header X-Real-IP $remote_addr; | ||||||
|  |     #     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||||||
|  |     #     proxy_set_header REMOTE-HOST $remote_addr; | ||||||
|  |  | ||||||
|  |     #     # 后台接口地址 | ||||||
|  |     #     proxy_pass http://192.168.1.99:30597/v1; | ||||||
|  |     #     proxy_redirect default; | ||||||
|  |     #     add_header Access-Control-Allow-Origin *; | ||||||
|  |     #     add_header Access-Control-Allow-Headers X-Requested-With; | ||||||
|  |     #     add_header Access-Control-Allow-Methods GET,POST,OPTIONS; | ||||||
|  |     # } | ||||||
|  |  | ||||||
|  |     error_page   500 502 503 504  /50x.html; | ||||||
|  |     location = /50x.html { | ||||||
|  |       root   /usr/share/nginx/html; | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
							
								
								
									
										42
									
								
								index.html
									
									
									
									
									
								
							
							
						
						| @@ -1,30 +1,16 @@ | |||||||
|  | <!-- prettier-ignore --> | ||||||
| <!DOCTYPE html> | <!DOCTYPE html> | ||||||
| <html lang="en"> | <html lang="zh-cmn-Hans"> | ||||||
|   <head> | 	<head> | ||||||
|     <meta charset="UTF-8" /> | 		<meta charset="UTF-8" /> | ||||||
|     <link rel="icon" href="/favicon.ico" /> | 		<link rel="icon" href="/favicon.svg" /> | ||||||
|     <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | 		<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||||||
|     <title><%= appName %></title> | 		<title>%VITE_APP_NAME%</title> | ||||||
|   </head> | 	</head> | ||||||
|   <body> | 	<body> | ||||||
|     <div id="app"> | 		<div id="app"> | ||||||
|       <div class="loading-container"> | 			<div id="appLoading"></div> | ||||||
|         <div id="loadingLogo" class="loading-svg"></div> | 		</div> | ||||||
|         <div class="loading-spin__container"> | 		<script type="module" src="/src/main.ts"></script> | ||||||
|           <div class="loading-spin"> | 	</body> | ||||||
|             <div class="left-0 top-0 loading-spin-item"></div> |  | ||||||
|             <div class="left-0 bottom-0 loading-spin-item loading-delay-500"></div> |  | ||||||
|             <div class="right-0 top-0 loading-spin-item loading-delay-1000"></div> |  | ||||||
|             <div class="right-0 bottom-0 loading-spin-item loading-delay-1500"></div> |  | ||||||
|           </div> |  | ||||||
|         </div> |  | ||||||
|         <h2 class="loading-title"><%= appTitle %></h2> |  | ||||||
|       </div> |  | ||||||
|       <style> |  | ||||||
|         @import '/resource/loading.css'; |  | ||||||
|       </style> |  | ||||||
|       <script src="/resource/loading.js"></script> |  | ||||||
|     </div> |  | ||||||
|     <script type="module" src="/src/main.ts"></script> |  | ||||||
|   </body> |  | ||||||
| </html> | </html> | ||||||
|   | |||||||
							
								
								
									
										151
									
								
								mock/api/auth.ts
									
									
									
									
									
								
							
							
						
						| @@ -1,16 +1,17 @@ | |||||||
| import type { MockMethod } from 'vite-plugin-mock'; | import type { MockMethod } from 'vite-plugin-mock'; | ||||||
|  | import { userModel } from '../model'; | ||||||
|  |  | ||||||
| const token: ApiAuth.Token = { | /** 参数错误的状态码 */ | ||||||
|   token: '__TEMP_TOKEN__', | const ERROR_PARAM_CODE = 10000; | ||||||
|   refreshToken: '__TEMP_REFRESH_TOKEN__' |  | ||||||
| }; | const ERROR_PARAM_MSG = '参数校验失败!'; | ||||||
|  |  | ||||||
| const apis: MockMethod[] = [ | const apis: MockMethod[] = [ | ||||||
|   // 获取验证码 |   // 获取验证码 | ||||||
|   { |   { | ||||||
|     url: '/mock/getSmsCode', |     url: '/mock/getSmsCode', | ||||||
|     method: 'post', |     method: 'post', | ||||||
|     response: (): Service.BackendServiceResult<boolean> => { |     response: (): Service.MockServiceResult<boolean> => { | ||||||
|       return { |       return { | ||||||
|         code: 200, |         code: 200, | ||||||
|         message: 'ok', |         message: 'ok', | ||||||
| @@ -18,73 +19,107 @@ const apis: MockMethod[] = [ | |||||||
|       }; |       }; | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   // 密码登录 |   // 用户+密码 登录 | ||||||
|   { |   { | ||||||
|     url: '/mock/loginByPwd', |     url: '/mock/login', | ||||||
|     method: 'post', |     method: 'post', | ||||||
|     response: (): Service.BackendServiceResult<ApiAuth.Token> => { |     response: (options: Service.MockOption): Service.MockServiceResult<ApiAuth.Token | null> => { | ||||||
|       return { |       const { userName = undefined, password = undefined } = options.body; | ||||||
|         code: 200, |  | ||||||
|         message: 'ok', |       if (!userName || !password) { | ||||||
|         data: token |  | ||||||
|       }; |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|   // 验证码登录 |  | ||||||
|   { |  | ||||||
|     url: '/mock/loginByCode', |  | ||||||
|     method: 'post', |  | ||||||
|     response: (): Service.BackendServiceResult<ApiAuth.Token> => { |  | ||||||
|       return { |  | ||||||
|         code: 200, |  | ||||||
|         message: 'ok', |  | ||||||
|         data: token |  | ||||||
|       }; |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|   // 获取用户信息(请求头携带token) |  | ||||||
|   { |  | ||||||
|     url: '/mock/getUserInfo', |  | ||||||
|     method: 'get', |  | ||||||
|     response: (): Service.BackendServiceResult<ApiAuth.UserInfo> => { |  | ||||||
|       return { |  | ||||||
|         code: 200, |  | ||||||
|         message: 'ok', |  | ||||||
|         data: { |  | ||||||
|           userId: '0', |  | ||||||
|           userName: 'Soybean', |  | ||||||
|           userPhone: '15170283876', |  | ||||||
|           userRole: 'super' |  | ||||||
|         } |  | ||||||
|       }; |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|   { |  | ||||||
|     url: '/mock/testToken', |  | ||||||
|     method: 'post', |  | ||||||
|     response: (option: any): Service.BackendServiceResult<true | null> => { |  | ||||||
|       if (option.headers?.authorization !== token.token) { |  | ||||||
|         return { |         return { | ||||||
|           code: 66666, |           code: ERROR_PARAM_CODE, | ||||||
|           message: 'token 失效', |           message: ERROR_PARAM_MSG, | ||||||
|           data: null |           data: null | ||||||
|         }; |         }; | ||||||
|       } |       } | ||||||
|  |  | ||||||
|  |       const findItem = userModel.find(item => item.userName === userName && item.password === password); | ||||||
|  |  | ||||||
|  |       if (findItem) { | ||||||
|  |         return { | ||||||
|  |           code: 200, | ||||||
|  |           message: 'ok', | ||||||
|  |           data: { | ||||||
|  |             token: findItem.token, | ||||||
|  |             refreshToken: findItem.refreshToken | ||||||
|  |           } | ||||||
|  |         }; | ||||||
|  |       } | ||||||
|       return { |       return { | ||||||
|         code: 200, |         code: 1000, | ||||||
|         message: 'ok', |         message: '用户名或密码错误!', | ||||||
|         data: true |         data: null | ||||||
|  |       }; | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   // 获取用户信息(请求头携带token, 根据token获取用户信息) | ||||||
|  |   { | ||||||
|  |     url: '/mock/getUserInfo', | ||||||
|  |     method: 'get', | ||||||
|  |     response: (options: Service.MockOption): Service.MockServiceResult<ApiAuth.UserInfo | null> => { | ||||||
|  |       // 这里的mock插件得到的字段是authorization, 前端传递的是Authorization字段 | ||||||
|  |       const { authorization = '' } = options.headers; | ||||||
|  |       const REFRESH_TOKEN_CODE = 66666; | ||||||
|  |  | ||||||
|  |       if (!authorization) { | ||||||
|  |         return { | ||||||
|  |           code: REFRESH_TOKEN_CODE, | ||||||
|  |           message: '用户已失效或不存在!', | ||||||
|  |           data: null | ||||||
|  |         }; | ||||||
|  |       } | ||||||
|  |       const userInfo: Auth.UserInfo = { | ||||||
|  |         userId: '', | ||||||
|  |         userName: '', | ||||||
|  |         userRole: 'user' | ||||||
|  |       }; | ||||||
|  |       const isInUser = userModel.some(item => { | ||||||
|  |         const flag = item.token === authorization; | ||||||
|  |         if (flag) { | ||||||
|  |           const { userId: itemUserId, userName, userRole } = item; | ||||||
|  |           Object.assign(userInfo, { userId: itemUserId, userName, userRole }); | ||||||
|  |         } | ||||||
|  |         return flag; | ||||||
|  |       }); | ||||||
|  |  | ||||||
|  |       if (isInUser) { | ||||||
|  |         return { | ||||||
|  |           code: 200, | ||||||
|  |           message: 'ok', | ||||||
|  |           data: userInfo | ||||||
|  |         }; | ||||||
|  |       } | ||||||
|  |  | ||||||
|  |       return { | ||||||
|  |         code: REFRESH_TOKEN_CODE, | ||||||
|  |         message: '用户信息异常!', | ||||||
|  |         data: null | ||||||
|       }; |       }; | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   { |   { | ||||||
|     url: '/mock/updateToken', |     url: '/mock/updateToken', | ||||||
|     method: 'post', |     method: 'post', | ||||||
|     response: (): Service.BackendServiceResult<string> => { |     response: (options: Service.MockOption): Service.MockServiceResult<ApiAuth.Token | null> => { | ||||||
|  |       const { refreshToken = '' } = options.body; | ||||||
|  |  | ||||||
|  |       const findItem = userModel.find(item => item.refreshToken === refreshToken); | ||||||
|  |  | ||||||
|  |       if (findItem) { | ||||||
|  |         return { | ||||||
|  |           code: 200, | ||||||
|  |           message: 'ok', | ||||||
|  |           data: { | ||||||
|  |             token: findItem.token, | ||||||
|  |             refreshToken: findItem.refreshToken | ||||||
|  |           } | ||||||
|  |         }; | ||||||
|  |       } | ||||||
|       return { |       return { | ||||||
|         code: 200, |         code: 3000, | ||||||
|         message: 'ok', |         message: '用户已失效或不存在!', | ||||||
|         data: token.token |         data: null | ||||||
|       }; |       }; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   | |||||||
| @@ -1,4 +1,5 @@ | |||||||
| import auth from './auth'; | import auth from './auth'; | ||||||
| import route from './route'; | import route from './route'; | ||||||
|  | import management from './management'; | ||||||
|  |  | ||||||
| export default [...auth, ...route]; | export default [...auth, ...route, ...management]; | ||||||
|   | |||||||
							
								
								
									
										33
									
								
								mock/api/management.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,33 @@ | |||||||
|  | import { mock } from 'mockjs'; | ||||||
|  | import type { MockMethod } from 'vite-plugin-mock'; | ||||||
|  |  | ||||||
|  | const apis: MockMethod[] = [ | ||||||
|  |   { | ||||||
|  |     url: '/mock/getAllUserList', | ||||||
|  |     method: 'post', | ||||||
|  |     response: (): Service.MockServiceResult<ApiUserManagement.User[]> => { | ||||||
|  |       const data = mock({ | ||||||
|  |         'list|1000': [ | ||||||
|  |           { | ||||||
|  |             id: '@id', | ||||||
|  |             userName: '@cname', | ||||||
|  |             'age|18-56': 56, | ||||||
|  |             'gender|1': ['0', '1', null], | ||||||
|  |             phone: | ||||||
|  |               /^[1](([3][0-9])|([4][01456789])|([5][012356789])|([6][2567])|([7][0-8])|([8][0-9])|([9][012356789]))[0-9]{8}$/, | ||||||
|  |             'email|1': ['@email("qq.com")', null], | ||||||
|  |             'userStatus|1': ['1', '2', '3', '4', null] | ||||||
|  |           } | ||||||
|  |         ] | ||||||
|  |       }); | ||||||
|  |  | ||||||
|  |       return { | ||||||
|  |         code: 200, | ||||||
|  |         message: 'ok', | ||||||
|  |         data: data.list | ||||||
|  |       }; | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | ]; | ||||||
|  |  | ||||||
|  | export default apis; | ||||||
| @@ -1,208 +1,26 @@ | |||||||
| import type { MockMethod } from 'vite-plugin-mock'; | import type { MockMethod } from 'vite-plugin-mock'; | ||||||
|  | import { routeModel, userModel } from '../model'; | ||||||
| const routes: AuthRoute.Route[] = [ |  | ||||||
|   { |  | ||||||
|     name: 'dashboard', |  | ||||||
|     path: '/dashboard', |  | ||||||
|     component: 'basic', |  | ||||||
|     children: [ |  | ||||||
|       { |  | ||||||
|         name: 'dashboard_analysis', |  | ||||||
|         path: '/dashboard/analysis', |  | ||||||
|         component: 'self', |  | ||||||
|         meta: { |  | ||||||
|           title: '分析页' |  | ||||||
|         } |  | ||||||
|       }, |  | ||||||
|       { |  | ||||||
|         name: 'dashboard_workbench', |  | ||||||
|         path: '/dashboard/workbench', |  | ||||||
|         component: 'self', |  | ||||||
|         meta: { |  | ||||||
|           title: '工作台', |  | ||||||
|           permissions: ['super', 'admin'] |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|     ], |  | ||||||
|     meta: { |  | ||||||
|       title: '仪表盘', |  | ||||||
|       requiresAuth: true, |  | ||||||
|       icon: 'carbon:dashboard', |  | ||||||
|       order: 1 |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|   { |  | ||||||
|     name: 'document', |  | ||||||
|     path: '/document', |  | ||||||
|     component: 'basic', |  | ||||||
|     children: [ |  | ||||||
|       { |  | ||||||
|         name: 'document_vue', |  | ||||||
|         path: '/document/vue', |  | ||||||
|         component: 'self', |  | ||||||
|         meta: { |  | ||||||
|           title: 'vue文档' |  | ||||||
|         } |  | ||||||
|       }, |  | ||||||
|       { |  | ||||||
|         name: 'document_vue-new', |  | ||||||
|         path: '/document/vue-new', |  | ||||||
|         component: 'self', |  | ||||||
|         meta: { |  | ||||||
|           title: 'vue文档(新版)' |  | ||||||
|         } |  | ||||||
|       }, |  | ||||||
|       { |  | ||||||
|         name: 'document_vite', |  | ||||||
|         path: '/document/vite', |  | ||||||
|         component: 'self', |  | ||||||
|         meta: { |  | ||||||
|           title: 'vite文档' |  | ||||||
|         } |  | ||||||
|       }, |  | ||||||
|       { |  | ||||||
|         name: 'document_naive', |  | ||||||
|         path: '/document/naive', |  | ||||||
|         component: 'self', |  | ||||||
|         meta: { |  | ||||||
|           title: 'naive文档' |  | ||||||
|         } |  | ||||||
|       }, |  | ||||||
|       { |  | ||||||
|         name: 'document_project', |  | ||||||
|         path: '/document/project', |  | ||||||
|         meta: { |  | ||||||
|           title: '项目文档(外链)', |  | ||||||
|           href: 'https://docs.soybean.pro/' |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|     ], |  | ||||||
|     meta: { |  | ||||||
|       title: '文档', |  | ||||||
|       icon: 'carbon:document', |  | ||||||
|       order: 2 |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|   { |  | ||||||
|     name: 'about', |  | ||||||
|     path: '/about', |  | ||||||
|     component: 'self', |  | ||||||
|     meta: { |  | ||||||
|       title: '关于', |  | ||||||
|       singleLayout: 'basic', |  | ||||||
|       permissions: ['super', 'admin', 'test'], |  | ||||||
|       icon: 'fluent:book-information-24-regular', |  | ||||||
|       order: 7 |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|   { |  | ||||||
|     name: 'exception', |  | ||||||
|     path: '/exception', |  | ||||||
|     component: 'basic', |  | ||||||
|     children: [ |  | ||||||
|       { |  | ||||||
|         name: 'exception_403', |  | ||||||
|         path: '/exception/403', |  | ||||||
|         component: 'self', |  | ||||||
|         meta: { |  | ||||||
|           title: '异常页403' |  | ||||||
|         } |  | ||||||
|       }, |  | ||||||
|       { |  | ||||||
|         name: 'exception_404', |  | ||||||
|         path: '/exception/404', |  | ||||||
|         component: 'self', |  | ||||||
|         meta: { |  | ||||||
|           title: '异常页404' |  | ||||||
|         } |  | ||||||
|       }, |  | ||||||
|       { |  | ||||||
|         name: 'exception_500', |  | ||||||
|         path: '/exception/500', |  | ||||||
|         component: 'self', |  | ||||||
|         meta: { |  | ||||||
|           title: '异常页500' |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|     ], |  | ||||||
|     meta: { |  | ||||||
|       title: '异常页', |  | ||||||
|       icon: 'ant-design:exception-outlined', |  | ||||||
|       order: 5 |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|   { |  | ||||||
|     name: 'multi-menu', |  | ||||||
|     path: '/multi-menu', |  | ||||||
|     component: 'basic', |  | ||||||
|     children: [ |  | ||||||
|       { |  | ||||||
|         name: 'multi-menu_first', |  | ||||||
|         path: '/multi-menu/first', |  | ||||||
|         component: 'multi', |  | ||||||
|         children: [ |  | ||||||
|           { |  | ||||||
|             name: 'multi-menu_first_second', |  | ||||||
|             path: '/multi-menu/first/second', |  | ||||||
|             component: 'self', |  | ||||||
|             meta: { |  | ||||||
|               title: '二级菜单' |  | ||||||
|             } |  | ||||||
|           }, |  | ||||||
|           { |  | ||||||
|             name: 'multi-menu_first_second-new', |  | ||||||
|             path: '/multi-menu/first/second-new', |  | ||||||
|             component: 'multi', |  | ||||||
|             children: [ |  | ||||||
|               { |  | ||||||
|                 name: 'multi-menu_first_second-new_third', |  | ||||||
|                 path: '/multi-menu/first/second-new/third', |  | ||||||
|                 component: 'self', |  | ||||||
|                 meta: { |  | ||||||
|                   title: '三级菜单' |  | ||||||
|                 } |  | ||||||
|               } |  | ||||||
|             ], |  | ||||||
|             meta: { |  | ||||||
|               title: '二级菜单(有子菜单)' |  | ||||||
|             } |  | ||||||
|           } |  | ||||||
|         ], |  | ||||||
|         meta: { |  | ||||||
|           title: '一级菜单' |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|     ], |  | ||||||
|     meta: { |  | ||||||
|       title: '多级菜单', |  | ||||||
|       icon: 'carbon:menu', |  | ||||||
|       order: 6 |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
| ]; |  | ||||||
|  |  | ||||||
| function dataMiddleware(data: AuthRoute.Route[]): ApiRoute.Route { |  | ||||||
|   const routeHomeName: AuthRoute.RouteKey = 'dashboard_analysis'; |  | ||||||
|  |  | ||||||
|   function sortRoutes(sorts: AuthRoute.Route[]) { |  | ||||||
|     return sorts.sort((next, pre) => Number(next.meta?.order) - Number(pre.meta?.order)); |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   return { |  | ||||||
|     routes: sortRoutes(data), |  | ||||||
|     home: routeHomeName |  | ||||||
|   }; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| const apis: MockMethod[] = [ | const apis: MockMethod[] = [ | ||||||
|   { |   { | ||||||
|     url: '/mock/getUserRoutes', |     url: '/mock/getUserRoutes', | ||||||
|     method: 'post', |     method: 'post', | ||||||
|     response: (): Service.BackendServiceResult => { |     response: (options: Service.MockOption): Service.MockServiceResult => { | ||||||
|  |       const { userId = undefined } = options.body; | ||||||
|  |  | ||||||
|  |       const routeHomeName: AuthRoute.LastDegreeRouteKey = 'dashboard_analysis'; | ||||||
|  |  | ||||||
|  |       const role = userModel.find(item => item.userId === userId)?.userRole || 'user'; | ||||||
|  |  | ||||||
|  |       const filterRoutes = routeModel[role]; | ||||||
|  |  | ||||||
|       return { |       return { | ||||||
|         code: 200, |         code: 200, | ||||||
|         message: 'ok', |         message: 'ok', | ||||||
|         data: dataMiddleware(routes) |         data: { | ||||||
|  |           routes: filterRoutes, | ||||||
|  |           home: routeHomeName | ||||||
|  |         } | ||||||
|       }; |       }; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   | |||||||
							
								
								
									
										40
									
								
								mock/model/auth.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,40 @@ | |||||||
|  | interface UserModel extends Auth.UserInfo { | ||||||
|  |   token: string; | ||||||
|  |   refreshToken: string; | ||||||
|  |   password: string; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | export const userModel: UserModel[] = [ | ||||||
|  |   { | ||||||
|  |     token: '__TOKEN_SOYBEAN__', | ||||||
|  |     refreshToken: '__REFRESH_TOKEN_SOYBEAN__', | ||||||
|  |     userId: '0', | ||||||
|  |     userName: 'Soybean', | ||||||
|  |     userRole: 'super', | ||||||
|  |     password: 'soybean123' | ||||||
|  |   }, | ||||||
|  |   { | ||||||
|  |     token: '__TOKEN_SUPER__', | ||||||
|  |     refreshToken: '__REFRESH_TOKEN_SUPER__', | ||||||
|  |     userId: '1', | ||||||
|  |     userName: 'Super', | ||||||
|  |     userRole: 'super', | ||||||
|  |     password: 'super123' | ||||||
|  |   }, | ||||||
|  |   { | ||||||
|  |     token: '__TOKEN_ADMIN__', | ||||||
|  |     refreshToken: '__REFRESH_TOKEN_ADMIN__', | ||||||
|  |     userId: '2', | ||||||
|  |     userName: 'Admin', | ||||||
|  |     userRole: 'admin', | ||||||
|  |     password: 'admin123' | ||||||
|  |   }, | ||||||
|  |   { | ||||||
|  |     token: '__TOKEN_USER01__', | ||||||
|  |     refreshToken: '__REFRESH_TOKEN_USER01__', | ||||||
|  |     userId: '3', | ||||||
|  |     userName: 'User01', | ||||||
|  |     userRole: 'user', | ||||||
|  |     password: 'user01123' | ||||||
|  |   } | ||||||
|  | ]; | ||||||
							
								
								
									
										2
									
								
								mock/model/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,2 @@ | |||||||
|  | export * from './auth'; | ||||||
|  | export * from './route'; | ||||||
							
								
								
									
										1263
									
								
								mock/model/route.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										203
									
								
								package.json
									
									
									
									
									
								
							
							
						
						| @@ -1,85 +1,134 @@ | |||||||
| { | { | ||||||
|   "name": "soybean-admin-thin", |   "name": "soybean-admin", | ||||||
|   "version": "0.1.1", |   "version": "0.10.4", | ||||||
|  |   "description": "A fresh and elegant admin template, based on Vue3、Vite3、TypeScript、NaiveUI and UnoCSS. 一个基于Vue3、Vite3、TypeScript、NaiveUI and UnoCSS的清新优雅的中后台模版。", | ||||||
|  |   "author": { | ||||||
|  |     "name": "Soybean", | ||||||
|  |     "email": "soybeanjs@outlook.com", | ||||||
|  |     "url": "https://github.com/soybeanjs" | ||||||
|  |   }, | ||||||
|  |   "license": "MIT", | ||||||
|  |   "homepage": "https://github.com/honghuangdc/soybean-admin", | ||||||
|  |   "repository": { | ||||||
|  |     "url": "https://github.com/honghuangdc/soybean-admin.git" | ||||||
|  |   }, | ||||||
|  |   "bugs": { | ||||||
|  |     "url": "https://github.com/honghuangdc/soybean-admin/issues" | ||||||
|  |   }, | ||||||
|  |   "keywords": [ | ||||||
|  |     "Vue", | ||||||
|  |     "Vue3", | ||||||
|  |     "admin", | ||||||
|  |     "admin-template", | ||||||
|  |     "vue-admin", | ||||||
|  |     "vue-admin-template", | ||||||
|  |     "Vite3", | ||||||
|  |     "Vite", | ||||||
|  |     "vite-admin", | ||||||
|  |     "TypeScript", | ||||||
|  |     "TS", | ||||||
|  |     "NaiveUI", | ||||||
|  |     "naive-ui", | ||||||
|  |     "naive-admin", | ||||||
|  |     "NaiveUI-Admin", | ||||||
|  |     "naive-ui-admin", | ||||||
|  |     "UnoCSS" | ||||||
|  |   ], | ||||||
|   "scripts": { |   "scripts": { | ||||||
|     "dev": "cross-env VITE_HTTP_ENV=test vite", |     "dev": "cross-env VITE_SERVICE_ENV=dev vite", | ||||||
|     "dev:prod": "cross-env VITE_HTTP_ENV=prod vite", |     "dev:test": "cross-env VITE_SERVICE_ENV=test vite", | ||||||
|     "typecheck": "vue-tsc", |     "dev:prod": "cross-env VITE_SERVICE_ENV=prod vite", | ||||||
|     "build": "npm run typecheck && cross-env VITE_HTTP_ENV=prod vite build", |     "build": "npm run typecheck && cross-env VITE_SERVICE_ENV=prod vite build", | ||||||
|     "build:test": "npm run typecheck && cross-env VITE_HTTP_ENV=test vite build", |     "build:dev": "npm run typecheck && cross-env VITE_SERVICE_ENV=dev vite build", | ||||||
|     "build:vercel": "npm run typecheck && cross-env VITE_HTTP_ENV=prod VITE_IS_VERCEL=1 vite build", |     "build:test": "npm run typecheck && cross-env VITE_SERVICE_ENV=test vite build", | ||||||
|     "preview": "vite preview --port 5050", |     "build:vercel": "cross-env VITE_HASH_ROUTE=Y VITE_VERCEL=Y vite build", | ||||||
|     "release": "standard-version", |     "preview": "vite preview", | ||||||
|     "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md", |     "typecheck": "vue-tsc --noEmit --skipLibCheck", | ||||||
|     "lint": "eslint --fix ./ --ext .vue,.js,jsx,.ts,tsx", |     "lint": "eslint . --fix", | ||||||
|     "prepare": "husky install", |     "format": "soy prettier-write", | ||||||
|     "postinstall": "patch-package" |     "commit": "soy git-commit", | ||||||
|   }, |     "cleanup": "soy cleanup", | ||||||
|   "lint-staged": { |     "update-pkg": "soy ncu", | ||||||
|     "*.{vue,js,jsx,ts,tsx}": "eslint --fix" |     "release": "soy release", | ||||||
|   }, |     "tsx": "tsx", | ||||||
|   "config": { |     "logo": "tsx ./scripts/logo.ts", | ||||||
|     "commitizen": { |     "prepare": "soy init-simple-git-hooks" | ||||||
|       "path": "./node_modules/cz-customizable" |  | ||||||
|     } |  | ||||||
|   }, |   }, | ||||||
|   "dependencies": { |   "dependencies": { | ||||||
|     "@antv/g2plot": "^2.4.7", |     "@antv/data-set": "0.11.8", | ||||||
|     "@better-scroll/core": "^2.4.2", |     "@antv/g2": "4.2.10", | ||||||
|     "@vueuse/core": "^7.5.3", |     "@better-scroll/core": "2.5.1", | ||||||
|     "axios": "^0.25.0", |     "@soybeanjs/vue-materials": "0.2.0", | ||||||
|     "clipboard": "^2.0.8", |     "@vueuse/core": "10.5.0", | ||||||
|     "colord": "^2.9.2", |     "axios": "1.5.1", | ||||||
|     "crypto-js": "^4.1.1", |     "clipboard": "2.0.11", | ||||||
|     "dayjs": "^1.10.7", |     "colord": "2.9.3", | ||||||
|     "form-data": "^4.0.0", |     "crypto-js": "4.1.1", | ||||||
|     "lodash-es": "^4.17.21", |     "dayjs": "1.11.10", | ||||||
|     "naive-ui": "^2.24.1", |     "echarts": "5.4.3", | ||||||
|     "pinia": "^2.0.9", |     "form-data": "4.0.0", | ||||||
|     "qs": "^6.10.3", |     "lodash-es": "4.17.21", | ||||||
|     "vue": "^3.2.26", |     "naive-ui": "2.35.0", | ||||||
|     "vue-router": "^4.0.12" |     "pinia": "2.1.6", | ||||||
|  |     "print-js": "1.6.0", | ||||||
|  |     "qs": "6.11.2", | ||||||
|  |     "socket.io-client": "4.7.2", | ||||||
|  |     "swiper": "10.3.1", | ||||||
|  |     "ua-parser-js": "1.0.36", | ||||||
|  |     "vditor": "3.9.6", | ||||||
|  |     "vue": "3.3.4", | ||||||
|  |     "vue-i18n": "9.5.0", | ||||||
|  |     "vue-router": "4.2.5", | ||||||
|  |     "vuedraggable": "4.1.0", | ||||||
|  |     "wangeditor": "4.7.15", | ||||||
|  |     "xgplayer": "3.0.9" | ||||||
|   }, |   }, | ||||||
|   "devDependencies": { |   "devDependencies": { | ||||||
|     "@commitlint/cli": "^16.0.3", |     "@amap/amap-jsapi-types": "0.0.13", | ||||||
|     "@commitlint/config-conventional": "^16.0.0", |     "@iconify/json": "2.2.128", | ||||||
|     "@iconify/json": "^1.1.458", |     "@iconify/vue": "4.1.1", | ||||||
|     "@iconify/vue": "^3.1.2", |     "@soybeanjs/cli": "0.7.4", | ||||||
|     "@types/crypto-js": "^4.1.0", |     "@soybeanjs/vite-plugin-vue-page-route": "0.0.10", | ||||||
|     "@types/node": "^17.0.10", |     "@types/bmapgl": "0.0.7", | ||||||
|     "@types/qs": "^6.9.7", |     "@types/crypto-js": "4.1.2", | ||||||
|     "@typescript-eslint/eslint-plugin": "^5.10.0", |     "@types/node": "20.8.4", | ||||||
|     "@typescript-eslint/parser": "^5.10.0", |     "@types/qs": "6.9.8", | ||||||
|     "@vitejs/plugin-vue": "^2.0.1", |     "@types/ua-parser-js": "0.7.37", | ||||||
|     "@vue/eslint-config-prettier": "^7.0.0", |     "@unocss/preset-uno": "0.56.5", | ||||||
|     "@vue/eslint-config-typescript": "^10.0.0", |     "@unocss/transformer-directives": "0.56.5", | ||||||
|     "commitizen": "^4.2.4", |     "@unocss/vite": "0.56.5", | ||||||
|     "cross-env": "^7.0.3", |     "@vitejs/plugin-vue": "4.4.0", | ||||||
|     "cz-conventional-changelog": "^3.3.0", |     "@vitejs/plugin-vue-jsx": "3.0.2", | ||||||
|     "cz-customizable": "^6.3.0", |     "cross-env": "7.0.3", | ||||||
|     "eslint": "^8.7.0", |     "eslint": "8.51.0", | ||||||
|     "eslint-config-airbnb-base": "^15.0.0", |     "eslint-config-soybeanjs": "0.5.7", | ||||||
|     "eslint-config-prettier": "^8.3.0", |     "mockjs": "1.1.0", | ||||||
|     "eslint-plugin-import": "^2.25.4", |     "rollup-plugin-visualizer": "5.9.2", | ||||||
|     "eslint-plugin-prettier": "^4.0.0", |     "sass": "1.69.3", | ||||||
|     "eslint-plugin-vue": "^8.3.0", |     "simple-git-hooks": "2.9.0", | ||||||
|     "husky": "^7.0.4", |     "tsx": "3.13.0", | ||||||
|     "lint-staged": "^12.2.1", |     "typescript": "5.2.2", | ||||||
|     "mockjs": "^1.1.0", |     "unplugin-icons": "0.17.0", | ||||||
|     "patch-package": "^6.4.7", |     "unplugin-vue-components": "0.25.2", | ||||||
|     "postinstall-postinstall": "^2.1.0", |     "vite": "4.4.11", | ||||||
|     "prettier": "^2.5.1", |     "vite-plugin-compression": "0.5.1", | ||||||
|     "rollup-plugin-visualizer": "^5.5.4", |     "vite-plugin-mock": "2.9.8", | ||||||
|     "sass": "^1.49.0", |     "vite-plugin-progress": "0.0.7", | ||||||
|     "typescript": "^4.5.4", |     "vite-plugin-pwa": "0.16.5", | ||||||
|     "unplugin-icons": "^0.13.0", |     "vite-plugin-svg-icons": "2.0.1", | ||||||
|     "unplugin-vue-components": "^0.17.13", |     "vite-plugin-vue-devtools": "1.0.0-rc.5", | ||||||
|     "vite": "^2.7.13", |     "vue-tsc": "1.8.19" | ||||||
|     "vite-plugin-html": "^2.1.2", |   }, | ||||||
|     "vite-plugin-mock": "^2.9.6", |   "pnpm": { | ||||||
|     "vite-plugin-windicss": "^1.6.3", |     "patchedDependencies": { | ||||||
|     "vue-tsc": "^0.30.6", |       "mockjs@1.1.0": "patches/mockjs@1.1.0.patch" | ||||||
|     "vueuc": "^0.4.23", |     } | ||||||
|     "windicss": "^3.4.3" |   }, | ||||||
|  |   "simple-git-hooks": { | ||||||
|  |     "commit-msg": "pnpm soy git-commit-verify", | ||||||
|  |     "pre-commit": "pnpm typecheck && pnpm soy lint-staged" | ||||||
|  |   }, | ||||||
|  |   "soybean": { | ||||||
|  |     "useSoybeanToken": true | ||||||
|   } |   } | ||||||
| } | } | ||||||
|   | |||||||
							
								
								
									
										732
									
								
								patches/mockjs@1.1.0.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,732 @@ | |||||||
|  | diff --git a/dist/mock.js b/dist/mock.js | ||||||
|  | index 35d5b9af3eff34324656879705dcb81470fc9697..3e6a52e0fbfdd39d3aaf1592ffd19ecde33320f3 100644 | ||||||
|  | --- a/dist/mock.js | ||||||
|  | +++ b/dist/mock.js | ||||||
|  | @@ -126,17 +126,17 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  /* 1 */ | ||||||
|  |  /***/ (function(module, exports, __webpack_require__) { | ||||||
|  |  | ||||||
|  | -	/* | ||||||
|  | +	/* | ||||||
|  |  	    ## Handler | ||||||
|  |  | ||||||
|  |  	    处理数据模板。 | ||||||
|  | - | ||||||
|  | + | ||||||
|  |  	    * Handler.gen( template, name?, context? ) | ||||||
|  |  | ||||||
|  |  	        入口方法。 | ||||||
|  |  | ||||||
|  |  	    * Data Template Definition, DTD | ||||||
|  | - | ||||||
|  | + | ||||||
|  |  	        处理数据模板定义。 | ||||||
|  |  | ||||||
|  |  	        * Handler.array( options ) | ||||||
|  | @@ -146,7 +146,7 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	        * Handler.string( options ) | ||||||
|  |  	        * Handler.function( options ) | ||||||
|  |  	        * Handler.regexp( options ) | ||||||
|  | - | ||||||
|  | + | ||||||
|  |  	        处理路径(相对和绝对)。 | ||||||
|  |  | ||||||
|  |  	        * Handler.getValueByKeyPath( key, options ) | ||||||
|  | @@ -177,7 +177,7 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  | ||||||
|  |  	    Handle.gen(template, name, options) | ||||||
|  |  	    context | ||||||
|  | -	        currentContext, templateCurrentContext, | ||||||
|  | +	        currentContext, templateCurrentContext, | ||||||
|  |  	        path, templatePath | ||||||
|  |  	        root, templateRoot | ||||||
|  |  	*/ | ||||||
|  | @@ -456,7 +456,7 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	                phed = Handler.placeholder(ph, options.context.currentContext, options.context.templateCurrentContext, options) | ||||||
|  |  | ||||||
|  |  	                // 只有一个占位符,并且没有其他字符 | ||||||
|  | -	                if (placeholders.length === 1 && ph === result && typeof phed !== typeof result) { // | ||||||
|  | +	                if (placeholders.length === 1 && ph === result && typeof phed !== typeof result) { // | ||||||
|  |  	                    result = phed | ||||||
|  |  	                    break | ||||||
|  |  | ||||||
|  | @@ -627,7 +627,7 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	            } | ||||||
|  |  	            // 引用的值已经计算好 | ||||||
|  |  	            if (currentContext && (key in currentContext)) return currentContext[key] | ||||||
|  | - | ||||||
|  | + | ||||||
|  |  	            // 尚未计算,递归引用数据模板中的属性 | ||||||
|  |  	            if (templateCurrentContext && | ||||||
|  |  	                (typeof templateCurrentContext === 'object') && | ||||||
|  | @@ -816,13 +816,13 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	        var tpl = Mock.heredoc(function() { | ||||||
|  |  	            /*! | ||||||
|  |  	        {{email}}{{age}} | ||||||
|  | -	        <!-- Mock { | ||||||
|  | +	        <!-- Mock { | ||||||
|  |  	            email: '@EMAIL', | ||||||
|  |  	            age: '@INT(1,100)' | ||||||
|  |  	        } --> | ||||||
|  |  	            *\/ | ||||||
|  |  	        }) | ||||||
|  | - | ||||||
|  | + | ||||||
|  |  	    **相关阅读** | ||||||
|  |  	    * [Creating multiline strings in JavaScript](http://stackoverflow.com/questions/805107/creating-multiline-strings-in-javascript)、 | ||||||
|  |  	*/ | ||||||
|  | @@ -850,7 +850,7 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  		解析数据模板(属性名部分)。 | ||||||
|  |  | ||||||
|  |  		* Parser.parse( name ) | ||||||
|  | - | ||||||
|  | + | ||||||
|  |  			```json | ||||||
|  |  			{ | ||||||
|  |  				parameters: [ name, inc, range, decimal ], | ||||||
|  | @@ -922,7 +922,7 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  | ||||||
|  |  	/* | ||||||
|  |  	    ## Mock.Random | ||||||
|  | - | ||||||
|  | + | ||||||
|  |  	    工具类,用于生成各种随机数据。 | ||||||
|  |  	*/ | ||||||
|  |  | ||||||
|  | @@ -1251,7 +1251,7 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  | ||||||
|  |  	        替代图片源 | ||||||
|  |  	            http://fpoimg.com/ | ||||||
|  | -	        参考自 | ||||||
|  | +	        参考自 | ||||||
|  |  	            http://rensanning.iteye.com/blog/1933310 | ||||||
|  |  	            http://code.tutsplus.com/articles/the-top-8-placeholders-for-web-designers--net-19485 | ||||||
|  |  	    */ | ||||||
|  | @@ -1541,7 +1541,7 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	        var bg_colour = Math.floor(Math.random() * 16777215).toString(16); | ||||||
|  |  	        bg_colour = "#" + ("000000" + bg_colour).slice(-6); | ||||||
|  |  	        document.bgColor = bg_colour; | ||||||
|  | - | ||||||
|  | + | ||||||
|  |  	    http://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/ | ||||||
|  |  	        Creating random colors is actually more difficult than it seems. The randomness itself is easy, but aesthetically pleasing randomness is more difficult. | ||||||
|  |  	        https://github.com/devongovett/color-generator | ||||||
|  | @@ -1561,7 +1561,7 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  | ||||||
|  |  	    http://tool.c7sky.com/webcolor | ||||||
|  |  	        网页设计常用色彩搭配表 | ||||||
|  | - | ||||||
|  | + | ||||||
|  |  	    https://github.com/One-com/one-color | ||||||
|  |  	        An OO-based JavaScript color parser/computation toolkit with support for RGB, HSV, HSL, CMYK, and alpha channels. | ||||||
|  |  	        API 很赞 | ||||||
|  | @@ -1593,7 +1593,7 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	            color += letters[Math.floor(Math.random() * 16)] | ||||||
|  |  	        } | ||||||
|  |  	        return color | ||||||
|  | - | ||||||
|  | + | ||||||
|  |  	        // 随机生成一个无脑的颜色,格式为 '#RRGGBB'。 | ||||||
|  |  	        // _brainlessColor() | ||||||
|  |  	        var color = Math.floor( | ||||||
|  | @@ -1959,7 +1959,7 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	        } | ||||||
|  |  	        return result.join(' ') | ||||||
|  |  	    }, | ||||||
|  | -	    // | ||||||
|  | +	    // | ||||||
|  |  	    cparagraph: function(min, max) { | ||||||
|  |  	        var len = range(3, 7, min, max) | ||||||
|  |  	        var result = [] | ||||||
|  | @@ -2282,17 +2282,17 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	        随机生成一个 URL。 | ||||||
|  |  | ||||||
|  |  	        [URL 规范](http://www.w3.org/Addressing/URL/url-spec.txt) | ||||||
|  | -	            http                    Hypertext Transfer Protocol | ||||||
|  | -	            ftp                     File Transfer protocol | ||||||
|  | -	            gopher                  The Gopher protocol | ||||||
|  | -	            mailto                  Electronic mail address | ||||||
|  | -	            mid                     Message identifiers for electronic mail | ||||||
|  | -	            cid                     Content identifiers for MIME body part | ||||||
|  | -	            news                    Usenet news | ||||||
|  | -	            nntp                    Usenet news for local NNTP access only | ||||||
|  | -	            prospero                Access using the prospero protocols | ||||||
|  | +	            http                    Hypertext Transfer Protocol | ||||||
|  | +	            ftp                     File Transfer protocol | ||||||
|  | +	            gopher                  The Gopher protocol | ||||||
|  | +	            mailto                  Electronic mail address | ||||||
|  | +	            mid                     Message identifiers for electronic mail | ||||||
|  | +	            cid                     Content identifiers for MIME body part | ||||||
|  | +	            news                    Usenet news | ||||||
|  | +	            nntp                    Usenet news for local NNTP access only | ||||||
|  | +	            prospero                Access using the prospero protocols | ||||||
|  |  	            telnet rlogin tn3270    Reference to interactive sessions | ||||||
|  | -	            wais                    Wide Area Information Servers | ||||||
|  | +	            wais                    Wide Area Information Servers | ||||||
|  |  	    */ | ||||||
|  |  	    url: function(protocol, host) { | ||||||
|  |  	        return (protocol || this.protocol()) + '://' + // protocol? | ||||||
|  | @@ -2422,9 +2422,9 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	    西南   重庆市 四川省 贵州省 云南省 西藏自治区 | ||||||
|  |  	    西北   陕西省 甘肃省 青海省 宁夏回族自治区 新疆维吾尔自治区 | ||||||
|  |  	    港澳台 香港特别行政区 澳门特别行政区 台湾省 | ||||||
|  | - | ||||||
|  | + | ||||||
|  |  	    **排序** | ||||||
|  | - | ||||||
|  | + | ||||||
|  |  	    ```js | ||||||
|  |  	    var map = {} | ||||||
|  |  	    _.each(_.keys(REGIONS),function(id){ | ||||||
|  | @@ -6527,7 +6527,7 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  		                "0" / "1" / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9" / | ||||||
|  |  		                "a" / "b" / "c" / "d" / "e" / "f" / | ||||||
|  |  		                "A" / "B" / "C" / "D" / "E" / "F" | ||||||
|  | - | ||||||
|  | + | ||||||
|  |  		    https://github.com/victorquinn/chancejs/blob/develop/chance.js#L1349 | ||||||
|  |  		*/ | ||||||
|  |  		guid: function() { | ||||||
|  | @@ -6629,7 +6629,7 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	} | ||||||
|  |  | ||||||
|  |  	function CaptureGroup(n) { | ||||||
|  | -	    Group.call(this, "capture-group"), this.index = cgs[this.offset] || (cgs[this.offset] = index++), | ||||||
|  | +	    Group.call(this, "capture-group"), this.index = cgs[this.offset] || (cgs[this.offset] = index++), | ||||||
|  |  	    this.body = n; | ||||||
|  |  	} | ||||||
|  |  | ||||||
|  | @@ -6711,7 +6711,7 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	            } | ||||||
|  |  	            return r = l ? '"' + u(l) + '"' : "end of input", "Expected " + t + " but " + r + " found."; | ||||||
|  |  	        } | ||||||
|  | -	        this.expected = n, this.found = l, this.offset = u, this.line = t, this.column = r, | ||||||
|  | +	        this.expected = n, this.found = l, this.offset = u, this.line = t, this.column = r, | ||||||
|  |  	        this.name = "SyntaxError", this.message = e(n, l); | ||||||
|  |  	    } | ||||||
|  |  	    function u(n) { | ||||||
|  | @@ -6724,8 +6724,8 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	        function r(l) { | ||||||
|  |  	            function u(l, u, t) { | ||||||
|  |  	                var r, e; | ||||||
|  | -	                for (r = u; t > r; r++) e = n.charAt(r), "\n" === e ? (l.seenCR || l.line++, l.column = 1, | ||||||
|  | -	                l.seenCR = !1) : "\r" === e || "\u2028" === e || "\u2029" === e ? (l.line++, l.column = 1, | ||||||
|  | +	                for (r = u; t > r; r++) e = n.charAt(r), "\n" === e ? (l.seenCR || l.line++, l.column = 1, | ||||||
|  | +	                l.seenCR = !1) : "\r" === e || "\u2028" === e || "\u2029" === e ? (l.line++, l.column = 1, | ||||||
|  |  	                l.seenCR = !0) : (l.column++, l.seenCR = !1); | ||||||
|  |  	            } | ||||||
|  |  	            return Mt !== l && (Mt > l && (Mt = 0, Dt = { | ||||||
|  | @@ -6743,19 +6743,19 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	        } | ||||||
|  |  	        function c() { | ||||||
|  |  	            var l, u, t, r, o; | ||||||
|  | -	            return l = qt, u = i(), null !== u ? (t = qt, 124 === n.charCodeAt(qt) ? (r = fl, | ||||||
|  | -	            qt++) : (r = null, 0 === Wt && e(sl)), null !== r ? (o = c(), null !== o ? (r = [ r, o ], | ||||||
|  | -	            t = r) : (qt = t, t = il)) : (qt = t, t = il), null === t && (t = al), null !== t ? (Lt = l, | ||||||
|  | -	            u = hl(u, t), null === u ? (qt = l, l = u) : l = u) : (qt = l, l = il)) : (qt = l, | ||||||
|  | +	            return l = qt, u = i(), null !== u ? (t = qt, 124 === n.charCodeAt(qt) ? (r = fl, | ||||||
|  | +	            qt++) : (r = null, 0 === Wt && e(sl)), null !== r ? (o = c(), null !== o ? (r = [ r, o ], | ||||||
|  | +	            t = r) : (qt = t, t = il)) : (qt = t, t = il), null === t && (t = al), null !== t ? (Lt = l, | ||||||
|  | +	            u = hl(u, t), null === u ? (qt = l, l = u) : l = u) : (qt = l, l = il)) : (qt = l, | ||||||
|  |  	            l = il), l; | ||||||
|  |  	        } | ||||||
|  |  	        function i() { | ||||||
|  |  	            var n, l, u, t, r; | ||||||
|  | -	            if (n = qt, l = f(), null === l && (l = al), null !== l) if (u = qt, Wt++, t = d(), | ||||||
|  | +	            if (n = qt, l = f(), null === l && (l = al), null !== l) if (u = qt, Wt++, t = d(), | ||||||
|  |  	            Wt--, null === t ? u = al : (qt = u, u = il), null !== u) { | ||||||
|  | -	                for (t = [], r = h(), null === r && (r = a()); null !== r; ) t.push(r), r = h(), | ||||||
|  | +	                for (t = [], r = h(), null === r && (r = a()); null !== r; ) t.push(r), r = h(), | ||||||
|  |  	                null === r && (r = a()); | ||||||
|  | -	                null !== t ? (r = s(), null === r && (r = al), null !== r ? (Lt = n, l = dl(l, t, r), | ||||||
|  | +	                null !== t ? (r = s(), null === r && (r = al), null !== r ? (Lt = n, l = dl(l, t, r), | ||||||
|  |  	                null === l ? (qt = n, n = l) : n = l) : (qt = n, n = il)) : (qt = n, n = il); | ||||||
|  |  	            } else qt = n, n = il; else qt = n, n = il; | ||||||
|  |  	            return n; | ||||||
|  | @@ -6766,148 +6766,148 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	        } | ||||||
|  |  	        function f() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, 94 === n.charCodeAt(qt) ? (u = pl, qt++) : (u = null, 0 === Wt && e(vl)), | ||||||
|  | +	            return l = qt, 94 === n.charCodeAt(qt) ? (u = pl, qt++) : (u = null, 0 === Wt && e(vl)), | ||||||
|  |  	            null !== u && (Lt = l, u = wl()), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function s() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, 36 === n.charCodeAt(qt) ? (u = Al, qt++) : (u = null, 0 === Wt && e(Cl)), | ||||||
|  | +	            return l = qt, 36 === n.charCodeAt(qt) ? (u = Al, qt++) : (u = null, 0 === Wt && e(Cl)), | ||||||
|  |  	            null !== u && (Lt = l, u = gl()), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function h() { | ||||||
|  |  	            var n, l, u; | ||||||
|  | -	            return n = qt, l = a(), null !== l ? (u = d(), null !== u ? (Lt = n, l = bl(l, u), | ||||||
|  | +	            return n = qt, l = a(), null !== l ? (u = d(), null !== u ? (Lt = n, l = bl(l, u), | ||||||
|  |  	            null === l ? (qt = n, n = l) : n = l) : (qt = n, n = il)) : (qt = n, n = il), n; | ||||||
|  |  	        } | ||||||
|  |  	        function d() { | ||||||
|  |  	            var n, l, u; | ||||||
|  | -	            return Wt++, n = qt, l = p(), null !== l ? (u = k(), null === u && (u = al), null !== u ? (Lt = n, | ||||||
|  | -	            l = Tl(l, u), null === l ? (qt = n, n = l) : n = l) : (qt = n, n = il)) : (qt = n, | ||||||
|  | +	            return Wt++, n = qt, l = p(), null !== l ? (u = k(), null === u && (u = al), null !== u ? (Lt = n, | ||||||
|  | +	            l = Tl(l, u), null === l ? (qt = n, n = l) : n = l) : (qt = n, n = il)) : (qt = n, | ||||||
|  |  	            n = il), Wt--, null === n && (l = null, 0 === Wt && e(kl)), n; | ||||||
|  |  	        } | ||||||
|  |  	        function p() { | ||||||
|  |  	            var n; | ||||||
|  | -	            return n = v(), null === n && (n = w(), null === n && (n = A(), null === n && (n = C(), | ||||||
|  | +	            return n = v(), null === n && (n = w(), null === n && (n = A(), null === n && (n = C(), | ||||||
|  |  	            null === n && (n = g(), null === n && (n = b()))))), n; | ||||||
|  |  	        } | ||||||
|  |  	        function v() { | ||||||
|  |  	            var l, u, t, r, o, c; | ||||||
|  | -	            return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)), | ||||||
|  | -	            null !== u ? (t = T(), null !== t ? (44 === n.charCodeAt(qt) ? (r = ml, qt++) : (r = null, | ||||||
|  | -	            0 === Wt && e(Rl)), null !== r ? (o = T(), null !== o ? (125 === n.charCodeAt(qt) ? (c = Fl, | ||||||
|  | -	            qt++) : (c = null, 0 === Wt && e(Ql)), null !== c ? (Lt = l, u = Sl(t, o), null === u ? (qt = l, | ||||||
|  | -	            l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, | ||||||
|  | +	            return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)), | ||||||
|  | +	            null !== u ? (t = T(), null !== t ? (44 === n.charCodeAt(qt) ? (r = ml, qt++) : (r = null, | ||||||
|  | +	            0 === Wt && e(Rl)), null !== r ? (o = T(), null !== o ? (125 === n.charCodeAt(qt) ? (c = Fl, | ||||||
|  | +	            qt++) : (c = null, 0 === Wt && e(Ql)), null !== c ? (Lt = l, u = Sl(t, o), null === u ? (qt = l, | ||||||
|  | +	            l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, | ||||||
|  |  	            l = il)) : (qt = l, l = il), l; | ||||||
|  |  	        } | ||||||
|  |  	        function w() { | ||||||
|  |  	            var l, u, t, r; | ||||||
|  | -	            return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)), | ||||||
|  | -	            null !== u ? (t = T(), null !== t ? (n.substr(qt, 2) === Ul ? (r = Ul, qt += 2) : (r = null, | ||||||
|  | -	            0 === Wt && e(El)), null !== r ? (Lt = l, u = Gl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  | +	            return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)), | ||||||
|  | +	            null !== u ? (t = T(), null !== t ? (n.substr(qt, 2) === Ul ? (r = Ul, qt += 2) : (r = null, | ||||||
|  | +	            0 === Wt && e(El)), null !== r ? (Lt = l, u = Gl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  |  	            l = il)) : (qt = l, l = il)) : (qt = l, l = il), l; | ||||||
|  |  	        } | ||||||
|  |  	        function A() { | ||||||
|  |  	            var l, u, t, r; | ||||||
|  | -	            return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)), | ||||||
|  | -	            null !== u ? (t = T(), null !== t ? (125 === n.charCodeAt(qt) ? (r = Fl, qt++) : (r = null, | ||||||
|  | -	            0 === Wt && e(Ql)), null !== r ? (Lt = l, u = Bl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  | +	            return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)), | ||||||
|  | +	            null !== u ? (t = T(), null !== t ? (125 === n.charCodeAt(qt) ? (r = Fl, qt++) : (r = null, | ||||||
|  | +	            0 === Wt && e(Ql)), null !== r ? (Lt = l, u = Bl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  |  	            l = il)) : (qt = l, l = il)) : (qt = l, l = il), l; | ||||||
|  |  	        } | ||||||
|  |  	        function C() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, 43 === n.charCodeAt(qt) ? (u = jl, qt++) : (u = null, 0 === Wt && e($l)), | ||||||
|  | +	            return l = qt, 43 === n.charCodeAt(qt) ? (u = jl, qt++) : (u = null, 0 === Wt && e($l)), | ||||||
|  |  	            null !== u && (Lt = l, u = ql()), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function g() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, 42 === n.charCodeAt(qt) ? (u = Ll, qt++) : (u = null, 0 === Wt && e(Ml)), | ||||||
|  | +	            return l = qt, 42 === n.charCodeAt(qt) ? (u = Ll, qt++) : (u = null, 0 === Wt && e(Ml)), | ||||||
|  |  	            null !== u && (Lt = l, u = Dl()), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function b() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, 63 === n.charCodeAt(qt) ? (u = Hl, qt++) : (u = null, 0 === Wt && e(Ol)), | ||||||
|  | +	            return l = qt, 63 === n.charCodeAt(qt) ? (u = Hl, qt++) : (u = null, 0 === Wt && e(Ol)), | ||||||
|  |  	            null !== u && (Lt = l, u = Wl()), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function k() { | ||||||
|  |  	            var l; | ||||||
|  | -	            return 63 === n.charCodeAt(qt) ? (l = Hl, qt++) : (l = null, 0 === Wt && e(Ol)), | ||||||
|  | +	            return 63 === n.charCodeAt(qt) ? (l = Hl, qt++) : (l = null, 0 === Wt && e(Ol)), | ||||||
|  |  	            l; | ||||||
|  |  	        } | ||||||
|  |  	        function T() { | ||||||
|  |  	            var l, u, t; | ||||||
|  | -	            if (l = qt, u = [], zl.test(n.charAt(qt)) ? (t = n.charAt(qt), qt++) : (t = null, | ||||||
|  | -	            0 === Wt && e(Il)), null !== t) for (;null !== t; ) u.push(t), zl.test(n.charAt(qt)) ? (t = n.charAt(qt), | ||||||
|  | +	            if (l = qt, u = [], zl.test(n.charAt(qt)) ? (t = n.charAt(qt), qt++) : (t = null, | ||||||
|  | +	            0 === Wt && e(Il)), null !== t) for (;null !== t; ) u.push(t), zl.test(n.charAt(qt)) ? (t = n.charAt(qt), | ||||||
|  |  	            qt++) : (t = null, 0 === Wt && e(Il)); else u = il; | ||||||
|  | -	            return null !== u && (Lt = l, u = Jl(u)), null === u ? (qt = l, l = u) : l = u, | ||||||
|  | +	            return null !== u && (Lt = l, u = Jl(u)), null === u ? (qt = l, l = u) : l = u, | ||||||
|  |  	            l; | ||||||
|  |  	        } | ||||||
|  |  	        function x() { | ||||||
|  |  	            var l, u, t, r; | ||||||
|  | -	            return l = qt, 40 === n.charCodeAt(qt) ? (u = Kl, qt++) : (u = null, 0 === Wt && e(Nl)), | ||||||
|  | -	            null !== u ? (t = R(), null === t && (t = F(), null === t && (t = m(), null === t && (t = y()))), | ||||||
|  | -	            null !== t ? (41 === n.charCodeAt(qt) ? (r = Pl, qt++) : (r = null, 0 === Wt && e(Vl)), | ||||||
|  | -	            null !== r ? (Lt = l, u = Xl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  | +	            return l = qt, 40 === n.charCodeAt(qt) ? (u = Kl, qt++) : (u = null, 0 === Wt && e(Nl)), | ||||||
|  | +	            null !== u ? (t = R(), null === t && (t = F(), null === t && (t = m(), null === t && (t = y()))), | ||||||
|  | +	            null !== t ? (41 === n.charCodeAt(qt) ? (r = Pl, qt++) : (r = null, 0 === Wt && e(Vl)), | ||||||
|  | +	            null !== r ? (Lt = l, u = Xl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  |  	            l = il)) : (qt = l, l = il)) : (qt = l, l = il), l; | ||||||
|  |  	        } | ||||||
|  |  	        function y() { | ||||||
|  |  	            var n, l; | ||||||
|  | -	            return n = qt, l = c(), null !== l && (Lt = n, l = Yl(l)), null === l ? (qt = n, | ||||||
|  | +	            return n = qt, l = c(), null !== l && (Lt = n, l = Yl(l)), null === l ? (qt = n, | ||||||
|  |  	            n = l) : n = l, n; | ||||||
|  |  	        } | ||||||
|  |  	        function m() { | ||||||
|  |  	            var l, u, t; | ||||||
|  | -	            return l = qt, n.substr(qt, 2) === Zl ? (u = Zl, qt += 2) : (u = null, 0 === Wt && e(_l)), | ||||||
|  | -	            null !== u ? (t = c(), null !== t ? (Lt = l, u = nu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  | +	            return l = qt, n.substr(qt, 2) === Zl ? (u = Zl, qt += 2) : (u = null, 0 === Wt && e(_l)), | ||||||
|  | +	            null !== u ? (t = c(), null !== t ? (Lt = l, u = nu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  |  	            l = il)) : (qt = l, l = il), l; | ||||||
|  |  	        } | ||||||
|  |  	        function R() { | ||||||
|  |  	            var l, u, t; | ||||||
|  | -	            return l = qt, n.substr(qt, 2) === lu ? (u = lu, qt += 2) : (u = null, 0 === Wt && e(uu)), | ||||||
|  | -	            null !== u ? (t = c(), null !== t ? (Lt = l, u = tu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  | +	            return l = qt, n.substr(qt, 2) === lu ? (u = lu, qt += 2) : (u = null, 0 === Wt && e(uu)), | ||||||
|  | +	            null !== u ? (t = c(), null !== t ? (Lt = l, u = tu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  |  	            l = il)) : (qt = l, l = il), l; | ||||||
|  |  	        } | ||||||
|  |  	        function F() { | ||||||
|  |  	            var l, u, t; | ||||||
|  | -	            return l = qt, n.substr(qt, 2) === ru ? (u = ru, qt += 2) : (u = null, 0 === Wt && e(eu)), | ||||||
|  | -	            null !== u ? (t = c(), null !== t ? (Lt = l, u = ou(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  | +	            return l = qt, n.substr(qt, 2) === ru ? (u = ru, qt += 2) : (u = null, 0 === Wt && e(eu)), | ||||||
|  | +	            null !== u ? (t = c(), null !== t ? (Lt = l, u = ou(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  |  	            l = il)) : (qt = l, l = il), l; | ||||||
|  |  	        } | ||||||
|  |  	        function Q() { | ||||||
|  |  	            var l, u, t, r, o; | ||||||
|  | -	            if (Wt++, l = qt, 91 === n.charCodeAt(qt) ? (u = iu, qt++) : (u = null, 0 === Wt && e(au)), | ||||||
|  | -	            null !== u) if (94 === n.charCodeAt(qt) ? (t = pl, qt++) : (t = null, 0 === Wt && e(vl)), | ||||||
|  | +	            if (Wt++, l = qt, 91 === n.charCodeAt(qt) ? (u = iu, qt++) : (u = null, 0 === Wt && e(au)), | ||||||
|  | +	            null !== u) if (94 === n.charCodeAt(qt) ? (t = pl, qt++) : (t = null, 0 === Wt && e(vl)), | ||||||
|  |  	            null === t && (t = al), null !== t) { | ||||||
|  | -	                for (r = [], o = S(), null === o && (o = U()); null !== o; ) r.push(o), o = S(), | ||||||
|  | +	                for (r = [], o = S(), null === o && (o = U()); null !== o; ) r.push(o), o = S(), | ||||||
|  |  	                null === o && (o = U()); | ||||||
|  | -	                null !== r ? (93 === n.charCodeAt(qt) ? (o = fu, qt++) : (o = null, 0 === Wt && e(su)), | ||||||
|  | -	                null !== o ? (Lt = l, u = hu(t, r), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  | +	                null !== r ? (93 === n.charCodeAt(qt) ? (o = fu, qt++) : (o = null, 0 === Wt && e(su)), | ||||||
|  | +	                null !== o ? (Lt = l, u = hu(t, r), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  |  	                l = il)) : (qt = l, l = il); | ||||||
|  |  	            } else qt = l, l = il; else qt = l, l = il; | ||||||
|  |  	            return Wt--, null === l && (u = null, 0 === Wt && e(cu)), l; | ||||||
|  |  	        } | ||||||
|  |  	        function S() { | ||||||
|  |  	            var l, u, t, r; | ||||||
|  | -	            return Wt++, l = qt, u = U(), null !== u ? (45 === n.charCodeAt(qt) ? (t = pu, qt++) : (t = null, | ||||||
|  | -	            0 === Wt && e(vu)), null !== t ? (r = U(), null !== r ? (Lt = l, u = wu(u, r), null === u ? (qt = l, | ||||||
|  | -	            l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, l = il), Wt--, | ||||||
|  | +	            return Wt++, l = qt, u = U(), null !== u ? (45 === n.charCodeAt(qt) ? (t = pu, qt++) : (t = null, | ||||||
|  | +	            0 === Wt && e(vu)), null !== t ? (r = U(), null !== r ? (Lt = l, u = wu(u, r), null === u ? (qt = l, | ||||||
|  | +	            l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, l = il), Wt--, | ||||||
|  |  	            null === l && (u = null, 0 === Wt && e(du)), l; | ||||||
|  |  	        } | ||||||
|  |  	        function U() { | ||||||
|  |  	            var n, l; | ||||||
|  | -	            return Wt++, n = G(), null === n && (n = E()), Wt--, null === n && (l = null, 0 === Wt && e(Au)), | ||||||
|  | +	            return Wt++, n = G(), null === n && (n = E()), Wt--, null === n && (l = null, 0 === Wt && e(Au)), | ||||||
|  |  	            n; | ||||||
|  |  	        } | ||||||
|  |  	        function E() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, Cu.test(n.charAt(qt)) ? (u = n.charAt(qt), qt++) : (u = null, 0 === Wt && e(gu)), | ||||||
|  | +	            return l = qt, Cu.test(n.charAt(qt)) ? (u = n.charAt(qt), qt++) : (u = null, 0 === Wt && e(gu)), | ||||||
|  |  	            null !== u && (Lt = l, u = bu(u)), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function G() { | ||||||
|  |  	            var n; | ||||||
|  | -	            return n = L(), null === n && (n = Y(), null === n && (n = H(), null === n && (n = O(), | ||||||
|  | -	            null === n && (n = W(), null === n && (n = z(), null === n && (n = I(), null === n && (n = J(), | ||||||
|  | -	            null === n && (n = K(), null === n && (n = N(), null === n && (n = P(), null === n && (n = V(), | ||||||
|  | -	            null === n && (n = X(), null === n && (n = _(), null === n && (n = nl(), null === n && (n = ll(), | ||||||
|  | +	            return n = L(), null === n && (n = Y(), null === n && (n = H(), null === n && (n = O(), | ||||||
|  | +	            null === n && (n = W(), null === n && (n = z(), null === n && (n = I(), null === n && (n = J(), | ||||||
|  | +	            null === n && (n = K(), null === n && (n = N(), null === n && (n = P(), null === n && (n = V(), | ||||||
|  | +	            null === n && (n = X(), null === n && (n = _(), null === n && (n = nl(), null === n && (n = ll(), | ||||||
|  |  	            null === n && (n = ul(), null === n && (n = tl()))))))))))))))))), n; | ||||||
|  |  	        } | ||||||
|  |  	        function B() { | ||||||
|  | @@ -6916,154 +6916,154 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	        } | ||||||
|  |  	        function j() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, 46 === n.charCodeAt(qt) ? (u = ku, qt++) : (u = null, 0 === Wt && e(Tu)), | ||||||
|  | +	            return l = qt, 46 === n.charCodeAt(qt) ? (u = ku, qt++) : (u = null, 0 === Wt && e(Tu)), | ||||||
|  |  	            null !== u && (Lt = l, u = xu()), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function $() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return Wt++, l = qt, mu.test(n.charAt(qt)) ? (u = n.charAt(qt), qt++) : (u = null, | ||||||
|  | -	            0 === Wt && e(Ru)), null !== u && (Lt = l, u = bu(u)), null === u ? (qt = l, l = u) : l = u, | ||||||
|  | +	            return Wt++, l = qt, mu.test(n.charAt(qt)) ? (u = n.charAt(qt), qt++) : (u = null, | ||||||
|  | +	            0 === Wt && e(Ru)), null !== u && (Lt = l, u = bu(u)), null === u ? (qt = l, l = u) : l = u, | ||||||
|  |  	            Wt--, null === l && (u = null, 0 === Wt && e(yu)), l; | ||||||
|  |  	        } | ||||||
|  |  	        function q() { | ||||||
|  |  	            var n; | ||||||
|  | -	            return n = M(), null === n && (n = D(), null === n && (n = Y(), null === n && (n = H(), | ||||||
|  | -	            null === n && (n = O(), null === n && (n = W(), null === n && (n = z(), null === n && (n = I(), | ||||||
|  | -	            null === n && (n = J(), null === n && (n = K(), null === n && (n = N(), null === n && (n = P(), | ||||||
|  | -	            null === n && (n = V(), null === n && (n = X(), null === n && (n = Z(), null === n && (n = _(), | ||||||
|  | -	            null === n && (n = nl(), null === n && (n = ll(), null === n && (n = ul(), null === n && (n = tl()))))))))))))))))))), | ||||||
|  | +	            return n = M(), null === n && (n = D(), null === n && (n = Y(), null === n && (n = H(), | ||||||
|  | +	            null === n && (n = O(), null === n && (n = W(), null === n && (n = z(), null === n && (n = I(), | ||||||
|  | +	            null === n && (n = J(), null === n && (n = K(), null === n && (n = N(), null === n && (n = P(), | ||||||
|  | +	            null === n && (n = V(), null === n && (n = X(), null === n && (n = Z(), null === n && (n = _(), | ||||||
|  | +	            null === n && (n = nl(), null === n && (n = ll(), null === n && (n = ul(), null === n && (n = tl()))))))))))))))))))), | ||||||
|  |  	            n; | ||||||
|  |  	        } | ||||||
|  |  	        function L() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, n.substr(qt, 2) === Fu ? (u = Fu, qt += 2) : (u = null, 0 === Wt && e(Qu)), | ||||||
|  | +	            return l = qt, n.substr(qt, 2) === Fu ? (u = Fu, qt += 2) : (u = null, 0 === Wt && e(Qu)), | ||||||
|  |  	            null !== u && (Lt = l, u = Su()), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function M() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, n.substr(qt, 2) === Fu ? (u = Fu, qt += 2) : (u = null, 0 === Wt && e(Qu)), | ||||||
|  | +	            return l = qt, n.substr(qt, 2) === Fu ? (u = Fu, qt += 2) : (u = null, 0 === Wt && e(Qu)), | ||||||
|  |  	            null !== u && (Lt = l, u = Uu()), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function D() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, n.substr(qt, 2) === Eu ? (u = Eu, qt += 2) : (u = null, 0 === Wt && e(Gu)), | ||||||
|  | +	            return l = qt, n.substr(qt, 2) === Eu ? (u = Eu, qt += 2) : (u = null, 0 === Wt && e(Gu)), | ||||||
|  |  	            null !== u && (Lt = l, u = Bu()), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function H() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, n.substr(qt, 2) === ju ? (u = ju, qt += 2) : (u = null, 0 === Wt && e($u)), | ||||||
|  | +	            return l = qt, n.substr(qt, 2) === ju ? (u = ju, qt += 2) : (u = null, 0 === Wt && e($u)), | ||||||
|  |  	            null !== u && (Lt = l, u = qu()), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function O() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, n.substr(qt, 2) === Lu ? (u = Lu, qt += 2) : (u = null, 0 === Wt && e(Mu)), | ||||||
|  | +	            return l = qt, n.substr(qt, 2) === Lu ? (u = Lu, qt += 2) : (u = null, 0 === Wt && e(Mu)), | ||||||
|  |  	            null !== u && (Lt = l, u = Du()), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function W() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, n.substr(qt, 2) === Hu ? (u = Hu, qt += 2) : (u = null, 0 === Wt && e(Ou)), | ||||||
|  | +	            return l = qt, n.substr(qt, 2) === Hu ? (u = Hu, qt += 2) : (u = null, 0 === Wt && e(Ou)), | ||||||
|  |  	            null !== u && (Lt = l, u = Wu()), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function z() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, n.substr(qt, 2) === zu ? (u = zu, qt += 2) : (u = null, 0 === Wt && e(Iu)), | ||||||
|  | +	            return l = qt, n.substr(qt, 2) === zu ? (u = zu, qt += 2) : (u = null, 0 === Wt && e(Iu)), | ||||||
|  |  	            null !== u && (Lt = l, u = Ju()), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function I() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, n.substr(qt, 2) === Ku ? (u = Ku, qt += 2) : (u = null, 0 === Wt && e(Nu)), | ||||||
|  | +	            return l = qt, n.substr(qt, 2) === Ku ? (u = Ku, qt += 2) : (u = null, 0 === Wt && e(Nu)), | ||||||
|  |  	            null !== u && (Lt = l, u = Pu()), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function J() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, n.substr(qt, 2) === Vu ? (u = Vu, qt += 2) : (u = null, 0 === Wt && e(Xu)), | ||||||
|  | +	            return l = qt, n.substr(qt, 2) === Vu ? (u = Vu, qt += 2) : (u = null, 0 === Wt && e(Xu)), | ||||||
|  |  	            null !== u && (Lt = l, u = Yu()), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function K() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, n.substr(qt, 2) === Zu ? (u = Zu, qt += 2) : (u = null, 0 === Wt && e(_u)), | ||||||
|  | +	            return l = qt, n.substr(qt, 2) === Zu ? (u = Zu, qt += 2) : (u = null, 0 === Wt && e(_u)), | ||||||
|  |  	            null !== u && (Lt = l, u = nt()), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function N() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, n.substr(qt, 2) === lt ? (u = lt, qt += 2) : (u = null, 0 === Wt && e(ut)), | ||||||
|  | +	            return l = qt, n.substr(qt, 2) === lt ? (u = lt, qt += 2) : (u = null, 0 === Wt && e(ut)), | ||||||
|  |  	            null !== u && (Lt = l, u = tt()), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function P() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, n.substr(qt, 2) === rt ? (u = rt, qt += 2) : (u = null, 0 === Wt && e(et)), | ||||||
|  | +	            return l = qt, n.substr(qt, 2) === rt ? (u = rt, qt += 2) : (u = null, 0 === Wt && e(et)), | ||||||
|  |  	            null !== u && (Lt = l, u = ot()), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function V() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, n.substr(qt, 2) === ct ? (u = ct, qt += 2) : (u = null, 0 === Wt && e(it)), | ||||||
|  | +	            return l = qt, n.substr(qt, 2) === ct ? (u = ct, qt += 2) : (u = null, 0 === Wt && e(it)), | ||||||
|  |  	            null !== u && (Lt = l, u = at()), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function X() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, n.substr(qt, 2) === ft ? (u = ft, qt += 2) : (u = null, 0 === Wt && e(st)), | ||||||
|  | +	            return l = qt, n.substr(qt, 2) === ft ? (u = ft, qt += 2) : (u = null, 0 === Wt && e(st)), | ||||||
|  |  	            null !== u && (Lt = l, u = ht()), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function Y() { | ||||||
|  |  	            var l, u, t; | ||||||
|  | -	            return l = qt, n.substr(qt, 2) === dt ? (u = dt, qt += 2) : (u = null, 0 === Wt && e(pt)), | ||||||
|  | -	            null !== u ? (n.length > qt ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(vt)), | ||||||
|  | -	            null !== t ? (Lt = l, u = wt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  | +	            return l = qt, n.substr(qt, 2) === dt ? (u = dt, qt += 2) : (u = null, 0 === Wt && e(pt)), | ||||||
|  | +	            null !== u ? (n.length > qt ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(vt)), | ||||||
|  | +	            null !== t ? (Lt = l, u = wt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  |  	            l = il)) : (qt = l, l = il), l; | ||||||
|  |  	        } | ||||||
|  |  	        function Z() { | ||||||
|  |  	            var l, u, t; | ||||||
|  | -	            return l = qt, 92 === n.charCodeAt(qt) ? (u = At, qt++) : (u = null, 0 === Wt && e(Ct)), | ||||||
|  | -	            null !== u ? (gt.test(n.charAt(qt)) ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(bt)), | ||||||
|  | -	            null !== t ? (Lt = l, u = kt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  | +	            return l = qt, 92 === n.charCodeAt(qt) ? (u = At, qt++) : (u = null, 0 === Wt && e(Ct)), | ||||||
|  | +	            null !== u ? (gt.test(n.charAt(qt)) ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(bt)), | ||||||
|  | +	            null !== t ? (Lt = l, u = kt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  |  	            l = il)) : (qt = l, l = il), l; | ||||||
|  |  	        } | ||||||
|  |  	        function _() { | ||||||
|  |  	            var l, u, t, r; | ||||||
|  | -	            if (l = qt, n.substr(qt, 2) === Tt ? (u = Tt, qt += 2) : (u = null, 0 === Wt && e(xt)), | ||||||
|  | +	            if (l = qt, n.substr(qt, 2) === Tt ? (u = Tt, qt += 2) : (u = null, 0 === Wt && e(xt)), | ||||||
|  |  	            null !== u) { | ||||||
|  | -	                if (t = [], yt.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(mt)), | ||||||
|  | -	                null !== r) for (;null !== r; ) t.push(r), yt.test(n.charAt(qt)) ? (r = n.charAt(qt), | ||||||
|  | +	                if (t = [], yt.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(mt)), | ||||||
|  | +	                null !== r) for (;null !== r; ) t.push(r), yt.test(n.charAt(qt)) ? (r = n.charAt(qt), | ||||||
|  |  	                qt++) : (r = null, 0 === Wt && e(mt)); else t = il; | ||||||
|  | -	                null !== t ? (Lt = l, u = Rt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  | +	                null !== t ? (Lt = l, u = Rt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  |  	                l = il); | ||||||
|  |  	            } else qt = l, l = il; | ||||||
|  |  	            return l; | ||||||
|  |  	        } | ||||||
|  |  	        function nl() { | ||||||
|  |  	            var l, u, t, r; | ||||||
|  | -	            if (l = qt, n.substr(qt, 2) === Ft ? (u = Ft, qt += 2) : (u = null, 0 === Wt && e(Qt)), | ||||||
|  | +	            if (l = qt, n.substr(qt, 2) === Ft ? (u = Ft, qt += 2) : (u = null, 0 === Wt && e(Qt)), | ||||||
|  |  	            null !== u) { | ||||||
|  | -	                if (t = [], St.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(Ut)), | ||||||
|  | -	                null !== r) for (;null !== r; ) t.push(r), St.test(n.charAt(qt)) ? (r = n.charAt(qt), | ||||||
|  | +	                if (t = [], St.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(Ut)), | ||||||
|  | +	                null !== r) for (;null !== r; ) t.push(r), St.test(n.charAt(qt)) ? (r = n.charAt(qt), | ||||||
|  |  	                qt++) : (r = null, 0 === Wt && e(Ut)); else t = il; | ||||||
|  | -	                null !== t ? (Lt = l, u = Et(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  | +	                null !== t ? (Lt = l, u = Et(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  |  	                l = il); | ||||||
|  |  	            } else qt = l, l = il; | ||||||
|  |  	            return l; | ||||||
|  |  	        } | ||||||
|  |  	        function ll() { | ||||||
|  |  	            var l, u, t, r; | ||||||
|  | -	            if (l = qt, n.substr(qt, 2) === Gt ? (u = Gt, qt += 2) : (u = null, 0 === Wt && e(Bt)), | ||||||
|  | +	            if (l = qt, n.substr(qt, 2) === Gt ? (u = Gt, qt += 2) : (u = null, 0 === Wt && e(Bt)), | ||||||
|  |  	            null !== u) { | ||||||
|  | -	                if (t = [], St.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(Ut)), | ||||||
|  | -	                null !== r) for (;null !== r; ) t.push(r), St.test(n.charAt(qt)) ? (r = n.charAt(qt), | ||||||
|  | +	                if (t = [], St.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(Ut)), | ||||||
|  | +	                null !== r) for (;null !== r; ) t.push(r), St.test(n.charAt(qt)) ? (r = n.charAt(qt), | ||||||
|  |  	                qt++) : (r = null, 0 === Wt && e(Ut)); else t = il; | ||||||
|  | -	                null !== t ? (Lt = l, u = jt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  | +	                null !== t ? (Lt = l, u = jt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  |  	                l = il); | ||||||
|  |  	            } else qt = l, l = il; | ||||||
|  |  	            return l; | ||||||
|  |  	        } | ||||||
|  |  	        function ul() { | ||||||
|  |  	            var l, u; | ||||||
|  | -	            return l = qt, n.substr(qt, 2) === Tt ? (u = Tt, qt += 2) : (u = null, 0 === Wt && e(xt)), | ||||||
|  | +	            return l = qt, n.substr(qt, 2) === Tt ? (u = Tt, qt += 2) : (u = null, 0 === Wt && e(xt)), | ||||||
|  |  	            null !== u && (Lt = l, u = $t()), null === u ? (qt = l, l = u) : l = u, l; | ||||||
|  |  	        } | ||||||
|  |  	        function tl() { | ||||||
|  |  	            var l, u, t; | ||||||
|  | -	            return l = qt, 92 === n.charCodeAt(qt) ? (u = At, qt++) : (u = null, 0 === Wt && e(Ct)), | ||||||
|  | -	            null !== u ? (n.length > qt ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(vt)), | ||||||
|  | -	            null !== t ? (Lt = l, u = bu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  | +	            return l = qt, 92 === n.charCodeAt(qt) ? (u = At, qt++) : (u = null, 0 === Wt && e(Ct)), | ||||||
|  | +	            null !== u ? (n.length > qt ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(vt)), | ||||||
|  | +	            null !== t ? (Lt = l, u = bu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, | ||||||
|  |  	            l = il)) : (qt = l, l = il), l; | ||||||
|  |  	        } | ||||||
|  |  	        var rl, el = arguments.length > 1 ? arguments[1] : {}, ol = { | ||||||
|  | @@ -7234,7 +7234,7 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	var Util = __webpack_require__(3) | ||||||
|  |  	var Random = __webpack_require__(5) | ||||||
|  |  	    /* | ||||||
|  | - | ||||||
|  | + | ||||||
|  |  	    */ | ||||||
|  |  	var Handler = { | ||||||
|  |  	    extend: Util.extend | ||||||
|  | @@ -7481,7 +7481,7 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	        return Random.integer(min, max) | ||||||
|  |  	    }, | ||||||
|  |  	    /* | ||||||
|  | - | ||||||
|  | + | ||||||
|  |  	    */ | ||||||
|  |  	    charset: function(node, result, cache) { | ||||||
|  |  	        // node.invert | ||||||
|  | @@ -7642,11 +7642,11 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	    ## valid(template, data) | ||||||
|  |  | ||||||
|  |  	    校验真实数据 data 是否与数据模板 template 匹配。 | ||||||
|  | - | ||||||
|  | + | ||||||
|  |  	    实现思路: | ||||||
|  |  	    1. 解析规则。 | ||||||
|  |  	        先把数据模板 template 解析为更方便机器解析的 JSON-Schame | ||||||
|  | -	        name               属性名 | ||||||
|  | +	        name               属性名 | ||||||
|  |  	        type               属性值类型 | ||||||
|  |  	        template           属性值模板 | ||||||
|  |  	        properties         对象属性数组 | ||||||
|  | @@ -7655,7 +7655,7 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	    2. 递归验证规则。 | ||||||
|  |  	        然后用 JSON-Schema 校验真实数据,校验项包括属性名、值类型、值、值生成规则。 | ||||||
|  |  | ||||||
|  | -	    提示信息 | ||||||
|  | +	    提示信息 | ||||||
|  |  	    https://github.com/fge/json-schema-validator/blob/master/src/main/resources/com/github/fge/jsonschema/validator/validation.properties | ||||||
|  |  	    [JSON-Schama validator](http://json-schema-validator.herokuapp.com/) | ||||||
|  |  	    [Regexp Demo](http://demos.forbeslindesay.co.uk/regexp/) | ||||||
|  | @@ -7693,8 +7693,8 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	                    +step | ||||||
|  |  	                    整数部分 | ||||||
|  |  	                    小数部分 | ||||||
|  | -	                boolean | ||||||
|  | -	                string | ||||||
|  | +	                boolean | ||||||
|  | +	                string | ||||||
|  |  	                    min-max | ||||||
|  |  	                    count | ||||||
|  |  	    ## properties | ||||||
|  | @@ -7949,9 +7949,9 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  | ||||||
|  |  	/* | ||||||
|  |  	    完善、友好的提示信息 | ||||||
|  | - | ||||||
|  | + | ||||||
|  |  	    Equal, not equal to, greater than, less than, greater than or equal to, less than or equal to | ||||||
|  | -	    路径 验证类型 描述 | ||||||
|  | +	    路径 验证类型 描述 | ||||||
|  |  | ||||||
|  |  	    Expect path.name is less than or equal to expected, but path.name is actual. | ||||||
|  |  | ||||||
|  | @@ -8264,7 +8264,7 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	Util.extend(MockXMLHttpRequest.prototype, { | ||||||
|  |  	    // https://xhr.spec.whatwg.org/#the-open()-method | ||||||
|  |  	    // Sets the request method, request URL, and synchronous flag. | ||||||
|  | -	    open: function(method, url, async, username, password) { | ||||||
|  | +	    open: function(method, url, async = true, username, password) { | ||||||
|  |  	        var that = this | ||||||
|  |  | ||||||
|  |  	        Util.extend(this.custom, { | ||||||
|  | @@ -8310,6 +8310,8 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  	            var xhr = createNativeXMLHttpRequest() | ||||||
|  |  	            this.custom.xhr = xhr | ||||||
|  |  | ||||||
|  | +                MockXMLHttpRequest.prototype.upload = xhr.upload | ||||||
|  | + | ||||||
|  |  	            // 初始化所有事件,用于监听原生 XHR 对象的事件 | ||||||
|  |  	            for (var i = 0; i < XHR_EVENTS.length; i++) { | ||||||
|  |  	                xhr.addEventListener(XHR_EVENTS[i], handle) | ||||||
|  | @@ -8360,6 +8362,7 @@ return /******/ (function(modules) { // webpackBootstrap | ||||||
|  |  | ||||||
|  |  	        // 原生 XHR | ||||||
|  |  	        if (!this.match) { | ||||||
|  | +                this.custom.xhr.responseType = this.responseType || '' | ||||||
|  |  	            this.custom.xhr.send(data) | ||||||
|  |  	            return | ||||||
|  |  	        } | ||||||
							
								
								
									
										16900
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						| Before Width: | Height: | Size: 17 KiB | 
							
								
								
									
										1
									
								
								public/favicon.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1 @@ | |||||||
|  | <svg viewBox="0 0 160 160" xmlns="http://www.w3.org/2000/svg"><path d="M81.28 55.9c-.1-11.67-2.93-22.55-9.37-32.38-1-1.5-2.14-2.86-2.5-4.71a8.1 8.1 0 014-8.61 7.89 7.89 0 019.3 1.23 35.999 35.999 0 015.9 8.83 75.18 75.18 0 018.44 28.58 83.211 83.211 0 01-5.23 36.74 102.983 102.983 0 01-3 7.28 1.2 1.2 0 000 1.41c9.58 13.3 21.76 23 37.85 27.24a54.37 54.37 0 0019.68 1.57 7.72 7.72 0 018.36 6.9 7.903 7.903 0 01-6.7 9 64.744 64.744 0 01-23-1.33 77.68 77.68 0 01-36.93-19.88 93.628 93.628 0 01-11.91-13.71 2.18 2.18 0 00-2.3-1.06 72.744 72.744 0 00-27.38 7.55c-11.6 6-20.67 14.58-26.4 26.45a10.134 10.134 0 01-3.7 4.7 8 8 0 01-9.19-.7 7.86 7.86 0 01-2.36-9.28 60.324 60.324 0 018.72-14.52c12.2-15.43 28.21-24.59 47.32-28.57A85.085 85.085 0 0173.07 87c.524.015 1-.307 1.18-.8a76.06 76.06 0 006.53-22.3c.351-2.652.518-5.325.5-8z" fill="#646cff"/><path d="M136.26 108.34a44.742 44.742 0 01-11.13-2.87 46.108 46.108 0 01-19.66-13.76 8 8 0 015.72-13.22 7.93 7.93 0 016.54 2.93 33.27 33.27 0 0018.87 10.75c1.546.155 3.058.553 4.48 1.18a8.08 8.08 0 013.84 9.21c-.92 3.52-4.13 5.81-8.66 5.78zm-80.6-75.02a7.61 7.61 0 016.64 5 49.139 49.139 0 013.64 17 46.33 46.33 0 01-2.46 17.28c-2 5.77-8.24 7.79-12.89 4.15a8.1 8.1 0 01-2.39-9 31.679 31.679 0 001.68-12.36 35.77 35.77 0 00-2.43-11c-2.1-5.45 1.75-11.07 8.21-11.07zm22.26 93.25a8 8 0 01-6.68 7.86 32.88 32.88 0 00-19.7 12.19 8.13 8.13 0 01-11.21 1.62 8 8 0 01-1.41-11.58A51.043 51.043 0 0154 123.81a45.842 45.842 0 0114-5.1c5.35-1.04 9.91 2.56 9.92 7.86z" fill="#646cff"/></svg> | ||||||
| After Width: | Height: | Size: 1.5 KiB | 
							
								
								
									
										
											BIN
										
									
								
								public/logo.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 23 KiB | 
| @@ -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; |  | ||||||
| } |  | ||||||
| @@ -1,44 +0,0 @@ | |||||||
| /** |  | ||||||
|  * 初始化加载效果的svg格式logo |  | ||||||
|  * @param { string }id - 元素id |  | ||||||
|  */ |  | ||||||
| function initSvgLogo(id) { |  | ||||||
|   const svgStr = `<svg width="128px" height="128px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" |  | ||||||
| 	y="0px" viewBox="0 0 158.9 158.9" style="enable-background:new 0 0 158.9 158.9;" xml:space="preserve"> |  | ||||||
| 	<path style="fill:none" d="M0,158.9C0,106.3,0,53.7,0,1.1C0,0.2,0.2,0,1.1,0c52.2,0,104.5,0,156.7,0c0.9,0,1.1,0.2,1.1,1.1 |  | ||||||
| 	c0,52.2,0,104.5,0,156.7c0,0.9-0.2,1.1-1.1,1.1C105.2,158.8,52.6,158.8,0,158.9z" /> |  | ||||||
| 	<path style="fill:currentColor" d="M81.3,55.9c-0.1-11.7-2.9-22.5-9.4-32.4c-1-1.5-2.1-2.9-2.5-4.7c-0.7-3.4,0.9-6.9,4-8.6c3-1.7,6.8-1.2,9.3,1.2 |  | ||||||
| 	c2.4,2.6,4.4,5.6,5.9,8.8c4.7,8.9,7.6,18.6,8.4,28.6c1,12.5-0.7,25-5.2,36.7c-0.9,2.5-1.9,4.9-3,7.3c-0.3,0.4-0.3,1,0,1.4 |  | ||||||
| 	c9.6,13.3,21.8,23,37.8,27.2c6.4,1.7,13.1,2.3,19.7,1.6c4.2-0.4,7.9,2.7,8.4,6.9c0.7,4.3-2.3,8.3-6.6,9c0,0,0,0-0.1,0 |  | ||||||
| 	c-7.7,0.9-15.5,0.5-23-1.3c-13.9-3.1-26.7-10-36.9-19.9c-4.4-4.2-8.4-8.8-11.9-13.7c-0.5-0.8-1.4-1.2-2.3-1.1 |  | ||||||
| 	c-9.5,0.7-18.8,3.3-27.4,7.6c-11.6,6-20.7,14.6-26.4,26.4c-0.7,1.9-2,3.5-3.7,4.7c-2.9,1.7-6.6,1.5-9.2-0.7c-2.8-2.2-3.8-6-2.4-9.3 |  | ||||||
| 	c2.2-5.2,5.1-10.1,8.7-14.5c12.2-15.4,28.2-24.6,47.3-28.6c4-0.8,8.1-1.4,12.2-1.6c0.5,0,1-0.3,1.2-0.8c3.3-7.1,5.5-14.6,6.5-22.3 |  | ||||||
| 	C81.1,61.2,81.3,58.6,81.3,55.9z" /> |  | ||||||
| 	<path style="fill:currentColor" d="M136.3,108.3c-3.8-0.5-7.6-1.4-11.1-2.9c-7.7-2.8-14.4-7.5-19.7-13.8c-2.9-3.3-2.5-8.4,0.8-11.3 |  | ||||||
| 	c1.4-1.2,3.1-1.9,4.9-1.9c2.5-0.1,5,1,6.5,2.9c4.9,5.6,11.6,9.4,18.9,10.8c1.5,0.2,3.1,0.6,4.5,1.2c3.2,1.8,4.8,5.6,3.8,9.2 |  | ||||||
| 	C144,106.1,140.8,108.4,136.3,108.3z" /> |  | ||||||
| 	<path style="fill:currentColor" d="M55.7,33.3c3,0.2,5.6,2.2,6.6,5c2.2,5.4,3.4,11.2,3.6,17c0.3,5.9-0.6,11.7-2.5,17.3c-2,5.8-8.2,7.8-12.9,4.2 |  | ||||||
| 	c-2.6-2.2-3.6-5.8-2.4-9c1.4-4,1.9-8.2,1.7-12.4c-0.2-3.8-1-7.5-2.4-11C45.3,38.9,49.2,33.3,55.7,33.3z" /> |  | ||||||
| 	<path style="fill:currentColor" d="M77.9,126.6c0,3.9-2.8,7.2-6.7,7.9c-7.8,1.5-14.8,5.9-19.7,12.2c-2.7,3.5-7.6,4.2-11.2,1.6 |  | ||||||
| 	c-3.6-2.6-4.3-7.6-1.7-11.2c0.1-0.1,0.2-0.3,0.3-0.4c4.1-5.2,9.3-9.6,15.1-12.8c4.4-2.5,9.1-4.2,14-5.1 |  | ||||||
| 	C73.3,117.7,77.9,121.3,77.9,126.6z" /> |  | ||||||
| </svg> |  | ||||||
| `; |  | ||||||
|   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 themeColor = '#1890ff'; |  | ||||||
|   const cssVars = window.localStorage.getItem(key) || `--primary-color: ${themeColor}`; |  | ||||||
|   document.documentElement.style.cssText = cssVars; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| initSvgLogo('#loadingLogo'); |  | ||||||
|  |  | ||||||
| addThemeColorCssVars(); |  | ||||||
							
								
								
									
										12
									
								
								scripts/logo.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,12 @@ | |||||||
|  | import { readFile, writeFile } from 'fs/promises'; | ||||||
|  | import themeSettings from '../src/settings/theme.json'; | ||||||
|  |  | ||||||
|  | async function updateFavicon(svgPath: string, color: string) { | ||||||
|  |   const svgStr = await readFile(svgPath, 'utf-8'); | ||||||
|  |  | ||||||
|  |   const svgStrWithColor = svgStr.replace(/currentColor/g, color); | ||||||
|  |  | ||||||
|  |   await writeFile('./public/favicon.svg', svgStrWithColor); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | updateFavicon('./src/assets/svg-icon/logo.svg', themeSettings.themeColor); | ||||||
| @@ -13,12 +13,14 @@ | |||||||
| </template> | </template> | ||||||
|  |  | ||||||
| <script setup lang="ts"> | <script setup lang="ts"> | ||||||
| import { NConfigProvider, zhCN, dateZhCN } from 'naive-ui'; | import { dateZhCN, zhCN } from 'naive-ui'; | ||||||
| import { NaiveProvider } from '@/components'; | import { subscribeStore, useThemeStore } from '@/store'; | ||||||
| import { useThemeStore, subscribeStore } from '@/store'; | import { useGlobalEvents } from '@/composables'; | ||||||
|  |  | ||||||
| const theme = useThemeStore(); | const theme = useThemeStore(); | ||||||
|  |  | ||||||
| subscribeStore(); | subscribeStore(); | ||||||
|  | useGlobalEvents(); | ||||||
| </script> | </script> | ||||||
|  |  | ||||||
| <style scoped></style> | <style scoped></style> | ||||||
|   | |||||||
							
								
								
									
										
											BIN
										
									
								
								src/assets/fonts/aguazyuan-bold.ttf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										
											BIN
										
									
								
								src/assets/fonts/aguazyuan-light.ttf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										
											BIN
										
									
								
								src/assets/fonts/aguazyuan-regular.ttf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										1
									
								
								src/assets/svg-icon/activity.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1 @@ | |||||||
|  | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M22 12h-4l-3 9L9 3l-3 9H2"/></svg> | ||||||
| After Width: | Height: | Size: 202 B | 
							
								
								
									
										1
									
								
								src/assets/svg-icon/at-sign.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1 @@ | |||||||
|  | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="prefix__prefix__feather prefix__prefix__feather-at-sign"><circle cx="12" cy="12" r="4"/><path d="M16 8v5a3 3 0 006 0v-1a10 10 0 10-3.92 7.94"/></svg> | ||||||
| After Width: | Height: | Size: 315 B | 
							
								
								
									
										1
									
								
								src/assets/svg-icon/avatar.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 6.3 KiB | 
							
								
								
									
										1
									
								
								src/assets/svg-icon/banner.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 19 KiB | 
							
								
								
									
										1
									
								
								src/assets/svg-icon/cast.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1 @@ | |||||||
|  | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="prefix__prefix__feather prefix__prefix__feather-cast"><path d="M2 16.1A5 5 0 015.9 20M2 12.05A9 9 0 019.95 20M2 8V6a2 2 0 012-2h16a2 2 0 012 2v12a2 2 0 01-2 2h-6M2 20h.01"/></svg> | ||||||
| After Width: | Height: | Size: 345 B | 
							
								
								
									
										1
									
								
								src/assets/svg-icon/chrome.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1 @@ | |||||||
|  | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><circle cx="12" cy="12" r="4"/><path d="M21.17 8H12M3.95 6.06L8.54 14m2.34 7.94L15.46 14"/></svg> | ||||||
| After Width: | Height: | Size: 288 B | 
							
								
								
									
										1
									
								
								src/assets/svg-icon/copy.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1 @@ | |||||||
|  | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg> | ||||||
| After Width: | Height: | Size: 283 B | 
							
								
								
									
										1
									
								
								src/assets/svg-icon/custom-icon.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1 @@ | |||||||
|  | <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" viewBox="0 0 24 24"><path fill="currentColor" d="M19 10c0 1.38-2.12 2.5-3.5 2.5s-2.75-1.12-2.75-2.5h-1.5c0 1.38-1.37 2.5-2.75 2.5S5 11.38 5 10h-.75c-.16.64-.25 1.31-.25 2a8 8 0 008 8 8 8 0 008-8c0-.69-.09-1.36-.25-2H19m-7-6C9.04 4 6.45 5.61 5.07 8h13.86C17.55 5.61 14.96 4 12 4m10 8a10 10 0 01-10 10A10 10 0 012 12 10 10 0 0112 2a10 10 0 0110 10m-10 5.23c-1.75 0-3.29-.73-4.19-1.81L9.23 14c.45.72 1.52 1.23 2.77 1.23s2.32-.51 2.77-1.23l1.42 1.42c-.9 1.08-2.44 1.81-4.19 1.81z"/></svg> | ||||||
| After Width: | Height: | Size: 544 B | 
							
								
								
									
										1
									
								
								src/assets/svg-icon/empty-data.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 77 KiB | 
							
								
								
									
										1
									
								
								src/assets/svg-icon/heart.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1 @@ | |||||||
|  | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z"/></svg> | ||||||
| After Width: | Height: | Size: 309 B | 
							
								
								
									
										1
									
								
								src/assets/svg-icon/logo-fill.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1 @@ | |||||||
|  | <svg xmlns="http://www.w3.org/2000/svg"><path d="M0 0h160v160H0V0z" fill="currentColor"/><path d="M94.322 51.888A69.12 69.12 0 0187.806 80.9a1.732 1.732 0 00.191 2.014c6.124 8.338 13.677 14.894 23.356 18.821a46.564 46.564 0 0017.273 3.414 29.101 29.101 0 003.364-.252 6.245 6.245 0 017.051 5.156 6.112 6.112 0 01-5.187 7.19 50.758 50.758 0 01-18.19-1.007c-15.964-3.686-28.2-12.84-37.709-25.88a2.165 2.165 0 00-2.246-1.098c-14.1 1.38-26.357 6.475-35.754 17.331a38.721 38.721 0 00-6.275 9.808 6.255 6.255 0 01-8.229 3.444 6.184 6.184 0 01-3.293-8.258 49.662 49.662 0 019.699-14.722c10.636-11.52 23.97-17.663 39.37-19.677a14.06 14.06 0 012.86-.342c1.622.14 2.197-.735 2.75-2.014a54.752 54.752 0 004.865-23.463 44.302 44.302 0 00-8.057-25.175 6.152 6.152 0 01-.655-6.506 6.043 6.043 0 015.318-3.564 6.386 6.386 0 015.7 3.02 53.98 53.98 0 017.222 14.38 59.734 59.734 0 013.092 18.368z" fill="#fff"/><path d="M47.257 119.468a6.04 6.04 0 011.36-3.907 38.165 38.165 0 0122.66-14.098 6.124 6.124 0 016.699 2.487 6.223 6.223 0 01-3.868 9.698 26.276 26.276 0 00-15.823 9.838 6.245 6.245 0 01-11.028-4.028v.01zm77.935-26.01a34.908 34.908 0 01-9.89-2.498 35.717 35.717 0 01-14.756-10.523 6.233 6.233 0 012.861-10 5.832 5.832 0 016.486 1.742 26.986 26.986 0 0016.628 8.912 6.042 6.042 0 015.036 5.58 6.253 6.253 0 01-4.32 6.504 6.588 6.588 0 01-2.045.282zM69.817 53.65a33.69 33.69 0 01-2.286 12.607 6.255 6.255 0 01-11.018 1.007 6.132 6.132 0 01-.655-5.438 26.178 26.178 0 00-.534-18.377 6.256 6.256 0 0111.572-4.753 40.515 40.515 0 012.921 14.954z" fill="#fff"/></svg> | ||||||
| After Width: | Height: | Size: 1.5 KiB | 
							
								
								
									
										1
									
								
								src/assets/svg-icon/logo.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1 @@ | |||||||
|  | <svg viewBox="0 0 160 160" xmlns="http://www.w3.org/2000/svg"><path d="M81.28 55.9c-.1-11.67-2.93-22.55-9.37-32.38-1-1.5-2.14-2.86-2.5-4.71a8.1 8.1 0 014-8.61 7.89 7.89 0 019.3 1.23 35.999 35.999 0 015.9 8.83 75.18 75.18 0 018.44 28.58 83.211 83.211 0 01-5.23 36.74 102.983 102.983 0 01-3 7.28 1.2 1.2 0 000 1.41c9.58 13.3 21.76 23 37.85 27.24a54.37 54.37 0 0019.68 1.57 7.72 7.72 0 018.36 6.9 7.903 7.903 0 01-6.7 9 64.744 64.744 0 01-23-1.33 77.68 77.68 0 01-36.93-19.88 93.628 93.628 0 01-11.91-13.71 2.18 2.18 0 00-2.3-1.06 72.744 72.744 0 00-27.38 7.55c-11.6 6-20.67 14.58-26.4 26.45a10.134 10.134 0 01-3.7 4.7 8 8 0 01-9.19-.7 7.86 7.86 0 01-2.36-9.28 60.324 60.324 0 018.72-14.52c12.2-15.43 28.21-24.59 47.32-28.57A85.085 85.085 0 0173.07 87c.524.015 1-.307 1.18-.8a76.06 76.06 0 006.53-22.3c.351-2.652.518-5.325.5-8z" fill="currentColor"/><path d="M136.26 108.34a44.742 44.742 0 01-11.13-2.87 46.108 46.108 0 01-19.66-13.76 8 8 0 015.72-13.22 7.93 7.93 0 016.54 2.93 33.27 33.27 0 0018.87 10.75c1.546.155 3.058.553 4.48 1.18a8.08 8.08 0 013.84 9.21c-.92 3.52-4.13 5.81-8.66 5.78zm-80.6-75.02a7.61 7.61 0 016.64 5 49.139 49.139 0 013.64 17 46.33 46.33 0 01-2.46 17.28c-2 5.77-8.24 7.79-12.89 4.15a8.1 8.1 0 01-2.39-9 31.679 31.679 0 001.68-12.36 35.77 35.77 0 00-2.43-11c-2.1-5.45 1.75-11.07 8.21-11.07zm22.26 93.25a8 8 0 01-6.68 7.86 32.88 32.88 0 00-19.7 12.19 8.13 8.13 0 01-11.21 1.62 8 8 0 01-1.41-11.58A51.043 51.043 0 0154 123.81a45.842 45.842 0 0114-5.1c5.35-1.04 9.91 2.56 9.92 7.86z" fill="currentColor"/></svg> | ||||||
| After Width: | Height: | Size: 1.5 KiB | 
							
								
								
									
										1
									
								
								src/assets/svg-icon/network-error.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 19 KiB | 
							
								
								
									
										1
									
								
								src/assets/svg-icon/no-icon.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 8.1 KiB | 
							
								
								
									
										1
									
								
								src/assets/svg-icon/no-permission.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 50 KiB | 
							
								
								
									
										1
									
								
								src/assets/svg-icon/not-found.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 33 KiB | 
							
								
								
									
										1
									
								
								src/assets/svg-icon/service-error.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 74 KiB | 
							
								
								
									
										1
									
								
								src/assets/svg-icon/wind.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1 @@ | |||||||
|  | <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-wind"><path d="M9.59 4.59A2 2 0 1 1 11 8H2m10.59 11.41A2 2 0 1 0 14 16H2m15.73-8.27A2.5 2.5 0 1 1 19.5 12H2"></path></svg> | ||||||
| After Width: | Height: | Size: 327 B | 
| Before Width: | Height: | Size: 8.6 KiB | 
| @@ -1,3 +0,0 @@ | |||||||
| import LoginAgreement from './LoginAgreement/index.vue'; |  | ||||||
|  |  | ||||||
| export { LoginAgreement }; |  | ||||||
							
								
								
									
										97
									
								
								src/components/business/loading-empty-wrapper.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,97 @@ | |||||||
|  | <template> | ||||||
|  |   <div v-if="reloadFlag" class="relative"> | ||||||
|  |     <slot></slot> | ||||||
|  |     <div v-show="showPlaceholder" class="absolute-lt w-full h-full" :class="placeholderClass"> | ||||||
|  |       <div v-show="loading" class="absolute-center"> | ||||||
|  |         <n-spin :show="true" :size="loadingSize" /> | ||||||
|  |       </div> | ||||||
|  |       <div v-show="isEmpty" class="absolute-center"> | ||||||
|  |         <div class="relative"> | ||||||
|  |           <icon-local-empty-data :class="iconClass" /> | ||||||
|  |           <p class="absolute-lb w-full text-center" :class="descClass">{{ emptyDesc }}</p> | ||||||
|  |         </div> | ||||||
|  |       </div> | ||||||
|  |       <div v-show="!network" class="absolute-center"> | ||||||
|  |         <div class="relative" :class="{ 'cursor-pointer': showNetworkReload }" @click="handleReload"> | ||||||
|  |           <icon-local-network-error :class="iconClass" /> | ||||||
|  |           <p class="absolute-lb w-full text-center" :class="descClass">{{ networkErrorDesc }}</p> | ||||||
|  |         </div> | ||||||
|  |       </div> | ||||||
|  |     </div> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <script setup lang="ts"> | ||||||
|  | import { computed, nextTick, onUnmounted, watch } from 'vue'; | ||||||
|  | import { NETWORK_ERROR_MSG } from '@/config'; | ||||||
|  | import { useBoolean } from '@/hooks'; | ||||||
|  |  | ||||||
|  | defineOptions({ name: 'LoadingEmptyWrapper' }); | ||||||
|  |  | ||||||
|  | interface Props { | ||||||
|  |   /** 是否加载 */ | ||||||
|  |   loading: boolean; | ||||||
|  |   /** 是否为空 */ | ||||||
|  |   empty?: boolean; | ||||||
|  |   /** 加载图标的大小 */ | ||||||
|  |   loadingSize?: 'small' | 'medium' | 'large'; | ||||||
|  |   /** 中间占位符的class */ | ||||||
|  |   placeholderClass?: string; | ||||||
|  |   /** 空数据描述文本 */ | ||||||
|  |   emptyDesc?: string; | ||||||
|  |   /** 图标的class */ | ||||||
|  |   iconClass?: string; | ||||||
|  |   /** 描述文本的class */ | ||||||
|  |   descClass?: string; | ||||||
|  |   /** 显示网络异常的重试点击按钮 */ | ||||||
|  |   showNetworkReload?: boolean; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | const props = withDefaults(defineProps<Props>(), { | ||||||
|  |   loading: false, | ||||||
|  |   empty: false, | ||||||
|  |   loadingSize: 'medium', | ||||||
|  |   placeholderClass: 'bg-white dark:bg-dark transition-background-color duration-300 ease-in-out', | ||||||
|  |   emptyDesc: '暂无数据', | ||||||
|  |   iconClass: 'text-320px text-primary', | ||||||
|  |   descClass: 'text-16px text-#666', | ||||||
|  |   showNetworkReload: false | ||||||
|  | }); | ||||||
|  |  | ||||||
|  | // 网络状态 | ||||||
|  | const { bool: network, setBool: setNetwork } = useBoolean(window.navigator.onLine); | ||||||
|  | const { bool: reloadFlag, setBool: setReload } = useBoolean(true); | ||||||
|  |  | ||||||
|  | // 数据是否为空 | ||||||
|  | const isEmpty = computed(() => props.empty && !props.loading && network.value); | ||||||
|  |  | ||||||
|  | const showPlaceholder = computed(() => props.loading || isEmpty.value || !network.value); | ||||||
|  |  | ||||||
|  | const networkErrorDesc = computed(() => | ||||||
|  |   props.showNetworkReload ? `${NETWORK_ERROR_MSG}, 点击重试` : NETWORK_ERROR_MSG | ||||||
|  | ); | ||||||
|  |  | ||||||
|  | function handleReload() { | ||||||
|  |   if (!props.showNetworkReload) return; | ||||||
|  |   setReload(false); | ||||||
|  |   nextTick(() => { | ||||||
|  |     setReload(true); | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | const stopHandle = watch( | ||||||
|  |   () => props.loading, | ||||||
|  |   newValue => { | ||||||
|  |     // 结束加载判断一下网络状态 | ||||||
|  |     if (!newValue) { | ||||||
|  |       setNetwork(window.navigator.onLine); | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | ); | ||||||
|  |  | ||||||
|  | onUnmounted(() => { | ||||||
|  |   stopHandle(); | ||||||
|  | }); | ||||||
|  | </script> | ||||||
|  |  | ||||||
|  | <style scoped></style> | ||||||
| @@ -8,13 +8,18 @@ | |||||||
| 
 | 
 | ||||||
| <script setup lang="ts"> | <script setup lang="ts"> | ||||||
| import { computed } from 'vue'; | import { computed } from 'vue'; | ||||||
| import { NCheckbox, NButton } from 'naive-ui'; | 
 | ||||||
|  | defineOptions({ name: 'LoginAgreement' }); | ||||||
| 
 | 
 | ||||||
| interface Props { | interface Props { | ||||||
|   /** 是否勾选 */ |   /** 是否勾选 */ | ||||||
|   value?: boolean; |   value?: boolean; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | const props = withDefaults(defineProps<Props>(), { | ||||||
|  |   value: true | ||||||
|  | }); | ||||||
|  | 
 | ||||||
| interface Emits { | interface Emits { | ||||||
|   (e: 'update:value', value: boolean): void; |   (e: 'update:value', value: boolean): void; | ||||||
|   /** 点击协议 */ |   /** 点击协议 */ | ||||||
| @@ -23,10 +28,6 @@ interface Emits { | |||||||
|   (e: 'click-policy'): void; |   (e: 'click-policy'): void; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| const props = withDefaults(defineProps<Props>(), { |  | ||||||
|   value: true |  | ||||||
| }); |  | ||||||
| 
 |  | ||||||
| const emit = defineEmits<Emits>(); | const emit = defineEmits<Emits>(); | ||||||
| 
 | 
 | ||||||
| const checked = computed({ | const checked = computed({ | ||||||
| @@ -45,4 +46,5 @@ function handleClickPolicy() { | |||||||
|   emit('click-policy'); |   emit('click-policy'); | ||||||
| } | } | ||||||
| </script> | </script> | ||||||
|  | 
 | ||||||
| <style scoped></style> | <style scoped></style> | ||||||
| @@ -1,10 +0,0 @@ | |||||||
| <template> |  | ||||||
|   <div |  | ||||||
|     class="bg-white text-[#333639] dark:(bg-[#18181c] text-white text-opacity-82) transition-all duration-300 ease-in-out" |  | ||||||
|   > |  | ||||||
|     <slot></slot> |  | ||||||
|   </div> |  | ||||||
| </template> |  | ||||||
|  |  | ||||||
| <script setup lang="ts"></script> |  | ||||||
| <style scoped></style> |  | ||||||
| @@ -1,39 +0,0 @@ | |||||||
| <template> |  | ||||||
|   <div class="flex-center text-18px hover:text-primary cursor-pointer" @click="handleSwitch"> |  | ||||||
|     <icon-mdi-moon-waning-crescent v-if="darkMode" /> |  | ||||||
|     <icon-mdi-white-balance-sunny v-else /> |  | ||||||
|   </div> |  | ||||||
| </template> |  | ||||||
|  |  | ||||||
| <script setup lang="ts"> |  | ||||||
| import { computed } from 'vue'; |  | ||||||
|  |  | ||||||
| interface Props { |  | ||||||
|   /** 暗黑模式 */ |  | ||||||
|   dark?: boolean; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| interface Emits { |  | ||||||
|   (e: 'update:dark', darkMode: boolean): void; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| const props = withDefaults(defineProps<Props>(), { |  | ||||||
|   dark: false |  | ||||||
| }); |  | ||||||
|  |  | ||||||
| const emit = defineEmits<Emits>(); |  | ||||||
|  |  | ||||||
| const darkMode = computed({ |  | ||||||
|   get() { |  | ||||||
|     return props.dark; |  | ||||||
|   }, |  | ||||||
|   set(newValue: boolean) { |  | ||||||
|     emit('update:dark', newValue); |  | ||||||
|   } |  | ||||||
| }); |  | ||||||
|  |  | ||||||
| function handleSwitch() { |  | ||||||
|   darkMode.value = !darkMode.value; |  | ||||||
| } |  | ||||||
| </script> |  | ||||||
| <style scoped></style> |  | ||||||
| @@ -1,18 +0,0 @@ | |||||||
| <template> |  | ||||||
|   <div></div> |  | ||||||
| </template> |  | ||||||
|  |  | ||||||
| <script lang="ts" setup> |  | ||||||
| import { useLoadingBar, useDialog, useMessage, useNotification } from 'naive-ui'; |  | ||||||
|  |  | ||||||
| // 挂载naive组件的方法至window, 以便在路由钩子函数和请求函数里面调用 |  | ||||||
| function registerNaiveTools() { |  | ||||||
|   window.$loadingBar = useLoadingBar(); |  | ||||||
|   window.$dialog = useDialog(); |  | ||||||
|   window.$message = useMessage(); |  | ||||||
|   window.$notification = useNotification(); |  | ||||||
| } |  | ||||||
|  |  | ||||||
| registerNaiveTools(); |  | ||||||
| </script> |  | ||||||
| <style scoped></style> |  | ||||||
| @@ -1,3 +0,0 @@ | |||||||
| import NaiveProviderContent from './NaiveProviderContent.vue'; |  | ||||||
|  |  | ||||||
| export { NaiveProviderContent }; |  | ||||||
| @@ -1,18 +0,0 @@ | |||||||
| <template> |  | ||||||
|   <n-loading-bar-provider> |  | ||||||
|     <n-dialog-provider> |  | ||||||
|       <n-notification-provider> |  | ||||||
|         <n-message-provider> |  | ||||||
|           <slot></slot> |  | ||||||
|           <naive-provider-content /> |  | ||||||
|         </n-message-provider> |  | ||||||
|       </n-notification-provider> |  | ||||||
|     </n-dialog-provider> |  | ||||||
|   </n-loading-bar-provider> |  | ||||||
| </template> |  | ||||||
|  |  | ||||||
| <script setup lang="ts"> |  | ||||||
| import { NLoadingBarProvider, NDialogProvider, NNotificationProvider, NMessageProvider } from 'naive-ui'; |  | ||||||
| import { NaiveProviderContent } from './components'; |  | ||||||
| </script> |  | ||||||
| <style scoped></style> |  | ||||||
| @@ -1,31 +0,0 @@ | |||||||
| <template> |  | ||||||
|   <svg viewBox="0 0 158.88 158.88"> |  | ||||||
|     <path |  | ||||||
|       d="M158.86.3q0,78.74,0,157.48c0,.9-.2,1.1-1.1,1.1q-78.77,0-157.52,0a2.61,2.61,0,0,1-.11-1.3q0-78,0-155.91C.14,0,0,.18,1.61.18h156A2.62,2.62,0,0,1,158.86.3Z" |  | ||||||
|       style="fill: currentColor" |  | ||||||
|     /> |  | ||||||
|     <path |  | ||||||
|       d="M158.86.3H2C0,.31.27,0,.27,2q0,78.42,0,156.85c-.07-.05-.25.12-.24-.12s0-.64,0-1Q0,79.46,0,1.14C0,.24.2,0,1.1,0l156.68,0C158.13.08,158.59-.2,158.86.3Z" |  | ||||||
|       style="fill: #ffffff" |  | ||||||
|     /> |  | ||||||
|     <path |  | ||||||
|       d="M93.65,51.52a68.65,68.65,0,0,1-6.47,28.81,1.72,1.72,0,0,0,.19,2c6.08,8.28,13.58,14.79,23.19,18.69a46.22,46.22,0,0,0,17.15,3.39,28.87,28.87,0,0,0,3.34-.25,6.2,6.2,0,0,1,7,5.12,6.07,6.07,0,0,1-5.15,7.14,50.39,50.39,0,0,1-18.06-1c-15.85-3.66-28-12.75-37.44-25.7a2.15,2.15,0,0,0-2.23-1.09C61.17,90,49,95.06,39.67,105.84a38.47,38.47,0,0,0-6.23,9.74A6.21,6.21,0,0,1,25.27,119,6.14,6.14,0,0,1,22,110.8a49.31,49.31,0,0,1,9.63-14.62c10.56-11.44,23.8-17.54,39.09-19.54a13.93,13.93,0,0,1,2.84-.34c1.61.14,2.18-.73,2.73-2A54.38,54.38,0,0,0,81.12,51a44,44,0,0,0-8-25,6.11,6.11,0,0,1-.65-6.46A6,6,0,0,1,77.75,16a6.34,6.34,0,0,1,5.66,3,53.61,53.61,0,0,1,7.17,14.28A59.33,59.33,0,0,1,93.65,51.52Z" |  | ||||||
|       style="fill: #ffffff" |  | ||||||
|     /> |  | ||||||
|     <path |  | ||||||
|       d="M46.92,118.63a6,6,0,0,1,1.35-3.88,37.89,37.89,0,0,1,22.5-14,6.08,6.08,0,0,1,6.65,2.47,6.18,6.18,0,0,1-3.84,9.63,26.09,26.09,0,0,0-15.71,9.77,6.2,6.2,0,0,1-10.95-4Z" |  | ||||||
|       style="fill: #ffffff" |  | ||||||
|     /> |  | ||||||
|     <path |  | ||||||
|       d="M124.3,92.8a34.66,34.66,0,0,1-9.82-2.48A35.46,35.46,0,0,1,99.83,79.87a6.19,6.19,0,0,1,2.84-9.93,5.79,5.79,0,0,1,6.44,1.73,26.79,26.79,0,0,0,16.51,8.85,6,6,0,0,1,5,5.54,6.21,6.21,0,0,1-4.29,6.46A6.55,6.55,0,0,1,124.3,92.8Z" |  | ||||||
|       style="fill: #ffffff" |  | ||||||
|     /> |  | ||||||
|     <path |  | ||||||
|       d="M69.32,53.27a33.46,33.46,0,0,1-2.27,12.52,6.21,6.21,0,0,1-10.94,1,6.09,6.09,0,0,1-.65-5.4,26,26,0,0,0-.53-18.25,6.21,6.21,0,0,1,11.49-4.72A40.24,40.24,0,0,1,69.32,53.27Z" |  | ||||||
|       style="fill: #ffffff" |  | ||||||
|     /> |  | ||||||
|   </svg> |  | ||||||
| </template> |  | ||||||
|  |  | ||||||
| <script setup lang="ts"></script> |  | ||||||
| <style scoped></style> |  | ||||||
| @@ -1,32 +0,0 @@ | |||||||
| <template> |  | ||||||
|   <svg viewBox="0 0 158.88 158.88"> |  | ||||||
|     <path |  | ||||||
|       d="M0,158.86Q0,80,0,1.1C0,.2.2,0,1.1,0Q79.44,0,157.78,0c.9,0,1.1.2,1.1,1.1q0,78.35,0,156.68c0,.9-.2,1.1-1.1,1.1Q78.9,158.83,0,158.86Z" |  | ||||||
|       transform="translate(0)" |  | ||||||
|       style="fill: #ffffff00" |  | ||||||
|     /> |  | ||||||
|     <path |  | ||||||
|       d="M81.28,55.9c-.1-11.67-2.93-22.55-9.37-32.38-1-1.5-2.14-2.86-2.5-4.71a8.1,8.1,0,0,1,4-8.61,7.89,7.89,0,0,1,9.3,1.23,36,36,0,0,1,5.9,8.83,75.18,75.18,0,0,1,8.44,28.58,83.21,83.21,0,0,1-5.23,36.74c-.91,2.47-1.91,4.9-3,7.28a1.2,1.2,0,0,0,0,1.41c9.58,13.3,21.76,23,37.85,27.24a54.35,54.35,0,0,0,19.68,1.57,7.72,7.72,0,0,1,8.36,6.9,7.9,7.9,0,0,1-6.7,9,64.74,64.74,0,0,1-23-1.33,77.68,77.68,0,0,1-36.93-19.88,93.64,93.64,0,0,1-11.91-13.71A2.18,2.18,0,0,0,73.87,103a72.75,72.75,0,0,0-27.38,7.55c-11.6,6-20.67,14.58-26.4,26.45a10.13,10.13,0,0,1-3.7,4.7A8,8,0,0,1,7.2,141a7.86,7.86,0,0,1-2.36-9.28,60.32,60.32,0,0,1,8.72-14.52c12.2-15.43,28.21-24.59,47.32-28.57A85.08,85.08,0,0,1,73.07,87a1.22,1.22,0,0,0,1.18-.8A76.06,76.06,0,0,0,80.78,63.9,57.87,57.87,0,0,0,81.28,55.9Z" |  | ||||||
|       transform="translate(0)" |  | ||||||
|       style="fill: currentColor" |  | ||||||
|     /> |  | ||||||
|     <path |  | ||||||
|       d="M136.26,108.34a44.72,44.72,0,0,1-11.13-2.87,46.11,46.11,0,0,1-19.66-13.76,8,8,0,0,1,5.72-13.22,7.93,7.93,0,0,1,6.54,2.93A33.27,33.27,0,0,0,136.6,92.17a14.76,14.76,0,0,1,4.48,1.18,8.08,8.08,0,0,1,3.84,9.21C144,106.08,140.79,108.37,136.26,108.34Z" |  | ||||||
|       transform="translate(0)" |  | ||||||
|       style="fill: currentColor" |  | ||||||
|     /> |  | ||||||
|     <path |  | ||||||
|       d="M55.66,33.32a7.61,7.61,0,0,1,6.64,5,49.14,49.14,0,0,1,3.64,17,46.33,46.33,0,0,1-2.46,17.28c-2,5.77-8.24,7.79-12.89,4.15a8.1,8.1,0,0,1-2.39-9,31.68,31.68,0,0,0,1.68-12.36,35.77,35.77,0,0,0-2.43-11C45.35,38.94,49.2,33.32,55.66,33.32Z" |  | ||||||
|       transform="translate(0)" |  | ||||||
|       style="fill: currentColor" |  | ||||||
|     /> |  | ||||||
|     <path |  | ||||||
|       d="M77.92,126.57a8,8,0,0,1-6.68,7.86,32.88,32.88,0,0,0-19.7,12.19,8.13,8.13,0,0,1-11.21,1.62,8,8,0,0,1-1.41-11.58A51.05,51.05,0,0,1,54,123.81a45.85,45.85,0,0,1,14-5.1C73.35,117.67,77.91,121.27,77.92,126.57Z" |  | ||||||
|       transform="translate(0)" |  | ||||||
|       style="fill: currentColor" |  | ||||||
|     /> |  | ||||||
|   </svg> |  | ||||||
| </template> |  | ||||||
|  |  | ||||||
| <script setup lang="ts"></script> |  | ||||||
| <style scoped></style> |  | ||||||
| @@ -1,4 +0,0 @@ | |||||||
| import SvgLogo from './SvgLogo.vue'; |  | ||||||
| import SvgFillLogo from './SvgFillLogo.vue'; |  | ||||||
|  |  | ||||||
| export { SvgLogo, SvgFillLogo }; |  | ||||||
							
								
								
									
										43
									
								
								src/components/common/app-loading.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,43 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="fixed-center flex-col"> | ||||||
|  |     <system-logo class="text-128px text-primary" /> | ||||||
|  |     <div class="w-56px h-56px my-36px"> | ||||||
|  |       <div class="relative h-full animate-spin"> | ||||||
|  |         <div | ||||||
|  |           v-for="(item, index) in loadingClasses" | ||||||
|  |           :key="index" | ||||||
|  |           class="absolute w-16px h-16px bg-primary rounded-8px animate-pulse" | ||||||
|  |           :class="item" | ||||||
|  |         ></div> | ||||||
|  |       </div> | ||||||
|  |     </div> | ||||||
|  |     <h2 class="text-28px font-500 text-#646464">{{ $t('system.title') }}</h2> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <script setup lang="ts"> | ||||||
|  | import { sessionStg, getRgbOfColor } from '@/utils'; | ||||||
|  | import { $t } from '@/locales'; | ||||||
|  | import themeSettings from '@/settings/theme.json'; | ||||||
|  |  | ||||||
|  | const loadingClasses = [ | ||||||
|  |   'left-0 top-0', | ||||||
|  |   'left-0 bottom-0 animate-delay-500', | ||||||
|  |   'right-0 top-0 animate-delay-1000', | ||||||
|  |   'right-0 bottom-0 animate-delay-1500' | ||||||
|  | ]; | ||||||
|  |  | ||||||
|  | function addThemeColorCssVars() { | ||||||
|  |   const defaultColor = themeSettings.themeColor; | ||||||
|  |   const themeColor = sessionStg.get('themeColor') || defaultColor; | ||||||
|  |  | ||||||
|  |   const { r, g, b } = getRgbOfColor(themeColor); | ||||||
|  |  | ||||||
|  |   const cssVars = `--primary-color: ${r},${g},${b}`; | ||||||
|  |   document.documentElement.style.cssText = cssVars; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | addThemeColorCssVars(); | ||||||
|  | </script> | ||||||
|  |  | ||||||
|  | <style scoped></style> | ||||||
							
								
								
									
										22
									
								
								src/components/common/dark-mode-container.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,22 @@ | |||||||
|  | <template> | ||||||
|  |   <div | ||||||
|  |     class="dark:bg-dark dark:text-white dark:text-opacity-82 transition-all" | ||||||
|  |     :class="inverted ? 'bg-#001428 text-white' : 'bg-white text-#333639'" | ||||||
|  |   > | ||||||
|  |     <slot></slot> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <script setup lang="ts"> | ||||||
|  | defineOptions({ name: 'DarkModeContainer' }); | ||||||
|  |  | ||||||
|  | interface Props { | ||||||
|  |   inverted?: boolean; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | withDefaults(defineProps<Props>(), { | ||||||
|  |   inverted: false | ||||||
|  | }); | ||||||
|  | </script> | ||||||
|  |  | ||||||
|  | <style scoped></style> | ||||||
							
								
								
									
										89
									
								
								src/components/common/dark-mode-switch.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,89 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="flex-center text-18px cursor-pointer" @click="handleSwitch"> | ||||||
|  |     <icon-mdi-moon-waning-crescent v-if="darkMode" /> | ||||||
|  |     <icon-mdi-white-balance-sunny v-else /> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <script setup lang="ts"> | ||||||
|  | import { computed } from 'vue'; | ||||||
|  |  | ||||||
|  | defineOptions({ name: 'DarkModeSwitch' }); | ||||||
|  |  | ||||||
|  | interface Props { | ||||||
|  |   /** 暗黑模式 */ | ||||||
|  |   dark?: boolean; | ||||||
|  |   /** 自定义暗黑模式动画过渡 */ | ||||||
|  |   customizeTransition?: boolean; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | const props = withDefaults(defineProps<Props>(), { | ||||||
|  |   dark: false | ||||||
|  | }); | ||||||
|  |  | ||||||
|  | interface Emits { | ||||||
|  |   (e: 'update:dark', darkMode: boolean): void; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | const emit = defineEmits<Emits>(); | ||||||
|  |  | ||||||
|  | const darkMode = computed({ | ||||||
|  |   get() { | ||||||
|  |     return props.dark; | ||||||
|  |   }, | ||||||
|  |   set(newValue: boolean) { | ||||||
|  |     emit('update:dark', newValue); | ||||||
|  |   } | ||||||
|  | }); | ||||||
|  |  | ||||||
|  | async function handleSwitch(event: MouseEvent) { | ||||||
|  |   const x = event.clientX; | ||||||
|  |   const y = event.clientY; | ||||||
|  |  | ||||||
|  |   if (!props.customizeTransition || !document.startViewTransition) { | ||||||
|  |     darkMode.value = !darkMode.value; | ||||||
|  |     return; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   const endRadius = Math.hypot(Math.max(x, innerWidth - x), Math.max(y, innerHeight - y)); | ||||||
|  |  | ||||||
|  |   const transition = document.startViewTransition(() => { | ||||||
|  |     darkMode.value = !darkMode.value; | ||||||
|  |   }); | ||||||
|  |  | ||||||
|  |   await transition.ready; | ||||||
|  |  | ||||||
|  |   const clipPath = [`circle(0px at ${x}px ${y}px)`, `circle(${endRadius}px at ${x}px ${y}px)`]; | ||||||
|  |  | ||||||
|  |   document.documentElement.animate( | ||||||
|  |     { | ||||||
|  |       clipPath: darkMode.value ? clipPath : [...clipPath].reverse() | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       duration: 300, | ||||||
|  |       easing: 'ease-in', | ||||||
|  |       pseudoElement: darkMode.value ? '::view-transition-new(root)' : '::view-transition-old(root)' | ||||||
|  |     } | ||||||
|  |   ); | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  |  | ||||||
|  | <style> | ||||||
|  | ::view-transition-old(root), | ||||||
|  | ::view-transition-new(root) { | ||||||
|  |   animation: none; | ||||||
|  |   mix-blend-mode: normal; | ||||||
|  | } | ||||||
|  | ::view-transition-old(root) { | ||||||
|  |   z-index: 9999; | ||||||
|  | } | ||||||
|  | ::view-transition-new(root) { | ||||||
|  |   z-index: 1; | ||||||
|  | } | ||||||
|  | .dark::view-transition-old(root) { | ||||||
|  |   z-index: 1; | ||||||
|  | } | ||||||
|  | .dark::view-transition-new(root) { | ||||||
|  |   z-index: 9999; | ||||||
|  | } | ||||||
|  | </style> | ||||||
							
								
								
									
										31
									
								
								src/components/common/exception-base.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,31 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="flex-col-center gap-24px min-h-520px wh-full overflow-hidden"> | ||||||
|  |     <div class="flex text-400px text-primary"> | ||||||
|  |       <icon-local-no-permission v-if="type === '403'" /> | ||||||
|  |       <icon-local-not-found v-if="type === '404'" /> | ||||||
|  |       <icon-local-service-error v-if="type === '500'" /> | ||||||
|  |     </div> | ||||||
|  |     <router-link :to="{ name: routeHomePath }"> | ||||||
|  |       <n-button type="primary">回到首页</n-button> | ||||||
|  |     </router-link> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <script lang="ts" setup> | ||||||
|  | import { routeName } from '@/router'; | ||||||
|  |  | ||||||
|  | defineOptions({ name: 'ExceptionBase' }); | ||||||
|  |  | ||||||
|  | type ExceptionType = '403' | '404' | '500'; | ||||||
|  |  | ||||||
|  | interface Props { | ||||||
|  |   /** 异常类型 403 404 500 */ | ||||||
|  |   type: ExceptionType; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | defineProps<Props>(); | ||||||
|  |  | ||||||
|  | const routeHomePath = routeName('root'); | ||||||
|  | </script> | ||||||
|  |  | ||||||
|  | <style scoped></style> | ||||||
| @@ -2,37 +2,47 @@ | |||||||
|   <div v-if="showTooltip"> |   <div v-if="showTooltip"> | ||||||
|     <n-tooltip :placement="placement" trigger="hover"> |     <n-tooltip :placement="placement" trigger="hover"> | ||||||
|       <template #trigger> |       <template #trigger> | ||||||
|         <div class="flex-center h-full cursor-pointer hover:bg-[#f6f6f6] dark:hover:bg-[#333]" :class="contentClass"> |         <div class="flex-center h-full cursor-pointer dark:hover:bg-#333" :class="contentClassName"> | ||||||
|           <slot></slot> |           <slot></slot> | ||||||
|         </div> |         </div> | ||||||
|       </template> |       </template> | ||||||
|       {{ tooltipContent }} |       {{ tooltipContent }} | ||||||
|     </n-tooltip> |     </n-tooltip> | ||||||
|   </div> |   </div> | ||||||
|   <div v-else class="flex-center cursor-pointer hover:bg-[#f6f6f6] dark:hover:bg-[#333]" :class="contentClass"> |   <div v-else class="flex-center cursor-pointer dark:hover:bg-#333" :class="contentClassName"> | ||||||
|     <slot></slot> |     <slot></slot> | ||||||
|   </div> |   </div> | ||||||
| </template> | </template> | ||||||
| 
 | 
 | ||||||
| <script lang="ts" setup> | <script lang="ts" setup> | ||||||
| import { computed } from 'vue'; | import { computed } from 'vue'; | ||||||
| import { NTooltip } from 'naive-ui'; | import type { PopoverPlacement } from 'naive-ui'; | ||||||
| import type { FollowerPlacement } from 'vueuc'; | 
 | ||||||
|  | defineOptions({ name: 'HoverContainer' }); | ||||||
| 
 | 
 | ||||||
| interface Props { | interface Props { | ||||||
|   /** tooltip显示文本 */ |   /** tooltip显示文本 */ | ||||||
|   tooltipContent?: string; |   tooltipContent?: string; | ||||||
|   /** tooltip的位置 */ |   /** tooltip的位置 */ | ||||||
|   placement?: FollowerPlacement; |   placement?: PopoverPlacement; | ||||||
|   /** class类 */ |   /** class类 */ | ||||||
|   contentClass?: string; |   contentClass?: string; | ||||||
|  |   /** 反转模式下 */ | ||||||
|  |   inverted?: boolean; | ||||||
| } | } | ||||||
|  | 
 | ||||||
| const props = withDefaults(defineProps<Props>(), { | const props = withDefaults(defineProps<Props>(), { | ||||||
|   tooltipContent: '', |   tooltipContent: '', | ||||||
|   placement: 'bottom', |   placement: 'bottom', | ||||||
|   contentClass: '' |   contentClass: '', | ||||||
|  |   inverted: false | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| const showTooltip = computed(() => Boolean(props.tooltipContent)); | const showTooltip = computed(() => Boolean(props.tooltipContent)); | ||||||
|  | 
 | ||||||
|  | const contentClassName = computed( | ||||||
|  |   () => `${props.contentClass} ${props.inverted ? 'hover:bg-primary' : 'hover:bg-#f6f6f6'}` | ||||||
|  | ); | ||||||
| </script> | </script> | ||||||
|  | 
 | ||||||
| <style scoped></style> | <style scoped></style> | ||||||