create-young-proj 0.13.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (324) hide show
  1. package/README.md +31 -22
  2. package/dist/index.mjs +34 -34
  3. package/package.json +12 -11
  4. package/template-nuxt-admin/README.md +23 -16
  5. package/template-nuxt-website/README.md +117 -0
  6. package/template-uni-app/README.md +5 -0
  7. package/template-admin-server/.editorconfig +0 -11
  8. package/template-admin-server/.nvmrc +0 -1
  9. package/template-admin-server/.vscode/extensions.json +0 -6
  10. package/template-admin-server/.vscode/settings.json +0 -4
  11. package/template-admin-server/_gitignore +0 -15
  12. package/template-admin-server/boot.mjs +0 -11
  13. package/template-admin-server/package.json +0 -60
  14. package/template-admin-server/rome.json +0 -22
  15. package/template-admin-server/src/config/config.default.ts +0 -56
  16. package/template-admin-server/src/configuration.ts +0 -47
  17. package/template-admin-server/src/controller/admin.controller.ts +0 -397
  18. package/template-admin-server/src/controller/api.controller.ts +0 -98
  19. package/template-admin-server/src/controller/base.controller.ts +0 -70
  20. package/template-admin-server/src/controller/dto/api.ts +0 -47
  21. package/template-admin-server/src/controller/dto/index.ts +0 -36
  22. package/template-admin-server/src/controller/dto/menu.ts +0 -41
  23. package/template-admin-server/src/controller/dto/role.ts +0 -41
  24. package/template-admin-server/src/controller/dto/user.ts +0 -52
  25. package/template-admin-server/src/controller/menu.controller.ts +0 -138
  26. package/template-admin-server/src/controller/role.controller.ts +0 -116
  27. package/template-admin-server/src/controller/user.controller.ts +0 -108
  28. package/template-admin-server/src/entities/Api.ts +0 -29
  29. package/template-admin-server/src/entities/BaseCreate.ts +0 -30
  30. package/template-admin-server/src/entities/Menu.ts +0 -39
  31. package/template-admin-server/src/entities/Role.ts +0 -36
  32. package/template-admin-server/src/entities/User.ts +0 -35
  33. package/template-admin-server/src/entities/index.ts +0 -10
  34. package/template-admin-server/src/filter/default.filter.ts +0 -22
  35. package/template-admin-server/src/filter/notfound.filter.ts +0 -23
  36. package/template-admin-server/src/middleware/helper.middleware.ts +0 -28
  37. package/template-admin-server/src/middleware/index.ts +0 -9
  38. package/template-admin-server/src/middleware/jwt.middleware.ts +0 -32
  39. package/template-admin-server/src/middleware/report.middleware.ts +0 -26
  40. package/template-admin-server/src/service/api.service.ts +0 -174
  41. package/template-admin-server/src/service/basic.ts +0 -118
  42. package/template-admin-server/src/service/index.ts +0 -10
  43. package/template-admin-server/src/service/menu.service.ts +0 -139
  44. package/template-admin-server/src/service/role.service.ts +0 -286
  45. package/template-admin-server/src/service/user.service.ts +0 -124
  46. package/template-admin-server/src/strategy/jwt.strategy.ts +0 -26
  47. package/template-admin-server/src/types/index.ts +0 -42
  48. package/template-admin-server/src/types/types.d.ts +0 -31
  49. package/template-admin-server/tsconfig.json +0 -24
  50. package/template-nuxt-admin/.eslintrc +0 -14
  51. package/template-nuxt-admin/.vscode/extensions.json +0 -12
  52. package/template-nuxt-admin/.vscode/settings.json +0 -25
  53. package/template-nuxt-admin/Dockerfile +0 -41
  54. package/template-nuxt-admin/_gitignore +0 -23
  55. package/template-nuxt-admin/_npmrc +0 -2
  56. package/template-nuxt-admin/app.vue +0 -41
  57. package/template-nuxt-admin/boot.mjs +0 -16
  58. package/template-nuxt-admin/components/ScreenFull.vue +0 -19
  59. package/template-nuxt-admin/components/TopSearch.vue +0 -77
  60. package/template-nuxt-admin/components/TopUser.vue +0 -72
  61. package/template-nuxt-admin/components/YoungChangePassword.vue +0 -97
  62. package/template-nuxt-admin/components/YoungCodeInput.vue +0 -66
  63. package/template-nuxt-admin/components/YoungLink.vue +0 -24
  64. package/template-nuxt-admin/components/YoungLoading.vue +0 -39
  65. package/template-nuxt-admin/components/layout/Footer.vue +0 -29
  66. package/template-nuxt-admin/components/layout/Logo.vue +0 -54
  67. package/template-nuxt-admin/components/layout/Main.vue +0 -26
  68. package/template-nuxt-admin/components/layout/NavBar.vue +0 -89
  69. package/template-nuxt-admin/components/layout/SideBar.vue +0 -96
  70. package/template-nuxt-admin/components/layout/SubMenu.vue +0 -52
  71. package/template-nuxt-admin/components/layout/TabsBar.vue +0 -184
  72. package/template-nuxt-admin/composables/api.ts +0 -105
  73. package/template-nuxt-admin/composables/apis/delete.ts +0 -37
  74. package/template-nuxt-admin/composables/apis/get.ts +0 -83
  75. package/template-nuxt-admin/composables/apis/index.ts +0 -10
  76. package/template-nuxt-admin/composables/apis/patch.ts +0 -74
  77. package/template-nuxt-admin/composables/apis/post.ts +0 -85
  78. package/template-nuxt-admin/composables/config.ts +0 -13
  79. package/template-nuxt-admin/composables/icon.ts +0 -27
  80. package/template-nuxt-admin/composables/nav.ts +0 -75
  81. package/template-nuxt-admin/composables/tags.ts +0 -136
  82. package/template-nuxt-admin/composables/user.ts +0 -46
  83. package/template-nuxt-admin/config/.devrc +0 -1
  84. package/template-nuxt-admin/config/.onlinerc +0 -1
  85. package/template-nuxt-admin/config/.testrc +0 -1
  86. package/template-nuxt-admin/env.d.ts +0 -47
  87. package/template-nuxt-admin/error.vue +0 -61
  88. package/template-nuxt-admin/layouts/blank.vue +0 -9
  89. package/template-nuxt-admin/layouts/default.vue +0 -125
  90. package/template-nuxt-admin/middleware/auth.global.ts +0 -69
  91. package/template-nuxt-admin/nuxt.config.ts +0 -106
  92. package/template-nuxt-admin/package.json +0 -64
  93. package/template-nuxt-admin/pages/home/[id].vue +0 -28
  94. package/template-nuxt-admin/pages/index.vue +0 -15
  95. package/template-nuxt-admin/pages/login.vue +0 -199
  96. package/template-nuxt-admin/pages/system/api.vue +0 -179
  97. package/template-nuxt-admin/pages/system/hooks/useRole.ts +0 -335
  98. package/template-nuxt-admin/pages/system/menuList.vue +0 -353
  99. package/template-nuxt-admin/pages/system/role.vue +0 -145
  100. package/template-nuxt-admin/pages/system/user.vue +0 -225
  101. package/template-nuxt-admin/plugins/directive.ts +0 -26
  102. package/template-nuxt-admin/public/bg.webp +0 -0
  103. package/template-nuxt-admin/public/default_avatar.svg +0 -1
  104. package/template-nuxt-admin/public/favicon.svg +0 -2
  105. package/template-nuxt-admin/public/image_placeholder.svg +0 -15
  106. package/template-nuxt-admin/public/logo.svg +0 -2
  107. package/template-nuxt-admin/public/tabbar_bg.png +0 -0
  108. package/template-nuxt-admin/server/api/[...all].ts +0 -10
  109. package/template-nuxt-admin/server/plugins/env.ts +0 -87
  110. package/template-nuxt-admin/server/routes/get/env.ts +0 -13
  111. package/template-nuxt-admin/server/tsconfig.json +0 -3
  112. package/template-nuxt-admin/server/utils/index.ts +0 -36
  113. package/template-nuxt-admin/styles/element.scss +0 -30
  114. package/template-nuxt-admin/styles/index.scss +0 -59
  115. package/template-nuxt-admin/styles/variable.scss +0 -103
  116. package/template-nuxt-admin/tsconfig.json +0 -7
  117. package/template-nuxt-admin/typings/global.d.ts +0 -16
  118. package/template-nuxt-admin/typings/system.d.ts +0 -66
  119. package/template-nuxt-admin/typings/user.d.ts +0 -19
  120. package/template-nuxt-admin/uno.config.ts +0 -40
  121. package/template-nuxt-admin/utils/tool.ts +0 -199
  122. package/template-nuxt-admin/yarn.lock +0 -8487
  123. package/template-uni-app/.eslintignore +0 -1
  124. package/template-uni-app/.eslintrc +0 -16
  125. package/template-uni-app/.vscode/.server-controller-port.log +0 -5
  126. package/template-uni-app/.vscode/css.code-snippets +0 -398
  127. package/template-uni-app/.vscode/extensions.json +0 -12
  128. package/template-uni-app/.vscode/js.code-snippets +0 -1669
  129. package/template-uni-app/.vscode/settings.json +0 -25
  130. package/template-uni-app/.vscode/vue-html.code-snippets +0 -682
  131. package/template-uni-app/_env +0 -3
  132. package/template-uni-app/_env.development +0 -11
  133. package/template-uni-app/_env.production +0 -8
  134. package/template-uni-app/_env.test +0 -11
  135. package/template-uni-app/_gitignore +0 -3
  136. package/template-uni-app/_npmrc +0 -2
  137. package/template-uni-app/auto-imports.d.ts +0 -413
  138. package/template-uni-app/components.d.ts +0 -17
  139. package/template-uni-app/custom-plugins/index.ts +0 -7
  140. package/template-uni-app/custom-plugins/multiconf.ts +0 -74
  141. package/template-uni-app/dist/dev/mp-weixin/apis/index.js +0 -43
  142. package/template-uni-app/dist/dev/mp-weixin/apis/requests/get.js +0 -10
  143. package/template-uni-app/dist/dev/mp-weixin/apis/requests/index.js +0 -1
  144. package/template-uni-app/dist/dev/mp-weixin/apis/requests/post.js +0 -15
  145. package/template-uni-app/dist/dev/mp-weixin/app.js +0 -92
  146. package/template-uni-app/dist/dev/mp-weixin/app.json +0 -51
  147. package/template-uni-app/dist/dev/mp-weixin/app.wxss +0 -2378
  148. package/template-uni-app/dist/dev/mp-weixin/common/assets.js +0 -13
  149. package/template-uni-app/dist/dev/mp-weixin/common/vendor.js +0 -9166
  150. package/template-uni-app/dist/dev/mp-weixin/components/young-loading/young-loading.js +0 -22
  151. package/template-uni-app/dist/dev/mp-weixin/components/young-loading/young-loading.json +0 -4
  152. package/template-uni-app/dist/dev/mp-weixin/components/young-loading/young-loading.wxml +0 -1
  153. package/template-uni-app/dist/dev/mp-weixin/components/young-loading/young-loading.wxss +0 -0
  154. package/template-uni-app/dist/dev/mp-weixin/components/young-loading-mini/young-loading-mini.js +0 -22
  155. package/template-uni-app/dist/dev/mp-weixin/components/young-loading-mini/young-loading-mini.json +0 -4
  156. package/template-uni-app/dist/dev/mp-weixin/components/young-loading-mini/young-loading-mini.wxml +0 -1
  157. package/template-uni-app/dist/dev/mp-weixin/components/young-loading-mini/young-loading-mini.wxss +0 -0
  158. package/template-uni-app/dist/dev/mp-weixin/components/young-navbar/young-navbar.js +0 -81
  159. package/template-uni-app/dist/dev/mp-weixin/components/young-navbar/young-navbar.json +0 -4
  160. package/template-uni-app/dist/dev/mp-weixin/components/young-navbar/young-navbar.wxml +0 -1
  161. package/template-uni-app/dist/dev/mp-weixin/components/young-navbar/young-navbar.wxss +0 -108
  162. package/template-uni-app/dist/dev/mp-weixin/components/young-tabbar/young-tabbar.js +0 -55
  163. package/template-uni-app/dist/dev/mp-weixin/components/young-tabbar/young-tabbar.json +0 -4
  164. package/template-uni-app/dist/dev/mp-weixin/components/young-tabbar/young-tabbar.wxml +0 -1
  165. package/template-uni-app/dist/dev/mp-weixin/components/young-tabbar/young-tabbar.wxss +0 -88
  166. package/template-uni-app/dist/dev/mp-weixin/config/enum.js +0 -21
  167. package/template-uni-app/dist/dev/mp-weixin/config/index.js +0 -1
  168. package/template-uni-app/dist/dev/mp-weixin/config/map.js +0 -1
  169. package/template-uni-app/dist/dev/mp-weixin/layouts/default.js +0 -29
  170. package/template-uni-app/dist/dev/mp-weixin/layouts/default.json +0 -6
  171. package/template-uni-app/dist/dev/mp-weixin/layouts/default.wxml +0 -1
  172. package/template-uni-app/dist/dev/mp-weixin/layouts/default.wxss +0 -0
  173. package/template-uni-app/dist/dev/mp-weixin/layouts/tabbar.js +0 -56
  174. package/template-uni-app/dist/dev/mp-weixin/layouts/tabbar.json +0 -9
  175. package/template-uni-app/dist/dev/mp-weixin/layouts/tabbar.wxml +0 -1
  176. package/template-uni-app/dist/dev/mp-weixin/layouts/tabbar.wxss +0 -0
  177. package/template-uni-app/dist/dev/mp-weixin/node-modules/@dcloudio/uni-ui/lib/uni-card/uni-card.js +0 -98
  178. package/template-uni-app/dist/dev/mp-weixin/node-modules/@dcloudio/uni-ui/lib/uni-card/uni-card.json +0 -4
  179. package/template-uni-app/dist/dev/mp-weixin/node-modules/@dcloudio/uni-ui/lib/uni-card/uni-card.wxml +0 -1
  180. package/template-uni-app/dist/dev/mp-weixin/node-modules/@dcloudio/uni-ui/lib/uni-card/uni-card.wxss +0 -125
  181. package/template-uni-app/dist/dev/mp-weixin/pages/demo/index.js +0 -37
  182. package/template-uni-app/dist/dev/mp-weixin/pages/demo/index.json +0 -5
  183. package/template-uni-app/dist/dev/mp-weixin/pages/demo/index.wxml +0 -1
  184. package/template-uni-app/dist/dev/mp-weixin/pages/demo/index.wxss +0 -0
  185. package/template-uni-app/dist/dev/mp-weixin/pages/index.js +0 -50
  186. package/template-uni-app/dist/dev/mp-weixin/pages/index.json +0 -5
  187. package/template-uni-app/dist/dev/mp-weixin/pages/index.wxml +0 -1
  188. package/template-uni-app/dist/dev/mp-weixin/pages/index.wxss +0 -0
  189. package/template-uni-app/dist/dev/mp-weixin/pages/my.js +0 -22
  190. package/template-uni-app/dist/dev/mp-weixin/pages/my.json +0 -3
  191. package/template-uni-app/dist/dev/mp-weixin/pages/my.wxml +0 -1
  192. package/template-uni-app/dist/dev/mp-weixin/pages/my.wxss +0 -0
  193. package/template-uni-app/dist/dev/mp-weixin/project.config.json +0 -55
  194. package/template-uni-app/dist/dev/mp-weixin/project.private.config.json +0 -6
  195. package/template-uni-app/dist/dev/mp-weixin/static/back.png +0 -0
  196. package/template-uni-app/dist/dev/mp-weixin/static/h.png +0 -0
  197. package/template-uni-app/dist/dev/mp-weixin/static/home.png +0 -0
  198. package/template-uni-app/dist/dev/mp-weixin/static/home_active.png +0 -0
  199. package/template-uni-app/dist/dev/mp-weixin/static/more.png +0 -0
  200. package/template-uni-app/dist/dev/mp-weixin/static/my.png +0 -0
  201. package/template-uni-app/dist/dev/mp-weixin/static/my_active.png +0 -0
  202. package/template-uni-app/dist/dev/mp-weixin/static/network.png +0 -0
  203. package/template-uni-app/dist/dev/mp-weixin/store/index.js +0 -8
  204. package/template-uni-app/dist/dev/mp-weixin/store/local/index.js +0 -13
  205. package/template-uni-app/dist/dev/mp-weixin/store/system.js +0 -14
  206. package/template-uni-app/dist/dev/mp-weixin/utils/modal.js +0 -78
  207. package/template-uni-app/dist/dev/mp-weixin/utils/route.js +0 -83
  208. package/template-uni-app/dist/dev/mp-weixin/utils/system.js +0 -27
  209. package/template-uni-app/index.html +0 -23
  210. package/template-uni-app/manifest.config.ts +0 -88
  211. package/template-uni-app/package.json +0 -108
  212. package/template-uni-app/pages.config.ts +0 -58
  213. package/template-uni-app/pnpm-lock.yaml +0 -9967
  214. package/template-uni-app/src/App.vue +0 -79
  215. package/template-uni-app/src/apis/index.ts +0 -54
  216. package/template-uni-app/src/apis/requests/get.ts +0 -52
  217. package/template-uni-app/src/apis/requests/index.ts +0 -8
  218. package/template-uni-app/src/apis/requests/post.ts +0 -23
  219. package/template-uni-app/src/components/young-loading/young-loading.vue +0 -36
  220. package/template-uni-app/src/components/young-loading-mini/young-loading-mini.vue +0 -35
  221. package/template-uni-app/src/components/young-navbar/young-navbar.vue +0 -252
  222. package/template-uni-app/src/components/young-tabbar/young-tabbar.vue +0 -145
  223. package/template-uni-app/src/config/enum.ts +0 -47
  224. package/template-uni-app/src/config/index.ts +0 -8
  225. package/template-uni-app/src/config/map.ts +0 -15
  226. package/template-uni-app/src/env.d.ts +0 -36
  227. package/template-uni-app/src/layouts/default.vue +0 -22
  228. package/template-uni-app/src/layouts/tabbar.vue +0 -38
  229. package/template-uni-app/src/main.ts +0 -20
  230. package/template-uni-app/src/manifest.json +0 -75
  231. package/template-uni-app/src/pages/demo/index.vue +0 -30
  232. package/template-uni-app/src/pages/index.vue +0 -65
  233. package/template-uni-app/src/pages/my.vue +0 -30
  234. package/template-uni-app/src/pages.json +0 -74
  235. package/template-uni-app/src/static/back.png +0 -0
  236. package/template-uni-app/src/static/h.png +0 -0
  237. package/template-uni-app/src/static/home.png +0 -0
  238. package/template-uni-app/src/static/home_active.png +0 -0
  239. package/template-uni-app/src/static/more.png +0 -0
  240. package/template-uni-app/src/static/my.png +0 -0
  241. package/template-uni-app/src/static/my_active.png +0 -0
  242. package/template-uni-app/src/static/network.png +0 -0
  243. package/template-uni-app/src/store/index.ts +0 -16
  244. package/template-uni-app/src/store/local/index.ts +0 -42
  245. package/template-uni-app/src/store/system.ts +0 -21
  246. package/template-uni-app/src/typings/global.d.ts +0 -7
  247. package/template-uni-app/src/uni.scss +0 -76
  248. package/template-uni-app/src/utils/auth.ts +0 -204
  249. package/template-uni-app/src/utils/index.ts +0 -11
  250. package/template-uni-app/src/utils/map.ts +0 -98
  251. package/template-uni-app/src/utils/modal.ts +0 -120
  252. package/template-uni-app/src/utils/route.ts +0 -151
  253. package/template-uni-app/src/utils/system.ts +0 -67
  254. package/template-uni-app/tsconfig.json +0 -16
  255. package/template-uni-app/unocss.config.ts +0 -30
  256. package/template-uni-app/vite.config.ts +0 -63
  257. package/template-uni-app/volar.config.js +0 -6
  258. package/template-vue-mobile/.vscode/base.code-snippets +0 -24
  259. package/template-vue-mobile/.vscode/extensions.json +0 -10
  260. package/template-vue-mobile/.vscode/settings.json +0 -7
  261. package/template-vue-mobile/Dockerfile +0 -42
  262. package/template-vue-mobile/_env +0 -6
  263. package/template-vue-mobile/_gitignore +0 -30
  264. package/template-vue-mobile/boot.mjs +0 -16
  265. package/template-vue-mobile/build/custom-plugin.ts +0 -30
  266. package/template-vue-mobile/build/index.ts +0 -7
  267. package/template-vue-mobile/build/plugins.ts +0 -68
  268. package/template-vue-mobile/config/.devrc +0 -2
  269. package/template-vue-mobile/config/.onlinerc +0 -1
  270. package/template-vue-mobile/config/.testrc +0 -1
  271. package/template-vue-mobile/index.html +0 -25
  272. package/template-vue-mobile/nitro.config.ts +0 -19
  273. package/template-vue-mobile/package.json +0 -48
  274. package/template-vue-mobile/plugins/env.ts +0 -26
  275. package/template-vue-mobile/public/vite.svg +0 -1
  276. package/template-vue-mobile/rome.json +0 -24
  277. package/template-vue-mobile/routes/[...all].ts +0 -11
  278. package/template-vue-mobile/routes/get/env.ts +0 -25
  279. package/template-vue-mobile/src/App.vue +0 -29
  280. package/template-vue-mobile/src/auto-components.d.ts +0 -24
  281. package/template-vue-mobile/src/auto-imports.d.ts +0 -289
  282. package/template-vue-mobile/src/components/Init.vue +0 -36
  283. package/template-vue-mobile/src/global.d.ts +0 -7
  284. package/template-vue-mobile/src/hooks/useVerifyCode.ts +0 -46
  285. package/template-vue-mobile/src/layouts/blank.vue +0 -9
  286. package/template-vue-mobile/src/layouts/default.vue +0 -27
  287. package/template-vue-mobile/src/layouts/sub.vue +0 -20
  288. package/template-vue-mobile/src/main.ts +0 -35
  289. package/template-vue-mobile/src/modules/1-router.ts +0 -40
  290. package/template-vue-mobile/src/modules/2-pinia.ts +0 -10
  291. package/template-vue-mobile/src/modules/3-net.ts +0 -46
  292. package/template-vue-mobile/src/modules/4-auth.ts +0 -64
  293. package/template-vue-mobile/src/views/[...all_404].vue +0 -557
  294. package/template-vue-mobile/src/views/base/login.vue +0 -110
  295. package/template-vue-mobile/src/views/base/resetPasswd.vue +0 -88
  296. package/template-vue-mobile/src/views/index.vue +0 -18
  297. package/template-vue-mobile/src/views/my.vue +0 -15
  298. package/template-vue-mobile/src/views/sub.vue +0 -18
  299. package/template-vue-mobile/src/vite-env.d.ts +0 -43
  300. package/template-vue-mobile/tsconfig.json +0 -21
  301. package/template-vue-mobile/tsconfig.node.json +0 -9
  302. package/template-vue-mobile/unocss.config.ts +0 -47
  303. package/template-vue-mobile/vite.config.ts +0 -32
  304. package/template-vue-mobile/yarn.lock +0 -4395
  305. package/template-vue-thin/.vscode/extensions.json +0 -10
  306. package/template-vue-thin/.vscode/settings.json +0 -4
  307. package/template-vue-thin/_env +0 -1
  308. package/template-vue-thin/_gitignore +0 -29
  309. package/template-vue-thin/index.html +0 -21
  310. package/template-vue-thin/package.json +0 -40
  311. package/template-vue-thin/public/vite.svg +0 -1
  312. package/template-vue-thin/src/App.vue +0 -9
  313. package/template-vue-thin/src/layouts/blank.vue +0 -9
  314. package/template-vue-thin/src/layouts/default.vue +0 -12
  315. package/template-vue-thin/src/layouts/list.vue +0 -12
  316. package/template-vue-thin/src/main.ts +0 -58
  317. package/template-vue-thin/src/views/[...all_404].vue +0 -488
  318. package/template-vue-thin/src/views/index.vue +0 -19
  319. package/template-vue-thin/src/views/list.vue +0 -17
  320. package/template-vue-thin/src/vite-env.d.ts +0 -22
  321. package/template-vue-thin/tsconfig.json +0 -21
  322. package/template-vue-thin/tsconfig.node.json +0 -9
  323. package/template-vue-thin/unocss.config.ts +0 -47
  324. package/template-vue-thin/vite.config.ts +0 -64
@@ -1,145 +0,0 @@
1
- <!--
2
- * @Author: zhangyang
3
- * @Date: 2023-07-25 16:45:39
4
- * @LastEditTime: 2023-08-25 16:55:10
5
- * @Description:
6
- -->
7
- <script lang="ts" setup>
8
- import { YoungDialog, YoungPagination, YoungSearchForm, YoungTablePro } from '@bluesyoung/ui-vue3-element-plus'
9
- import { useRoleApi, useRoleBase, useRoleMenu } from './hooks/useRole'
10
-
11
- definePageMeta({
12
- title: '角色管理',
13
- })
14
-
15
- const {
16
- query,
17
- queryScheme,
18
- reset,
19
- getList,
20
- tableHead,
21
- tableData,
22
- baseFormRef,
23
- base,
24
- } = useRoleBase()
25
-
26
- const { showPriority, menu } = useRoleMenu()
27
-
28
- const { showApi, api } = useRoleApi()
29
-
30
- useTabReOpen(getList)
31
- </script>
32
-
33
- <template>
34
- <ElCard>
35
- <YoungSearchForm v-model="query" :search-scheme="queryScheme" :on-search="getList" :on-reset="reset">
36
- <template #btns>
37
- <ElButton type="success" @click="base.isAdd = true">
38
- 添加角色
39
- </ElButton>
40
- </template>
41
- </YoungSearchForm>
42
- </ElCard>
43
-
44
- <br>
45
-
46
- <ElCard>
47
- <YoungTablePro :table-data="tableData" :table-head="tableHead">
48
- <template #operate>
49
- <ElTableColumn label="操作" width="300px" fixed="right">
50
- <template #default="scope">
51
- <ElButton type="primary" link @click="base.edit(scope.row)">
52
- 信息编辑
53
- </ElButton>
54
- <ElButton type="primary" link @click="menu.edit(scope.row)">
55
- 菜单编辑
56
- </ElButton>
57
- <ElButton type="primary" link @click="api.edit(scope.row)">
58
- 接口编辑
59
- </ElButton>
60
- <ElButton type="danger" link @click="base.del(scope.row)">
61
- 删除
62
- </ElButton>
63
- </template>
64
- </ElTableColumn>
65
- </template>
66
- </YoungTablePro>
67
- <YoungPagination
68
- v-model:page="query.pageNum" v-model:limit="query.pageSize" :total="query.total"
69
- @page-change="getList"
70
- />
71
- </ElCard>
72
- <!-- 基础信息编辑 -->
73
- <YoungDialog
74
- :is-add="base.isAdd" :diff-form="base.form" :is-edit="base.isEdit" width="520px" @sure="base.sure"
75
- @clear="base.clear"
76
- >
77
- <template #body>
78
- <ElForm
79
- ref="baseFormRef" :model="base.form" label-width="120px"
80
- :label-position="WindowSize['lt-lg'] ? 'top' : 'left'"
81
- >
82
- <ElFormItem label="角色名称(中文)" prop="name" :rules="[{ required: true, message: '请填写角色名称', trigger: 'blur' }]">
83
- <ElInput v-model.trim="base.form.name" class="!w-300px" />
84
- </ElFormItem>
85
- <ElFormItem label="关键字(英文)" prop="keyword" :rules="[{ required: true, message: '请填写关键字', trigger: 'blur' }]">
86
- <ElInput v-model.trim="base.form.keyword" class="!w-300px" />
87
- </ElFormItem>
88
- <ElFormItem label="角色描述">
89
- <ElInput v-model.trim="base.form.desc" class="!w-300px" />
90
- </ElFormItem>
91
- </ElForm>
92
- </template>
93
- </YoungDialog>
94
- <!-- 菜单编辑 -->
95
- <YoungDialog
96
- real-title="菜单编辑" :diff-form="menu.checkMap" :is-edit="showPriority" top="5vh" width="1200px"
97
- @sure="menu.sure" @clear="menu.clear"
98
- >
99
- <template #body>
100
- <ElTable :data="menu.tableData" row-key="id" :default-expand-all="false" class="max-h-600px !overflow-y-auto">
101
- <ElTableColumn prop="name" label="节点名称" width="320px">
102
- <template #default="scope">
103
- <ElCheckbox v-model="menu.checkMap[scope.row.id]" @change="menu.selectChange(scope.row)">
104
- {{
105
- scope.row.title
106
- }}
107
- </ElCheckbox>
108
- </template>
109
- </ElTableColumn>
110
- <ElTableColumn v-for="(item, index) in menu.tableHead" v-bind="item" :key="`${index}fsdjhfaer`" />
111
- <ElTableColumn prop="name" label="隐藏/显示">
112
- <template #default="scope">
113
- <ElSwitch
114
- v-model="scope.row.visible" :active-value="1" :inactive-value="0" active-color="#409EFF"
115
- inactive-color="#909399" disabled
116
- />
117
- </template>
118
- </ElTableColumn>
119
- </ElTable>
120
- </template>
121
- </YoungDialog>
122
- <!-- 接口编辑 -->
123
- <YoungDialog
124
- real-title="接口编辑" :diff-form="api.checkMap" :is-edit="showApi" top="5vh" width="1200px" @sure="api.sure"
125
- @clear="api.clear"
126
- >
127
- <template #body>
128
- <ElTable :data="api.tableData" row-key="id" :default-expand-all="false" class="max-h-600px !overflow-y-auto">
129
- <ElTableColumn prop="name" width="100px">
130
- <template #header>
131
- <ElCheckbox v-model="api.isAll" @change="api.changeAll">
132
- 全选
133
- </ElCheckbox>
134
- </template>
135
- <template #default="scope">
136
- <ElCheckbox v-model="api.checkMap[scope.row.id]">
137
- {{ scope.row.title }}
138
- </ElCheckbox>
139
- </template>
140
- </ElTableColumn>
141
- <ElTableColumn v-for="(item, index) in api.tableHead" v-bind="item" :key="`${index}fsdjhfaer`" />
142
- </ElTable>
143
- </template>
144
- </YoungDialog>
145
- </template>
@@ -1,225 +0,0 @@
1
- <!--
2
- * @Author: zhangyang
3
- * @Date: 2023-07-25 16:46:00
4
- * @LastEditTime: 2023-08-25 16:55:17
5
- * @Description:
6
- -->
7
- <script lang="ts" setup>
8
- import { YoungDialog, YoungPagination, YoungSearchForm, YoungSelect, YoungTablePro, useFormMode, useQuery } from '@bluesyoung/ui-vue3-element-plus'
9
- import type { SelectOptionItem, TableDataItem, TableHeadItem, YoungSearchScheme } from '@bluesyoung/ui-vue3-element-plus'
10
- import { deepClone } from '@bluesyoung/utils'
11
- import { ElButton } from 'element-plus'
12
-
13
- definePageMeta({
14
- title: '用户管理',
15
- })
16
-
17
- interface Form extends UserItem { op?: any };
18
- const FORM_TEMP: Form = {
19
- id: 0,
20
- username: '',
21
- nickname: '',
22
- mobile: '',
23
- roleId: 1,
24
- status: 1,
25
- initPassword: '',
26
- }
27
- const {
28
- isAdd,
29
- isEdit,
30
- edit,
31
- del,
32
- sure,
33
- clear,
34
- form,
35
- formRef,
36
- validForm,
37
- } = useFormMode<Form>(FORM_TEMP, {
38
- addCbk: async () => {
39
- const res = await validForm() as boolean
40
- if (res) {
41
- const v = deepClone(form.value)
42
- await apis.post.addUserItem(v)
43
- ElMessage.success('新增成功!')
44
- }
45
- return res
46
- },
47
- modCbk: async () => {
48
- const res = await validForm() as boolean
49
- if (res) {
50
- const v = deepClone(form.value)
51
- await apis.patch.changeUserItem(v)
52
- ElMessage.success('修改成功!')
53
- }
54
- return res
55
- },
56
- delCbk: async (row) => {
57
- await apis.delete.deleteUser(row.id.toString())
58
- ElMessage.success('删除成功!')
59
- query.value.pageNum = 1
60
- },
61
- cgEffect: () => getList(),
62
- })
63
-
64
- const tableHead: TableHeadItem<Form>[] = [
65
- { prop: 'id', label: '用户ID' },
66
- { prop: 'username', label: '用户名' },
67
- { prop: 'mobile', label: '手机号' },
68
- { prop: 'role_name', label: '角色名称' },
69
- { prop: 'creator', label: '创建信息' },
70
- {
71
- prop: 'op',
72
- label: '操作',
73
- width: '300px',
74
- fixed: 'right',
75
- render: row => h('div', [
76
- hasPermission('/access/system/update/user') && h(ElButton, {
77
- type: 'primary',
78
- text: true,
79
- class: '!p-0',
80
- onClick: () => edit(row),
81
- }, {
82
- default: () => '编辑',
83
- }),
84
- hasPermission('/access/system/update/user') && h(ElButton, {
85
- type: 'warning',
86
- text: true,
87
- class: '!p-0',
88
- onClick: () => changePwd(row),
89
- }, {
90
- default: () => '修改密码',
91
- }),
92
- hasPermission('/access/system/del/user') && h(ElButton, {
93
- type: 'danger',
94
- text: true,
95
- class: '!p-0',
96
- onClick: () => del(row),
97
- }, {
98
- default: () => '删除',
99
- }),
100
- ]),
101
- },
102
- ]
103
- const tableData = ref<TableDataItem<Form>[]>([])
104
-
105
- async function getList() {
106
- const { list: role_list } = await apis.get.getRoleList({ noPagination: true })
107
- roleList.value = (role_list || []).map((item: RoleItem) => {
108
- return {
109
- label: item.name,
110
- value: item.id,
111
- }
112
- })
113
-
114
- const { list, pageNum, pageSize, total } = await apis.get.getUserList(query.value)
115
- tableData.value = deepClone(list || [])
116
-
117
- query.value.pageNum = +pageNum || 1
118
- query.value.pageSize = +pageSize || 50
119
- query.value.total = +total || 0
120
- }
121
-
122
- function changePwd(e: UserItem) {
123
- ElMessageBox.prompt('请输入新密码').then(async ({ value }) => {
124
- value = value.trim()
125
- if (value) {
126
- await apis.patch.changeUserItem({ id: e.id, newPassword: value })
127
- ElMessage.success('修改成功!')
128
- }
129
- }).catch(() => null)
130
- }
131
-
132
- interface Query extends BaseQuery {
133
- username: string
134
- mobile: string
135
- status: 0 | 1
136
- }
137
-
138
- const { query, reset } = useQuery<Query>(
139
- {
140
- pageNum: 1,
141
- pageSize: 10,
142
- total: 0,
143
- username: '',
144
- mobile: '',
145
- status: 1,
146
- },
147
- getList,
148
- )
149
- const queryScheme: YoungSearchScheme<Query> = {
150
- username: {
151
- type: 'input',
152
- tip: '用户名',
153
- attrs: {
154
- placeholder: '请输入用户名',
155
- },
156
- },
157
- mobile: {
158
- type: 'input',
159
- tip: '手机号',
160
- attrs: {
161
- placeholder: '请输入手机号',
162
- maxlength: 11,
163
- },
164
- },
165
- status: {
166
- type: 'select',
167
- tip: '状态',
168
- attrs: {
169
- placeholder: '用户状态',
170
- },
171
- options: [{ label: '禁用', value: 0 }, { label: '启用', value: 1 }],
172
- },
173
- }
174
-
175
- const roleList = ref<SelectOptionItem<number>[]>([])
176
-
177
- useTabReOpen(getList)
178
- </script>
179
-
180
- <template>
181
- <ElCard>
182
- <YoungSearchForm v-model="query" :search-scheme="queryScheme" :on-search="getList" :on-reset="reset">
183
- <template #btns>
184
- <ElButton v-permission="'/access/system/create/user'" type="success" @click="isAdd = true">
185
- 添加用户
186
- </ElButton>
187
- </template>
188
- </YoungSearchForm>
189
- </ElCard>
190
-
191
- <br>
192
-
193
- <ElCard>
194
- <YoungTablePro :table-data="tableData" :table-head="tableHead" />
195
- <YoungPagination
196
- v-model:page="query.pageNum" v-model:limit="query.pageSize" :total="query.total"
197
- @page-change="getList"
198
- />
199
- </ElCard>
200
-
201
- <YoungDialog :is-add="isAdd" :diff-form="form" :is-edit="isEdit" width="520px" @sure="sure" @clear="clear">
202
- <template #body>
203
- <ElForm ref="formRef" :model="form" label-width="100px" :label-position="WindowSize['lt-lg'] ? 'top' : 'left'">
204
- <ElFormItem label="用户名" prop="username" :rules="{ required: true, message: '请输用户名', trigger: 'blur' }">
205
- <ElInput v-model.trim="form.username" class="!w-300px" />
206
- </ElFormItem>
207
- <ElFormItem label="昵称" prop="nickname" :rules="{ required: true, message: '请输昵称(用于右上角展示)', trigger: 'blur' }">
208
- <ElInput v-model.trim="form.nickname" class="!w-300px" />
209
- </ElFormItem>
210
- <ElFormItem label="手机号" prop="mobile" :rules="{ required: true, message: '请输手机号', trigger: 'blur' }">
211
- <ElInput v-model.trim="form.mobile" :maxlength="11" class="!w-300px" />
212
- </ElFormItem>
213
- <ElFormItem label="角色">
214
- <YoungSelect v-model="form.roleId" placeholder="请选择角色" :options="roleList" />
215
- </ElFormItem>
216
- <ElFormItem
217
- v-if="isAdd" label="初始密码" prop="initPassword"
218
- :rules="{ required: true, message: '请输初始密码', trigger: 'blur' }"
219
- >
220
- <ElInput v-model.trim="form.initPassword" class="!w-300px" />
221
- </ElFormItem>
222
- </ElForm>
223
- </template>
224
- </YoungDialog>
225
- </template>
@@ -1,26 +0,0 @@
1
- /*
2
- * @Author: zhangyang
3
- * @Date: 2023-07-31 14:04:44
4
- * @LastEditTime: 2023-07-31 14:33:10
5
- * @Description:
6
- */
7
- import { isString } from '@bluesyoung/utils'
8
-
9
- export default defineNuxtPlugin((nuxtApp) => {
10
- /**
11
- * 鉴自指令定义的zdy
12
- */
13
- nuxtApp.vueApp.directive('permission', {
14
- mounted(el, binding) {
15
- const { value } = binding
16
-
17
- if (isString(value) && value) {
18
- if (!hasPermission(value as unknown as string))
19
- el.parentNode && el.parentNode.removeChild(el)
20
- }
21
- else {
22
- throw new Error('need value! Like v-permission="\'/access/get/list\'"')
23
- }
24
- },
25
- })
26
- })
Binary file
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M28.717511 509.428622c0.068267 263.850667 213.8112 477.684622 477.411556 477.639111 263.600356-0.045511 477.275022-213.970489 477.229511-477.843911 0-263.850667-213.720178-477.752889-477.320534-477.752889-126.611911 0-248.035556 50.3808-337.555911 140.014934a478.094222 478.094222 0 0 0-139.764622 337.92z" fill="#FFFFFF" /><path d="M856.814933 833.9456c-12.811378-67.1744-130.753422-131.390578-236.612266-166.479644-5.165511-1.729422-37.387378-16.201956-17.2032-77.459912 52.747378-54.0672 92.728889-141.175467 92.728889-226.941155 0-131.754667-87.699911-200.886044-189.622045-200.886045-101.944889 0-189.394489 69.063111-189.394489 200.886045 0 86.038756 40.004267 173.488356 92.842667 227.487289 20.593778 53.976178-16.224711 74.092089-23.984356 76.777244-100.693333 36.340622-217.679644 100.784356-230.559289 166.479645a478.685867 478.685867 0 0 1-55.591822-574.350223 477.639111 477.639111 0 0 1 536.9856-209.942755C842.183111 107.633778 984.314311 295.5264 984.450844 509.5424a475.363556 475.363556 0 0 1-127.635911 324.4032" fill="#B8D4FF" /></svg>
@@ -1,2 +0,0 @@
1
-
2
- <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 32 32"><path fill="#666" d="M26 2h4v4h-4zm0 6h4v4h-4zm-6-6h4v4h-4zm0 6h4v4h-4z"/><path fill="#666" d="M28 16v6H4V6h12V4H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h8v4H8v2h16v-2h-4v-4h8a2 2 0 0 0 2-2v-6ZM18 28h-4v-4h4Z"/></svg>
@@ -1,15 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: rgb(255, 255, 255); display: block; shape-rendering: auto;" width="200px" height="200px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
3
- <rect x="17.5" y="30" width="15" height="40" fill="#93dbe9">
4
- <animate attributeName="y" repeatCount="indefinite" dur="1s" calcMode="spline" keyTimes="0;0.5;1" values="18;30;30" keySplines="0 0.5 0.5 1;0 0.5 0.5 1" begin="-0.2s"></animate>
5
- <animate attributeName="height" repeatCount="indefinite" dur="1s" calcMode="spline" keyTimes="0;0.5;1" values="64;40;40" keySplines="0 0.5 0.5 1;0 0.5 0.5 1" begin="-0.2s"></animate>
6
- </rect>
7
- <rect x="42.5" y="30" width="15" height="40" fill="#689cc5">
8
- <animate attributeName="y" repeatCount="indefinite" dur="1s" calcMode="spline" keyTimes="0;0.5;1" values="20.999999999999996;30;30" keySplines="0 0.5 0.5 1;0 0.5 0.5 1" begin="-0.1s"></animate>
9
- <animate attributeName="height" repeatCount="indefinite" dur="1s" calcMode="spline" keyTimes="0;0.5;1" values="58.00000000000001;40;40" keySplines="0 0.5 0.5 1;0 0.5 0.5 1" begin="-0.1s"></animate>
10
- </rect>
11
- <rect x="67.5" y="30" width="15" height="40" fill="#5e6fa3">
12
- <animate attributeName="y" repeatCount="indefinite" dur="1s" calcMode="spline" keyTimes="0;0.5;1" values="20.999999999999996;30;30" keySplines="0 0.5 0.5 1;0 0.5 0.5 1"></animate>
13
- <animate attributeName="height" repeatCount="indefinite" dur="1s" calcMode="spline" keyTimes="0;0.5;1" values="58.00000000000001;40;40" keySplines="0 0.5 0.5 1;0 0.5 0.5 1"></animate>
14
- </rect>
15
- <!-- [ldio] generated by https://loading.io/ --></svg>
@@ -1,2 +0,0 @@
1
-
2
- <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 32 32"><path fill="#fff" d="M26 2h4v4h-4zm0 6h4v4h-4zm-6-6h4v4h-4zm0 6h4v4h-4z"/><path fill="#fff" d="M28 16v6H4V6h12V4H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h8v4H8v2h16v-2h-4v-4h8a2 2 0 0 0 2-2v-6ZM18 28h-4v-4h4Z"/></svg>
@@ -1,10 +0,0 @@
1
- /*
2
- * @Author: zhangyang
3
- * @Date: 2023-07-21 09:50:36
4
- * @LastEditTime: 2023-07-21 09:50:36
5
- * @Description:
6
- */
7
- export default eventHandler(async (event) => {
8
- const proxy = createTransparentProxy(process.env.NUXT_PUBLIC_API_BASE as string)
9
- await proxy.handle(event)
10
- })
@@ -1,87 +0,0 @@
1
- /*
2
- * @Author: zhangyang
3
- * @Date: 2022-12-30 17:19:42
4
- * @LastEditTime: 2023-09-16 16:27:56
5
- * @Description:
6
- */
7
- import { resolve } from 'node:path'
8
- import { loadConfig } from 'c12'
9
- import { useYoungLogger } from '@bluesyoung/logger'
10
-
11
- export default defineNitroPlugin(async (nitroApp) => {
12
- const env = (process.env.DEPLOY_ENV as 'dev' | 'test' | 'online') || 'dev'
13
- const { config } = await loadConfig<Record<string, any>>({
14
- name: env,
15
- cwd: resolve(process.cwd(), 'config'),
16
- defaultConfig: {
17
- // 此处可以放置通用的环境变量
18
- // 由于频繁修改 package.json 会浪费 docker 性能,故将版本信息放于此处
19
- // 优先读取环境变量中的版本信息(自己打的 Tag)
20
- NUXT_PUBLIC_CURRENT_VERSION: process.env.PROJECT_VERSION || 'v0.0.1',
21
-
22
- NUXT_PUBLIC_TITLE: 'XXX-后台管理系统',
23
- NUXT_PUBLIC_SUB_TITLE: '做XXX我们是认真的!',
24
- NUXT_PUBLIC_SLOGAN: 'XXXXX, XXXXX',
25
- NUXT_PUBLIC_LOGIN_BG: '/bg.webp',
26
- NUXT_PUBLIC_LOGIN_LOGO: '/logo.svg',
27
- },
28
- })
29
-
30
- for (const key in config) {
31
- if (process.env[key]) {
32
- console.log(
33
- '系统环境变量优先: ',
34
- key,
35
- ' = ',
36
- process.env[key],
37
- ' -> ',
38
- config[key],
39
- ' -> ',
40
- '覆盖',
41
- )
42
- config[key] = process.env[key]
43
- }
44
- else {
45
- process.env[key] = config[key]
46
- }
47
- if (!(key.indexOf('NUXT_PUBLIC_') === 0))
48
- delete config[key]
49
- }
50
-
51
- console.log('------------------------读取配置文件------------------------')
52
- console.log(config)
53
- console.log('-------------------------------------------------------------')
54
-
55
- // 仅打包之后格式化日志
56
- if (process.env.NODE_ENV !== 'development')
57
- useYoungLogger()
58
-
59
- nitroApp.hooks.hook('render:html', (html, { event }) => {
60
- // 直接注入环境变量到前端
61
- html.bodyPrepend.push(`
62
- <!-- 注入环境变量 -->
63
- <script>window.__YOUNG_ENV__=${JSON.stringify(config)}</script>
64
- <!-- 更新检测,每分钟一次 -->
65
- <script>
66
- setInterval(() => {
67
- fetch('/get/env')
68
- .then((res) => res.json())
69
- .then(({ NUXT_PUBLIC_CURRENT_VERSION }) => {
70
- if (NUXT_PUBLIC_CURRENT_VERSION !== window.__YOUNG_ENV__.NUXT_PUBLIC_CURRENT_VERSION) {
71
- alert('版本已更新,请重新加载页面!');
72
- window.location.reload();
73
- }
74
- });
75
- }, 6e4);
76
- </script>
77
- `)
78
-
79
- // 移动端调试控制台,需要使用就放开下面的注释
80
- // if (process.env.NODE_ENV === 'development' || process.env.NUXT_PUBLIC_ENABLE_CONSOLE) {
81
- // html.bodyAppend.push(`
82
- // <script src="//cdn.bootcdn.net/ajax/libs/eruda/2.3.3/eruda.js"></script>
83
- // <script>eruda.init();</script>
84
- // `);
85
- // }
86
- })
87
- })
@@ -1,13 +0,0 @@
1
- /*
2
- * @Author: zhangyang
3
- * @Date: 2023-07-20 19:48:12
4
- * @LastEditTime: 2023-07-21 11:18:40
5
- * @Description:
6
- */
7
- export default defineEventHandler(async (event) => {
8
- const envObj = {
9
- NUXT_PUBLIC_CURRENT_VERSION: process.env.PROJECT_VERSION || 'v0.0.1',
10
- }
11
-
12
- return envObj
13
- })
@@ -1,3 +0,0 @@
1
- {
2
- "extends": "../.nuxt/tsconfig.server.json"
3
- }
@@ -1,36 +0,0 @@
1
- /*
2
- * @Author: zhangyang
3
- * @Date: 2023-05-29 10:29:52
4
- * @LastEditTime: 2023-06-17 16:20:40
5
- * @Description:
6
- */
7
- import { type ServerOptions as HTTPProxyOptions } from 'http-proxy'
8
- import ProxyModule from 'http-proxy'
9
- import type { H3Event } from 'h3'
10
-
11
- /**
12
- * @param target 接口代理的具体地址
13
- * @param defaults 代理配置
14
- * @example
15
- * export default defineEventHandler(async (event) => {
16
- * const proxy = createTransparentProxy(`http://127.0.0.1:3333`);
17
- * await proxy.handle(event);
18
- * });
19
- */
20
- export function createTransparentProxy(target: string, defaults: HTTPProxyOptions = {}) {
21
- const proxy = ProxyModule.createProxy()
22
- const handle = (event: H3Event, opts: HTTPProxyOptions = {}) => {
23
- return new Promise<void>((resolve, reject) => {
24
- proxy.web(event.node.req, event.node.res, { target, ...defaults, ...opts }, (error: any) => {
25
- if (error.code !== 'ECONNRESET')
26
- reject(error)
27
-
28
- resolve()
29
- })
30
- })
31
- }
32
- return {
33
- proxy,
34
- handle,
35
- }
36
- }
@@ -1,30 +0,0 @@
1
- // el-table 样式
2
- .el-table {
3
- -webkit-box-flex: 1;
4
- -webkit-flex: 1;
5
- -ms-flex: 1;
6
- flex: 1;
7
-
8
- table {
9
- width: 100%;
10
- }
11
-
12
- .el-table__header th {
13
- font-weight: bold;
14
- color: var(--el-text-color-primary);
15
- background: var(--el-fill-color-light) !important;
16
- }
17
- }
18
-
19
- // el-dialog 样式
20
- .el-dialog {
21
- .el-dialog__header {
22
- padding: 15px 20px;
23
- margin: 0;
24
- border-bottom: 1px solid var(--el-border-color-lighter);
25
-
26
- .el-dialog__title {
27
- font-size: 17px;
28
- }
29
- }
30
- }
@@ -1,59 +0,0 @@
1
- @import './element.scss';
2
-
3
- // 滚动条样式
4
- @mixin base-scrollbar {
5
- &::-webkit-scrollbar {
6
- width: 13px;
7
- height: 13px;
8
- }
9
-
10
- &::-webkit-scrollbar-thumb {
11
- background-color: rgb(0 0 0 / 10%);
12
- background-clip: padding-box;
13
- border: 3px solid transparent;
14
- border-radius: 7px;
15
- }
16
-
17
- &::-webkit-scrollbar-thumb:hover {
18
- background-color: rgb(0 0 0 / 30%);
19
- }
20
-
21
- &::-webkit-scrollbar-track {
22
- background-color: transparent;
23
- }
24
-
25
- &::-webkit-scrollbar-track:hover {
26
- background-color: #f8fafc;
27
- }
28
- }
29
-
30
- html body,
31
- #__nuxt {
32
- position: relative;
33
- -webkit-box-sizing: border-box;
34
- box-sizing: border-box;
35
- height: 100vh;
36
- padding: 0;
37
- overflow: auto;
38
- font-family: 'PingFang SC', Arial, 'Microsoft YaHei', sans-serif;
39
- font-size: 14px;
40
- color: var(--el-color-black);
41
- background: #f6f8f9;
42
- -webkit-font-smoothing: antialiased;
43
- @include base-scrollbar;
44
-
45
- div {
46
- @include base-scrollbar;
47
- }
48
-
49
- .layout-admin-wrapper {
50
- .app-main-container {
51
- @include base-scrollbar;
52
- }
53
- }
54
- }
55
-
56
- :root {
57
- --el-color-white: #fff;
58
- --el-color-grey: rgb(0 0 0 / 65%);
59
- }