@gx-design-vue/create-gx-cli 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. package/package.json +2 -1
  2. package/template-gx-design-thin/.editorconfig +19 -0
  3. package/template-gx-design-thin/.env +4 -0
  4. package/template-gx-design-thin/.env.development +15 -0
  5. package/template-gx-design-thin/.env.production +28 -0
  6. package/template-gx-design-thin/.eslintignore +16 -0
  7. package/template-gx-design-thin/.prettierignore +9 -0
  8. package/template-gx-design-thin/LICENSE +21 -0
  9. package/template-gx-design-thin/README.md +112 -0
  10. package/template-gx-design-thin/build/constant.ts +1 -0
  11. package/template-gx-design-thin/build/generate/generateModifyVars.ts +14 -0
  12. package/template-gx-design-thin/build/rollupOptions/index.ts +22 -0
  13. package/template-gx-design-thin/build/util/hash.ts +17 -0
  14. package/template-gx-design-thin/build/util/index.ts +131 -0
  15. package/template-gx-design-thin/build/vite/cdn.ts +63 -0
  16. package/template-gx-design-thin/build/vite/optimizer.ts +26 -0
  17. package/template-gx-design-thin/build/vite/plugin/appConfig.ts +91 -0
  18. package/template-gx-design-thin/build/vite/plugin/autoImport.ts +26 -0
  19. package/template-gx-design-thin/build/vite/plugin/compress.ts +31 -0
  20. package/template-gx-design-thin/build/vite/plugin/html.ts +39 -0
  21. package/template-gx-design-thin/build/vite/plugin/index.ts +75 -0
  22. package/template-gx-design-thin/build/vite/plugin/mock.ts +14 -0
  23. package/template-gx-design-thin/build/vite/plugin/pwa.ts +31 -0
  24. package/template-gx-design-thin/build/vite/plugin/visualizer.ts +14 -0
  25. package/template-gx-design-thin/build/vite/plugin/viteMock/client.ts +88 -0
  26. package/template-gx-design-thin/build/vite/plugin/viteMock/createMockServer.ts +271 -0
  27. package/template-gx-design-thin/build/vite/plugin/viteMock/index.ts +69 -0
  28. package/template-gx-design-thin/build/vite/plugin/viteMock/types.ts +48 -0
  29. package/template-gx-design-thin/build/vite/plugin/viteMock/utils.ts +48 -0
  30. package/template-gx-design-thin/build/vite/plugin/viteNotice.ts +40 -0
  31. package/template-gx-design-thin/commitlint.config.cjs +32 -0
  32. package/template-gx-design-thin/config/default/defaultSettings.ts +78 -0
  33. package/template-gx-design-thin/config/default/network.ts +10 -0
  34. package/template-gx-design-thin/config/default/proxy.ts +47 -0
  35. package/template-gx-design-thin/config/default/theme.ts +3 -0
  36. package/template-gx-design-thin/config/index.ts +11 -0
  37. package/template-gx-design-thin/eslint.config.js +51 -0
  38. package/template-gx-design-thin/index.html +42 -0
  39. package/template-gx-design-thin/mock/_createProductionServer.ts +19 -0
  40. package/template-gx-design-thin/mock/_util.ts +33 -0
  41. package/template-gx-design-thin/mock/config/menu.ts +21 -0
  42. package/template-gx-design-thin/mock/config/user.ts +123 -0
  43. package/template-gx-design-thin/mock/datasSource/system/menu.ts +10 -0
  44. package/template-gx-design-thin/mock/datasSource/user/account.ts +30 -0
  45. package/template-gx-design-thin/mock/datasSource/user/index.ts +47 -0
  46. package/template-gx-design-thin/mock/util/crypto.ts +23 -0
  47. package/template-gx-design-thin/mock/util/table.ts +92 -0
  48. package/template-gx-design-thin/mock/util/utils.ts +73 -0
  49. package/template-gx-design-thin/package.json +129 -0
  50. package/template-gx-design-thin/pnpm-lock.yaml +12575 -0
  51. package/template-gx-design-thin/prettier.config.cjs +18 -0
  52. package/template-gx-design-thin/public/resource/css/index.css +119 -0
  53. package/template-gx-design-thin/public/resource/css/normalize.css +396 -0
  54. package/template-gx-design-thin/public/resource/img/favicon.ico +0 -0
  55. package/template-gx-design-thin/public/resource/img/logo.png +0 -0
  56. package/template-gx-design-thin/public/resource/img/pro_icon.svg +1 -0
  57. package/template-gx-design-thin/public/resource/img/pwa-192x192.png +0 -0
  58. package/template-gx-design-thin/public/resource/img/pwa-512x512.png +0 -0
  59. package/template-gx-design-thin/src/App.vue +42 -0
  60. package/template-gx-design-thin/src/assets/error_images/403.png +0 -0
  61. package/template-gx-design-thin/src/assets/error_images/404.png +0 -0
  62. package/template-gx-design-thin/src/assets/error_images/cloud.png +0 -0
  63. package/template-gx-design-thin/src/assets/login_images/login_background.svg +1 -0
  64. package/template-gx-design-thin/src/assets/logo.png +0 -0
  65. package/template-gx-design-thin/src/assets/menu_font/iconfont.css +94 -0
  66. package/template-gx-design-thin/src/assets/menu_font/iconfont.eot +0 -0
  67. package/template-gx-design-thin/src/assets/menu_font/iconfont.js +1 -0
  68. package/template-gx-design-thin/src/assets/menu_font/iconfont.json +142 -0
  69. package/template-gx-design-thin/src/assets/menu_font/iconfont.svg +1 -0
  70. package/template-gx-design-thin/src/assets/menu_font/iconfont.ttf +0 -0
  71. package/template-gx-design-thin/src/assets/menu_font/iconfont.woff +0 -0
  72. package/template-gx-design-thin/src/assets/menu_font/iconfont.woff2 +0 -0
  73. package/template-gx-design-thin/src/assets/menu_font/index.less +94 -0
  74. package/template-gx-design-thin/src/assets/public_icon/iconfont.css +42 -0
  75. package/template-gx-design-thin/src/assets/public_icon/iconfont.eot +0 -0
  76. package/template-gx-design-thin/src/assets/public_icon/iconfont.js +1 -0
  77. package/template-gx-design-thin/src/assets/public_icon/iconfont.json +51 -0
  78. package/template-gx-design-thin/src/assets/public_icon/iconfont.svg +1 -0
  79. package/template-gx-design-thin/src/assets/public_icon/iconfont.ttf +0 -0
  80. package/template-gx-design-thin/src/assets/public_icon/iconfont.woff +0 -0
  81. package/template-gx-design-thin/src/assets/public_icon/iconfont.woff2 +0 -0
  82. package/template-gx-design-thin/src/assets/public_icon/index.less +42 -0
  83. package/template-gx-design-thin/src/assets/public_images/nodata.svg +1 -0
  84. package/template-gx-design-thin/src/common/global.ts +4 -0
  85. package/template-gx-design-thin/src/components/GDesign/Result/index.tsx +144 -0
  86. package/template-gx-design-thin/src/components/GDesign/Result/style.less +140 -0
  87. package/template-gx-design-thin/src/components/GDesign/utils/index.ts +7 -0
  88. package/template-gx-design-thin/src/components/GlobalLayout/Confirm/index.ts +21 -0
  89. package/template-gx-design-thin/src/components/GlobalLayout/Empty/index.vue +18 -0
  90. package/template-gx-design-thin/src/components/GlobalLayout/RightContent/index.tsx +126 -0
  91. package/template-gx-design-thin/src/components/GlobalLayout/RightContent/style.ts +77 -0
  92. package/template-gx-design-thin/src/components/GlobalLayout/Spin/index.tsx +30 -0
  93. package/template-gx-design-thin/src/components/PageLoading/index.tsx +51 -0
  94. package/template-gx-design-thin/src/components/index.ts +6 -0
  95. package/template-gx-design-thin/src/core/ant-design/index.ts +10 -0
  96. package/template-gx-design-thin/src/core/gx-admin-design/index.ts +6 -0
  97. package/template-gx-design-thin/src/core/gx-design/index.ts +6 -0
  98. package/template-gx-design-thin/src/core/gx-pro-design/index.ts +8 -0
  99. package/template-gx-design-thin/src/core/index.ts +84 -0
  100. package/template-gx-design-thin/src/design/ant-design/index.less +4 -0
  101. package/template-gx-design-thin/src/design/ant-design/layout.less +22 -0
  102. package/template-gx-design-thin/src/design/ant-design/menu.less +48 -0
  103. package/template-gx-design-thin/src/design/ant-design/spin.less +23 -0
  104. package/template-gx-design-thin/src/design/ant-design/tooltip.less +7 -0
  105. package/template-gx-design-thin/src/design/color.less +1 -0
  106. package/template-gx-design-thin/src/design/config.less +5 -0
  107. package/template-gx-design-thin/src/design/imageEditor.less +180 -0
  108. package/template-gx-design-thin/src/design/index.less +95 -0
  109. package/template-gx-design-thin/src/design/mixin.less +65 -0
  110. package/template-gx-design-thin/src/design/normalize.less +391 -0
  111. package/template-gx-design-thin/src/design/root.less +3 -0
  112. package/template-gx-design-thin/src/hooks/core/index.ts +3 -0
  113. package/template-gx-design-thin/src/hooks/core/useRequest/index.ts +118 -0
  114. package/template-gx-design-thin/src/hooks/event/index.ts +3 -0
  115. package/template-gx-design-thin/src/hooks/event/useClipboard.ts +15 -0
  116. package/template-gx-design-thin/src/hooks/web/index.ts +5 -0
  117. package/template-gx-design-thin/src/hooks/web/useThemeStyle.ts +16 -0
  118. package/template-gx-design-thin/src/layout/BasicLayout.vue +123 -0
  119. package/template-gx-design-thin/src/layout/BlankLayout.vue +5 -0
  120. package/template-gx-design-thin/src/layout/ContentView.vue +50 -0
  121. package/template-gx-design-thin/src/layout/IframeView.vue +1 -0
  122. package/template-gx-design-thin/src/layout/UserLayout.vue +7 -0
  123. package/template-gx-design-thin/src/main.ts +34 -0
  124. package/template-gx-design-thin/src/plugins/index.ts +2 -0
  125. package/template-gx-design-thin/src/router/guard/index.ts +83 -0
  126. package/template-gx-design-thin/src/router/guard/permissions.ts +70 -0
  127. package/template-gx-design-thin/src/router/guard/stateGuard.ts +10 -0
  128. package/template-gx-design-thin/src/router/helper/routeHelper.ts +231 -0
  129. package/template-gx-design-thin/src/router/helper/utils.ts +19 -0
  130. package/template-gx-design-thin/src/router/index.ts +31 -0
  131. package/template-gx-design-thin/src/router/routes/index.ts +86 -0
  132. package/template-gx-design-thin/src/router/routes/modules/dataSource.ts +12 -0
  133. package/template-gx-design-thin/src/services/common/index.ts +11 -0
  134. package/template-gx-design-thin/src/services/systemCenter/index.ts +1 -0
  135. package/template-gx-design-thin/src/services/systemCenter/menu.ts +9 -0
  136. package/template-gx-design-thin/src/services/userCenter/account.ts +42 -0
  137. package/template-gx-design-thin/src/services/userCenter/index.ts +28 -0
  138. package/template-gx-design-thin/src/store/index.ts +32 -0
  139. package/template-gx-design-thin/src/store/modules/dict.ts +28 -0
  140. package/template-gx-design-thin/src/store/modules/global.ts +42 -0
  141. package/template-gx-design-thin/src/store/modules/permission.ts +19 -0
  142. package/template-gx-design-thin/src/store/modules/routes.ts +113 -0
  143. package/template-gx-design-thin/src/store/modules/tabsRouter.ts +76 -0
  144. package/template-gx-design-thin/src/store/modules/user.ts +136 -0
  145. package/template-gx-design-thin/src/utils/accessToken.ts +80 -0
  146. package/template-gx-design-thin/src/utils/crypto/base64.ts +101 -0
  147. package/template-gx-design-thin/src/utils/crypto/index.ts +57 -0
  148. package/template-gx-design-thin/src/utils/env.ts +50 -0
  149. package/template-gx-design-thin/src/utils/fetchFile.ts +81 -0
  150. package/template-gx-design-thin/src/utils/index.ts +123 -0
  151. package/template-gx-design-thin/src/utils/pageTitle.ts +20 -0
  152. package/template-gx-design-thin/src/utils/request/XHR.ts +139 -0
  153. package/template-gx-design-thin/src/utils/request/axiosCancel.ts +69 -0
  154. package/template-gx-design-thin/src/utils/request/checkStatus.ts +25 -0
  155. package/template-gx-design-thin/src/utils/request/index.ts +144 -0
  156. package/template-gx-design-thin/src/utils/request/typings.ts +171 -0
  157. package/template-gx-design-thin/src/utils/storage.ts +199 -0
  158. package/template-gx-design-thin/src/utils/uploadFile.ts +27 -0
  159. package/template-gx-design-thin/src/utils/util.ts +198 -0
  160. package/template-gx-design-thin/src/utils/validate.ts +216 -0
  161. package/template-gx-design-thin/src/views/Iframe/index.vue +76 -0
  162. package/template-gx-design-thin/src/views/Page/one.vue +13 -0
  163. package/template-gx-design-thin/src/views/Page/two.vue +13 -0
  164. package/template-gx-design-thin/src/views/exception/403/index.vue +7 -0
  165. package/template-gx-design-thin/src/views/exception/404/index.vue +9 -0
  166. package/template-gx-design-thin/src/views/user/login/index.vue +109 -0
  167. package/template-gx-design-thin/src/views/user/login/style.less +38 -0
  168. package/template-gx-design-thin/tsconfig.json +46 -0
  169. package/template-gx-design-thin/types/ant-design-import.d.ts +99 -0
  170. package/template-gx-design-thin/types/auto-imports.d.ts +81 -0
  171. package/template-gx-design-thin/types/components.d.ts +24 -0
  172. package/template-gx-design-thin/types/config.d.ts +44 -0
  173. package/template-gx-design-thin/types/global.d.ts +97 -0
  174. package/template-gx-design-thin/types/mock.d.ts +16 -0
  175. package/template-gx-design-thin/types/module.d.ts +20 -0
  176. package/template-gx-design-thin/types/response.d.ts +15 -0
  177. package/template-gx-design-thin/unocss.config.ts +101 -0
  178. package/template-gx-design-thin/vite.config.ts +120 -0
  179. package/template-gx-design-thin/yarn.lock +9492 -0
@@ -0,0 +1,42 @@
1
+ @font-face {
2
+ font-family: "iconfont"; /* Project id 4439814 */
3
+ src: url('iconfont.eot?t=1712022371050'); /* IE9 */
4
+ src: url('iconfont.eot?t=1712022371050#iefix') format('embedded-opentype'), /* IE6-IE8 */
5
+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f48xYQTHysMG4k0VE3z4Enjis0qtOAIKOGHdVqTxp7+Jk08RJKUgjNTTSbgyMvSrCyYgcFZ/JW2wg4rzpUiUKnLvWkNxJr1LWPto1s2HZt0n2awIMI5MMEmAiTIDSqn5q9lM+QoCsSRNK2GbOLBxDpOIXZnWZ7gLAbMbupAKu1+DCzx2eRF6HMtQHCHPRh9l3KYTc1BxvREsm7mNkfDQAAAAA=') format('woff2'),
6
+ url('iconfont.woff?t=1712022371050') format('woff'),
7
+ url('iconfont.ttf?t=1712022371050') format('truetype'),
8
+ url('iconfont.svg?t=1712022371050#iconfont') format('svg');
9
+ }
10
+
11
+ .iconfont {
12
+ font-family: "iconfont" !important;
13
+ font-size: 16px;
14
+ font-style: normal;
15
+ -webkit-font-smoothing: antialiased;
16
+ -moz-osx-font-smoothing: grayscale;
17
+ }
18
+
19
+ .gx-github:before {
20
+ content: "\e85a";
21
+ }
22
+
23
+ .gx-gitee:before {
24
+ content: "\e616";
25
+ }
26
+
27
+ .gx-jianjie:before {
28
+ content: "\e693";
29
+ }
30
+
31
+ .gx-chanpinwendang:before {
32
+ content: "\e637";
33
+ }
34
+
35
+ .gx-a-kuaisukaishi-weixuanzhong3x1:before {
36
+ content: "\e601";
37
+ }
38
+
39
+ .gx-jiazaizhong:before {
40
+ content: "\e73f";
41
+ }
42
+
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" class="icon" p-id="4596" t="1708482291223" version="1.1" viewBox="0 0 1485 1024"><path fill="#d9d9d9" d="M148.994 689.28h19.968a9.984 9.984 0 0 1 0 19.84h-19.968v20.48a9.984 9.984 0 0 1-9.984 9.728 10.112 10.112 0 0 1-10.368-9.728v-20.48h-19.584a9.984 9.984 0 0 1-9.856-9.984 9.856 9.856 0 0 1 9.856-9.856h20.224v-20.096a9.984 9.984 0 0 1 19.84 0v20.096z m1306.624-79.616v-19.968a9.6 9.6 0 0 0-2.944-7.04 10.24 10.24 0 0 0-7.04-2.816 9.984 9.984 0 0 0-9.856 9.856v19.968h-20.096a8.96 8.96 0 0 0-6.912 3.072 9.344 9.344 0 0 0-2.816 6.912 9.984 9.984 0 0 0 9.728 9.984h20.096V649.6a9.856 9.856 0 0 0 9.856 9.856 9.984 9.984 0 0 0 9.984-9.856v-19.968h20.096a9.984 9.984 0 0 0 0-19.968zM736.386 937.856H238.082a19.328 19.328 0 0 1-13.824-5.888 19.84 19.84 0 0 1 13.824-33.92h89.6a80.128 80.128 0 0 1-10.624-39.68V281.6a80 80 0 0 1 23.168-56.192 79.104 79.104 0 0 1 56.064-23.296h59.264v-20.096a79.488 79.488 0 0 1 23.296-56.192 78.464 78.464 0 0 1 56.192-23.424h475.008a79.36 79.36 0 0 1 79.232 79.36v577.28a78.464 78.464 0 0 1-10.624 39.552h109.44a19.968 19.968 0 0 1 0 39.808H950.786v19.968a78.464 78.464 0 0 1-10.496 39.68h10.496a19.712 19.712 0 0 1 19.84 19.84 19.968 19.968 0 0 1-19.84 19.968H846.722a39.424 39.424 0 0 1-6.016 48.384 40.32 40.32 0 0 1-28.032 11.776 39.296 39.296 0 0 1-28.032-11.776z m72.448-39.808h62.976a39.68 39.68 0 0 0 39.424-40.448V280.448a38.4 38.4 0 0 0-38.4-38.4H395.01a38.4 38.4 0 0 0-38.4 38.4V857.6a39.936 39.936 0 0 0 39.424 39.936h300.544l-9.984-10.24a40.064 40.064 0 0 1-10.368-38.4l-18.688-18.688A138.112 138.112 0 0 1 469.89 809.6a139.648 139.648 0 0 1 6.656-189.312 137.984 137.984 0 0 1 188.928-7.04 139.52 139.52 0 0 1 20.096 188.8l19.072 19.072a39.424 39.424 0 0 1 38.4 10.24z m141.952-99.456h59.776a39.808 39.808 0 0 0 39.68-39.808V182.016a39.68 39.68 0 0 0-39.424-39.808H534.914a39.808 39.808 0 0 0-39.424 39.808v19.84h375.552a79.104 79.104 0 0 1 79.616 79.744v516.992zM253.058 67.584h29.184a14.976 14.976 0 1 1 0 29.824h-29.44v29.696a14.976 14.976 0 1 1-29.824 0V97.408h-29.312a14.848 14.848 0 0 1-10.624-4.224 14.976 14.976 0 0 1 10.624-25.6h29.568V38.4a14.976 14.976 0 1 1 29.824 0zM20.354 917.888a19.968 19.968 0 0 1 19.712-19.84h119.04a19.712 19.712 0 0 1 19.712 19.84 19.968 19.968 0 0 1-19.712 19.968H40.066a19.84 19.84 0 0 1-13.824-5.888 19.456 19.456 0 0 1-5.76-14.08z m624.256-128a99.84 99.84 0 0 0 0-140.8 98.816 98.816 0 0 0-140.032 0 99.84 99.84 0 0 0 0 140.8 98.816 98.816 0 0 0 140.032 0z m-208.768-468.48a19.84 19.84 0 0 1 19.712-19.968h217.6a19.968 19.968 0 0 1 0 39.808h-217.6a20.736 20.736 0 0 1-14.08-5.76 20.224 20.224 0 0 1-5.632-14.08z m0 99.328a19.84 19.84 0 0 1 19.712-19.84h317.312a19.968 19.968 0 0 1 0 39.808H455.682a19.712 19.712 0 0 1-19.84-19.968z m0 99.456a19.84 19.84 0 0 1 19.712-19.84h139.008a19.84 19.84 0 0 1 0 39.68H455.81a19.84 19.84 0 0 1-19.968-19.84zM60.034 400.896a59.648 59.648 0 1 1 59.264-59.648 59.392 59.392 0 0 1-59.264 59.648z m0-29.824a29.824 29.824 0 0 0 0-59.648 29.824 29.824 0 0 0 0 59.648z m1227.392-89.6a59.648 59.648 0 1 1 59.264-59.648 59.264 59.264 0 0 1-59.264 59.776z m0-29.824a29.568 29.568 0 0 0 25.6-14.976 30.208 30.208 0 0 0 0-29.824 29.696 29.696 0 1 0-25.6 44.8z" p-id="4597"/></svg>
@@ -0,0 +1,4 @@
1
+ export default {
2
+ videoAllowType: [ 'mp4', 'webm', 'ogg' ],
3
+ audioAllowType: [ 'mp3' ],
4
+ }
@@ -0,0 +1,144 @@
1
+ import { computed, defineComponent, onBeforeUnmount, onMounted, reactive, watch } from 'vue'
2
+ import { useRouter } from 'vue-router'
3
+ import Result403 from '@/assets/error_images/403.png'
4
+ import Result404 from '@/assets/error_images/404.png'
5
+ import ResultCloud from '@/assets/error_images/cloud.png'
6
+
7
+ import './style.less'
8
+
9
+ export interface SubInfo {
10
+ headline: string
11
+ info: string
12
+ exceptionImage: string
13
+ }
14
+
15
+ interface ResultSubInfo {
16
+ 404: SubInfo
17
+ 403: SubInfo
18
+ }
19
+
20
+ interface ResultState {
21
+ jumpTime: number
22
+ oops: string
23
+ headline: string
24
+ info: string
25
+ btn: string
26
+ timer: number | any
27
+ exceptionImage: any
28
+ }
29
+
30
+ const resultSubInfo: ResultSubInfo = {
31
+ '404': {
32
+ headline: '当前页面不存在...',
33
+ info: '请检查您输入的网址是否正确,或点击下面的按钮返回首页。',
34
+ exceptionImage: Result404
35
+ },
36
+ '403': {
37
+ headline: '您没有操作角色...',
38
+ info: '当前帐号没有操作角色,请联系管理员。',
39
+ exceptionImage: Result403
40
+ }
41
+ }
42
+
43
+ export default defineComponent({
44
+ props: {
45
+ status: {
46
+ type: String,
47
+ required: true,
48
+ default: '404'
49
+ }
50
+ },
51
+ setup(props) {
52
+ const store = useStore()
53
+ const router = useRouter()
54
+
55
+ const routers = computed(() => store.routes.routes)
56
+
57
+ const backRouter = computed(() => (routers.value?.length ? '/' : '/user/login'))
58
+
59
+ const state = reactive<ResultState>({
60
+ jumpTime: 5,
61
+ oops: '抱歉!',
62
+ headline: '您没有操作角色...',
63
+ info: '当前帐号没有操作角色,请联系管理员。',
64
+ btn: `${routers.value?.length ? '返回首页' : '返回登录页'}`,
65
+ timer: 0,
66
+ exceptionImage: Result404
67
+ })
68
+
69
+ const handleBackRouter = () => {
70
+ router.push({ path: backRouter.value })
71
+ if (routers.value?.length) {
72
+ store.tabsRouter.delOthersVisitedRoutes({ path: '/' })
73
+ } else {
74
+ store.user.resetPermissions()
75
+ }
76
+ clearInterval(state.timer)
77
+ }
78
+
79
+ const timeChange = () => {
80
+ state.timer = setInterval(() => {
81
+ if (state.jumpTime) {
82
+ state.jumpTime--
83
+ } else {
84
+ handleBackRouter()
85
+ }
86
+ }, 1000)
87
+ }
88
+
89
+ onMounted(() => {
90
+ timeChange()
91
+ })
92
+
93
+ onBeforeUnmount(() => {
94
+ clearInterval(state.timer)
95
+ })
96
+
97
+ watch(
98
+ () => props.status,
99
+ (val: string) => {
100
+ Object.keys(resultSubInfo).map((item: string) => {
101
+ if (item === val) {
102
+ Object.keys(resultSubInfo[item]).map((el: any) => {
103
+ state[el] = resultSubInfo[item][el]
104
+ return el
105
+ })
106
+ }
107
+ return item
108
+ })
109
+ },
110
+ {
111
+ deep: true,
112
+ immediate: true
113
+ }
114
+ )
115
+
116
+ return () => (
117
+ <div class="error-container">
118
+ <div class="error-content">
119
+ <a-row gutter={20}>
120
+ <a-col lg={12} md={12} sm={24} xl={12} xs={24}>
121
+ <div class="pic-error">
122
+ <img class="pic-error-parent" src={state.exceptionImage} />
123
+ <img class={[ 'pic-error-child', 'left' ]} src={ResultCloud} />
124
+ </div>
125
+ </a-col>
126
+ <a-col lg={12} md={12} sm={24} xl={12} xs={24}>
127
+ <div class="bullshit">
128
+ <div class="bullshit-oops">{state.oops}</div>
129
+ <div class="bullshit-headline">{state.headline}</div>
130
+ <div class="bullshit-info">{state.info}</div>
131
+ <a class="bullshit-return-home" onClick={() => handleBackRouter()}>
132
+ {state.jumpTime}
133
+ s
134
+ &nbsp;
135
+ {state.btn}
136
+ </a>
137
+ </div>
138
+ </a-col>
139
+ </a-row>
140
+ </div>
141
+ </div>
142
+ )
143
+ }
144
+ })
@@ -0,0 +1,140 @@
1
+ .error-container {
2
+ position: relative;
3
+ height: 100vh;
4
+
5
+ .error-content {
6
+ position: absolute;
7
+ top: 55%;
8
+ left: 50%;
9
+ width: 40vw;
10
+ height: 400px;
11
+ transform: translate(-50%, -50%);
12
+
13
+ .pic-error {
14
+ position: relative;
15
+ float: left;
16
+ width: 100%;
17
+ overflow: hidden;
18
+
19
+ .pic-error-parent {
20
+ width: 100%;
21
+ }
22
+
23
+ .pic-error-child {
24
+ position: absolute;
25
+
26
+ &.left {
27
+ top: 17px;
28
+ left: 220px;
29
+ width: 80px;
30
+ opacity: 0;
31
+ animation-name: cloudLeft;
32
+ animation-duration: 2s;
33
+ animation-timing-function: linear;
34
+ animation-delay: 1s;
35
+ animation-fill-mode: forwards;
36
+ }
37
+
38
+ @keyframes cloudLeft {
39
+ 0% {
40
+ top: 17px;
41
+ left: 220px;
42
+ opacity: 0;
43
+ }
44
+
45
+ 20% {
46
+ top: 33px;
47
+ left: 188px;
48
+ opacity: 1;
49
+ }
50
+
51
+ 80% {
52
+ top: 81px;
53
+ left: 92px;
54
+ opacity: 1;
55
+ }
56
+
57
+ 100% {
58
+ top: 97px;
59
+ left: 60px;
60
+ opacity: 0;
61
+ }
62
+ }
63
+ }
64
+ }
65
+
66
+ .bullshit {
67
+ position: relative;
68
+ float: left;
69
+ width: 300px;
70
+ padding: 30px 0;
71
+ overflow: hidden;
72
+
73
+ .bullshit-oops {
74
+ margin-bottom: 20px;
75
+ font-size: 32px;
76
+ font-weight: bold;
77
+ line-height: 40px;
78
+ opacity: 0;
79
+ animation-name: slideUp;
80
+ animation-duration: 0.5s;
81
+ animation-fill-mode: forwards;
82
+ }
83
+
84
+ .bullshit-headline {
85
+ margin-bottom: 10px;
86
+ font-size: 20px;
87
+ font-weight: bold;
88
+ line-height: 24px;
89
+ color: #222;
90
+ opacity: 0;
91
+ animation-name: slideUp;
92
+ animation-duration: 0.5s;
93
+ animation-delay: 0.1s;
94
+ animation-fill-mode: forwards;
95
+ }
96
+
97
+ .bullshit-info {
98
+ margin-bottom: 30px;
99
+ font-size: 13px;
100
+ line-height: 21px;
101
+ opacity: 0;
102
+ animation-name: slideUp;
103
+ animation-duration: 0.5s;
104
+ animation-delay: 0.2s;
105
+ animation-fill-mode: forwards;
106
+ }
107
+
108
+ .bullshit-return-home {
109
+ display: block;
110
+ float: left;
111
+ width: 110px;
112
+ height: 36px;
113
+ font-size: 14px;
114
+ line-height: 36px;
115
+ color: #fff;
116
+ text-align: center;
117
+ cursor: pointer;
118
+ background: var(--gx-primary-color);
119
+ border-radius: 100px;
120
+ opacity: 0;
121
+ animation-name: slideUp;
122
+ animation-duration: 0.5s;
123
+ animation-delay: 0.3s;
124
+ animation-fill-mode: forwards;
125
+ }
126
+ }
127
+ }
128
+ }
129
+
130
+ @keyframes slideUp {
131
+ 0% {
132
+ opacity: 0;
133
+ transform: translateY(60px);
134
+ }
135
+
136
+ 100% {
137
+ opacity: 1;
138
+ transform: translateY(0);
139
+ }
140
+ }
@@ -0,0 +1,7 @@
1
+ import devWarning from 'ant-design-vue/es/vc-util/devWarning'
2
+
3
+ export { noteOnce, warning } from 'ant-design-vue/es/vc-util/warning'
4
+
5
+ export {
6
+ devWarning
7
+ }
@@ -0,0 +1,21 @@
1
+ import { createVNode } from 'vue'
2
+ import type { ModalFuncProps } from 'ant-design-vue'
3
+ import { Modal } from 'ant-design-vue'
4
+ import { ExclamationCircleOutlined } from '@ant-design/icons-vue'
5
+
6
+ export function globalConfirm({
7
+ className,
8
+ title,
9
+ content,
10
+ onOk
11
+ }: ModalFuncProps & { className?: string }) {
12
+ Modal.confirm({
13
+ width: 480,
14
+ icon: createVNode(ExclamationCircleOutlined),
15
+ closable: true,
16
+ title: title || '二次确认',
17
+ content,
18
+ wrapClassName: `${className || ''}`,
19
+ onOk
20
+ })
21
+ }
@@ -0,0 +1,18 @@
1
+ <script lang="ts" setup>
2
+ import { isBoolean } from '@gx-design-vue/pro-utils'
3
+
4
+ withDefaults(defineProps<{
5
+ text?: string | boolean;
6
+ width?: number;
7
+ }>(), {
8
+ text: '暂无数据',
9
+ width: 120
10
+ })
11
+ </script>
12
+
13
+ <template>
14
+ <div class="flex-center flex-col">
15
+ <img :style="{ width: `${width}px` }" src="/src/assets/public_images/nodata.svg" alt="">
16
+ <span class="relative left-[-5px]" v-if="text">{{ isBoolean(text) ? '暂无数据' : text }}</span>
17
+ </div>
18
+ </template>
@@ -0,0 +1,126 @@
1
+ import { defineComponent } from 'vue'
2
+ import { Avatar, Dropdown, Menu, MenuItem } from 'ant-design-vue'
3
+ import { LogoutOutlined, QuestionCircleOutlined, UserOutlined } from '@ant-design/icons-vue'
4
+ import { useDebounceFn } from '@vueuse/core'
5
+ import ResizeObserver from 'ant-design-vue/es/vc-resize-observer'
6
+ import { useState } from '@gx-design-vue/pro-hooks'
7
+ import { getPrefixCls } from '@gx-design-vue/pro-utils'
8
+ import { useProLayoutContext } from '@gx-design-vue/pro-layout'
9
+ import { typeViteEnv } from '@/utils/env'
10
+ import { useStyle } from './style'
11
+
12
+ export default defineComponent({
13
+ name: 'GlobalRightContent',
14
+ setup(_) {
15
+ const store = useStore()
16
+ const router = useRouter()
17
+ const { theme, layout } = useProLayoutContext()
18
+
19
+ const prefixCls = getPrefixCls({
20
+ suffixCls: 'global-header',
21
+ isPor: true
22
+ })
23
+
24
+ const [ logoutLoading, changeLoading ] = useState(false)
25
+ const { wrapSSR, hashId } = useStyle(prefixCls)
26
+
27
+ const layoutSide = computed(() => layout.value === 'side' || layout.value === 'simple')
28
+ const hTheme = computed(() => (layoutSide.value && 'light') || theme.value)
29
+
30
+ const [ rightSize, setRightSize ] = useState<number | string>('auto')
31
+
32
+ /** 减少一下渲染的次数 */
33
+ const setRightSizeDebounceFn = useDebounceFn(async (width: number) => {
34
+ setRightSize(width)
35
+ }, 160)
36
+
37
+ const handleLogout = () => {
38
+ changeLoading(true)
39
+ store.user.userLogut().then((_) => {}).finally(() => {
40
+ router.push({ path: '/user' })
41
+ changeLoading(false)
42
+ })
43
+ }
44
+
45
+ return () => {
46
+ return wrapSSR(
47
+ <div
48
+ class={`${prefixCls}-right-content ${hTheme.value} ${hashId.value}`.trim()}
49
+ style={{
50
+ minWidth: rightSize.value,
51
+ height: '100%'
52
+ }}
53
+ >
54
+ <div
55
+ style={{
56
+ height: '100%'
57
+ }}
58
+ >
59
+ <ResizeObserver
60
+ key="resize-observer"
61
+ onResize={({ width }) => {
62
+ setRightSizeDebounceFn(width)
63
+ }}
64
+ >
65
+ <div
66
+ style={{
67
+ display: 'flex',
68
+ alignItems: 'center',
69
+ height: '100%',
70
+ justifyContent: 'flex-end'
71
+ }}
72
+ >
73
+ <div class={`${prefixCls}-header-actions ${hashId.value}`.trim()}>
74
+ <div class={`${prefixCls}-header-actions-item ${hashId.value}`.trim()}>
75
+ <div class="flex leading-26px">
76
+ <QuestionCircleOutlined onClick={() => window.open(typeViteEnv('VITE_HOME_PAGE_DOC'))} />
77
+ </div>
78
+ </div>
79
+ <div class={`${prefixCls}-header-actions-item ${hashId.value}`.trim()}>
80
+ <div class="flex leading-26px" onClick={() => window.open(typeViteEnv('VITE_GITHUB_PAGE'))}>
81
+ <i class="iconfont gx-github !text-18px text-hex-main" />
82
+ </div>
83
+ </div>
84
+ <div class={`${prefixCls}-header-actions-item ${hashId.value}`.trim()}>
85
+ <div class="flex leading-26px" onClick={() => window.open(typeViteEnv('VITE_GITEE_PAGE'))}>
86
+ <i class="iconfont gx-gitee text-hex-C71D23" />
87
+ </div>
88
+ </div>
89
+ <div class={`${prefixCls}-header-actions-avatar ${hashId.value}`.trim()}>
90
+ <Dropdown
91
+ overlay={(
92
+ <Menu>
93
+ <MenuItem
94
+ key="logout"
95
+ icon={<LogoutOutlined />}
96
+ onClick={() => handleLogout()}
97
+ disabled={logoutLoading.value}
98
+ >
99
+ 退出登录
100
+ </MenuItem>
101
+ </Menu>
102
+ )}
103
+ >
104
+ <div>
105
+ <Avatar
106
+ size={28}
107
+ icon={<UserOutlined />}
108
+ src={store.user.userInfo.avatar}
109
+ />
110
+ <div style={{ marginInlineStart: '8px' }}>
111
+ <span class="anticon">
112
+ {store.user.userInfo.nickName}
113
+ </span>
114
+ </div>
115
+ </div>
116
+ </Dropdown>
117
+ </div>
118
+ </div>
119
+ </div>
120
+ </ResizeObserver>
121
+ </div>
122
+ </div>
123
+ )
124
+ }
125
+ }
126
+ })
@@ -0,0 +1,77 @@
1
+ import type { CSSObject } from 'ant-design-vue'
2
+ import type { GenerateStyle } from 'ant-design-vue/es/theme/internal'
3
+ import type { ProAliasToken } from '@gx-design-vue/pro-provider'
4
+ import { mergeToken, setAlpha, useStyle as useProStyle } from '@gx-design-vue/pro-provider'
5
+
6
+ const genStyle: GenerateStyle<ProAliasToken> = (token): CSSObject => {
7
+ return {
8
+ [`${token.componentCls}`]: {
9
+ [`${token.componentCls}-right-content.dark`]: {
10
+ [`${token.componentCls}-header-actions-item`]: {
11
+ '.iconfont,.anticon': {
12
+ color: token.colorWhite
13
+ }
14
+ },
15
+ [`${token.componentCls}-header-actions-avatar`]: {
16
+ '> div': {
17
+ color: token.colorWhite
18
+ }
19
+ },
20
+ },
21
+ '&-header-actions': {
22
+ display: 'flex',
23
+ height: '100%',
24
+ '&-item': {
25
+ display: 'inline-flex',
26
+ alignItems: 'center',
27
+ justifyContent: 'center',
28
+ paddingBlock: 0,
29
+ paddingInline: 2,
30
+ color: token.colorTextTertiary,
31
+ fontSize: '16px',
32
+ cursor: 'pointer',
33
+ borderRadius: token.borderRadius,
34
+
35
+ '> *': {
36
+ paddingInline: 6,
37
+ paddingBlock: 6,
38
+ borderRadius: token.borderRadius,
39
+ '&:hover': {
40
+ backgroundColor: setAlpha(token.colorTextBase, 0.03)
41
+ }
42
+ }
43
+ },
44
+ '&-avatar': {
45
+ display: 'inline-flex',
46
+ alignItems: 'center',
47
+ justifyContent: 'center',
48
+ paddingInlineStart: token.padding,
49
+ paddingInlineEnd: token.padding,
50
+ cursor: 'pointer',
51
+ color: token.colorTextTertiary,
52
+ '> div': {
53
+ height: '44px',
54
+ color: token.colorTextTertiary,
55
+ paddingInline: 8,
56
+ paddingBlock: 8,
57
+ cursor: 'pointer',
58
+ display: 'flex',
59
+ alignItems: 'center',
60
+ lineHeight: '44px',
61
+ borderRadius: token.borderRadius,
62
+ '&:hover': {
63
+ backgroundColor: setAlpha(token.colorTextBase, 0.03)
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
70
+ }
71
+
72
+ export function useStyle(componentCls: string) {
73
+ return useProStyle('RightContent', (token) => {
74
+ const formTable = mergeToken<ProAliasToken>(token)
75
+ return [ genStyle(formTable) ]
76
+ }, componentCls)
77
+ }
@@ -0,0 +1,30 @@
1
+ import { defineComponent, h } from 'vue'
2
+ import { spinProps } from 'ant-design-vue/es/spin'
3
+ import { Spin } from 'ant-design-vue'
4
+ import { useProAppContext } from '@gx-design-vue/pro-app'
5
+
6
+ export default defineComponent({
7
+ name: 'GSpin',
8
+ inheritAttrs: true,
9
+ props: {
10
+ iconStyle: Object as VuePropType<CSSProperties>,
11
+ ...spinProps()
12
+ },
13
+ setup(props, { slots, attrs }) {
14
+ const { indicator } = useProAppContext()
15
+
16
+ return () => {
17
+ const indicatorRender = indicator?.value ? h(indicator?.value as any, {
18
+ style: props.iconStyle
19
+ }) : undefined
20
+ return (
21
+ <Spin
22
+ class={attrs?.class}
23
+ {...props}
24
+ indicator={props.indicator || indicatorRender}
25
+ v-slots={slots}
26
+ />
27
+ )
28
+ }
29
+ }
30
+ })
@@ -0,0 +1,51 @@
1
+ import { defineComponent, reactive } from 'vue'
2
+ import type { SpinProps } from 'ant-design-vue'
3
+ import { Spin } from 'ant-design-vue'
4
+ import { useProAppContext } from '@gx-design-vue/pro-app'
5
+
6
+ export default defineComponent({
7
+ name: 'GPageLoading',
8
+ props: {
9
+ loading: {
10
+ type: Boolean,
11
+ default: false
12
+ },
13
+ tip: {
14
+ type: String,
15
+ default: ''
16
+ },
17
+ size: {
18
+ type: String as VuePropType<SpinProps['size']>,
19
+ default: 'large'
20
+ }
21
+ },
22
+ setup(props) {
23
+ const { indicator } = useProAppContext()
24
+
25
+ const style = reactive<CSSProperties>({
26
+ textAlign: 'center',
27
+ position: 'fixed',
28
+ top: 0,
29
+ bottom: 0,
30
+ left: 0,
31
+ right: 0,
32
+ zIndex: 0
33
+ })
34
+ const spinStyle = reactive({
35
+ position: 'absolute',
36
+ left: '50%',
37
+ top: '50%',
38
+ transform: 'translate(-50%, -50%)'
39
+ })
40
+
41
+ return () => (
42
+ <>
43
+ {props.loading ? (
44
+ <div style={style} class="gx-admin-page-loading">
45
+ <Spin size={props.size} style={spinStyle} tip={props.tip} indicator={indicator?.value} />
46
+ </div>
47
+ ) : null}
48
+ </>
49
+ )
50
+ }
51
+ })
@@ -0,0 +1,6 @@
1
+ // gx-admin-组件
2
+ import PageLoading from './PageLoading'
3
+
4
+ export {
5
+ PageLoading,
6
+ }