create-young-proj 0.3.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. package/README.md +6 -1
  2. package/dist/index.mjs +8 -8
  3. package/package.json +1 -1
  4. package/template-uni-app/.vscode/css.code-snippets +398 -0
  5. package/template-uni-app/.vscode/extensions.json +9 -0
  6. package/template-uni-app/.vscode/js.code-snippets +1669 -0
  7. package/template-uni-app/.vscode/settings.json +7 -0
  8. package/template-uni-app/.vscode/vue-html.code-snippets +668 -0
  9. package/template-uni-app/README.md +46 -0
  10. package/template-uni-app/_env +1 -0
  11. package/template-uni-app/_env.development +11 -0
  12. package/template-uni-app/_env.production +11 -0
  13. package/template-uni-app/_env.test +14 -0
  14. package/template-uni-app/_gitignore +3 -0
  15. package/template-uni-app/auto-imports.d.ts +404 -0
  16. package/template-uni-app/components.d.ts +20 -0
  17. package/template-uni-app/custom-plugins/index.ts +8 -0
  18. package/template-uni-app/custom-plugins/multiconf.ts +77 -0
  19. package/template-uni-app/custom-plugins/polyfill.ts +32 -0
  20. package/template-uni-app/index.html +23 -0
  21. package/template-uni-app/package.json +84 -0
  22. package/template-uni-app/pnpm-lock.yaml +7530 -0
  23. package/template-uni-app/rome.json +26 -0
  24. package/template-uni-app/src/App.vue +76 -0
  25. package/template-uni-app/src/apis/index.ts +36 -0
  26. package/template-uni-app/src/apis/lib/index.ts +236 -0
  27. package/template-uni-app/src/apis/requests/get.ts +52 -0
  28. package/template-uni-app/src/apis/requests/index.ts +8 -0
  29. package/template-uni-app/src/apis/requests/post.ts +23 -0
  30. package/template-uni-app/src/components/young-loading/young-loading.vue +38 -0
  31. package/template-uni-app/src/components/young-navbar/young-navbar.vue +253 -0
  32. package/template-uni-app/src/components/young-tabbar/young-tabbar.vue +137 -0
  33. package/template-uni-app/src/components/young-tabbar-layout/young-tabbar-layout.vue +27 -0
  34. package/template-uni-app/src/config/enum.ts +46 -0
  35. package/template-uni-app/src/config/index.ts +8 -0
  36. package/template-uni-app/src/config/map.ts +15 -0
  37. package/template-uni-app/src/env.d.ts +35 -0
  38. package/template-uni-app/src/main.ts +20 -0
  39. package/template-uni-app/src/manifest.json +83 -0
  40. package/template-uni-app/src/pages/index.vue +52 -0
  41. package/template-uni-app/src/pages/my.vue +29 -0
  42. package/template-uni-app/src/pages.json +63 -0
  43. package/template-uni-app/src/store/index.ts +16 -0
  44. package/template-uni-app/src/store/local/index.ts +40 -0
  45. package/template-uni-app/src/store/system.ts +12 -0
  46. package/template-uni-app/src/uni.scss +76 -0
  47. package/template-uni-app/src/utils/auth.ts +125 -0
  48. package/template-uni-app/src/utils/index.ts +11 -0
  49. package/template-uni-app/src/utils/map.ts +97 -0
  50. package/template-uni-app/src/utils/modal.ts +98 -0
  51. package/template-uni-app/src/utils/route.ts +149 -0
  52. package/template-uni-app/src/utils/system.ts +66 -0
  53. package/template-uni-app/tsconfig.json +13 -0
  54. package/template-uni-app/unocss.config.ts +30 -0
  55. package/template-uni-app/vite.config.ts +68 -0
@@ -0,0 +1,32 @@
1
+ /*
2
+ * @Author: zhangyang
3
+ * @Date: 2023-07-18 15:58:06
4
+ * @LastEditTime: 2023-07-19 14:32:28
5
+ * @Description:
6
+ */
7
+ import type { Plugin } from 'vite';
8
+
9
+ export const polyfillFormData = () => {
10
+ return {
11
+ name: 'vite-plugin-uni-axios',
12
+ transform(code, id) {
13
+ if (process.env.UNI_PLATFORM?.includes('mp')) {
14
+ if (id.includes('/form-data/lib/browser.js')) {
15
+ return {
16
+ code: code.replace('window', 'globalThis'),
17
+ };
18
+ }
19
+ if (id.includes('/axios/lib/platform/browser/classes/FormData.js')) {
20
+ return {
21
+ code: `import FormData from 'miniprogram-formdata';\nexport default FormData;`,
22
+ };
23
+ }
24
+ if (id.includes('/axios/lib/platform/browser/classes/Blob.js')) {
25
+ return {
26
+ code: `import Blob from 'miniprogram-blob';\nexport default Blob;`,
27
+ };
28
+ }
29
+ }
30
+ },
31
+ } as Plugin;
32
+ };
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <script>
7
+ var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
8
+ CSS.supports('top: constant(a)'))
9
+ document.write(
10
+ '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
11
+ (coverSupport ? ', viewport-fit=cover' : '') + '" />')
12
+ </script>
13
+ <title></title>
14
+ <!--preload-links-->
15
+ <!--app-context-->
16
+ </head>
17
+
18
+ <body>
19
+ <div id="app"><!--app-html--></div>
20
+ <script type="module" src="/src/main.ts"></script>
21
+ </body>
22
+
23
+ </html>
@@ -0,0 +1,84 @@
1
+ {
2
+ "name": "uni-preset-vue",
3
+ "version": "0.0.0",
4
+ "scripts": {
5
+ "dev": "npm run dev:mp-weixin",
6
+ "test": "npm run dev:mp-weixin -- --mode=test",
7
+ "dev:app": "uni -p app",
8
+ "dev:app-android": "uni -p app-android",
9
+ "dev:app-ios": "uni -p app-ios",
10
+ "dev:custom": "uni -p",
11
+ "dev:h5": "uni",
12
+ "dev:h5:ssr": "uni --ssr",
13
+ "dev:mp-alipay": "uni -p mp-alipay",
14
+ "dev:mp-baidu": "uni -p mp-baidu",
15
+ "dev:mp-jd": "uni -p mp-jd",
16
+ "dev:mp-kuaishou": "uni -p mp-kuaishou",
17
+ "dev:mp-lark": "uni -p mp-lark",
18
+ "dev:mp-qq": "uni -p mp-qq",
19
+ "dev:mp-toutiao": "uni -p mp-toutiao",
20
+ "dev:mp-weixin": "uni -p mp-weixin",
21
+ "dev:quickapp-webview": "uni -p quickapp-webview",
22
+ "dev:quickapp-webview-huawei": "uni -p quickapp-webview-huawei",
23
+ "dev:quickapp-webview-union": "uni -p quickapp-webview-union",
24
+ "build:app": "uni build -p app",
25
+ "build:app-android": "uni build -p app-android",
26
+ "build:app-ios": "uni build -p app-ios",
27
+ "build:custom": "uni build -p",
28
+ "build:h5": "uni build",
29
+ "build:h5:ssr": "uni build --ssr",
30
+ "build:mp-alipay": "uni build -p mp-alipay",
31
+ "build:mp-baidu": "uni build -p mp-baidu",
32
+ "build:mp-jd": "uni build -p mp-jd",
33
+ "build:mp-kuaishou": "uni build -p mp-kuaishou",
34
+ "build:mp-lark": "uni build -p mp-lark",
35
+ "build:mp-qq": "uni build -p mp-qq",
36
+ "build:mp-toutiao": "uni build -p mp-toutiao",
37
+ "build:mp-weixin": "uni build -p mp-weixin",
38
+ "build:quickapp-webview": "uni build -p quickapp-webview",
39
+ "build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei",
40
+ "build:quickapp-webview-union": "uni build -p quickapp-webview-union",
41
+ "format": "rome format . --write"
42
+ },
43
+ "dependencies": {
44
+ "@bluesyoung/http": "^0.3.0",
45
+ "@bluesyoung/utils": "^0.1.0",
46
+ "@dcloudio/uni-app": "3.0.0-3080720230703001",
47
+ "@dcloudio/uni-app-plus": "3.0.0-3080720230703001",
48
+ "@dcloudio/uni-components": "3.0.0-3080720230703001",
49
+ "@dcloudio/uni-h5": "3.0.0-3080720230703001",
50
+ "@dcloudio/uni-mp-alipay": "3.0.0-3080720230703001",
51
+ "@dcloudio/uni-mp-baidu": "3.0.0-3080720230703001",
52
+ "@dcloudio/uni-mp-jd": "3.0.0-3080720230703001",
53
+ "@dcloudio/uni-mp-kuaishou": "3.0.0-3080720230703001",
54
+ "@dcloudio/uni-mp-lark": "3.0.0-3080720230703001",
55
+ "@dcloudio/uni-mp-qq": "3.0.0-3080720230703001",
56
+ "@dcloudio/uni-mp-toutiao": "3.0.0-3080720230703001",
57
+ "@dcloudio/uni-mp-weixin": "3.0.0-3080720230703001",
58
+ "@dcloudio/uni-quickapp-webview": "3.0.0-3080720230703001",
59
+ "@uni-helper/axios-adapter": "^1.4.0",
60
+ "miniprogram-blob": "^2.0.0",
61
+ "miniprogram-formdata": "^2.0.0",
62
+ "pinia": "2.0.35",
63
+ "sass": "^1.63.6",
64
+ "sass-loader": "^13.3.2",
65
+ "vue": "^3.2.45"
66
+ },
67
+ "devDependencies": {
68
+ "@dcloudio/types": "^3.3.2",
69
+ "@dcloudio/uni-automator": "3.0.0-3080720230703001",
70
+ "@dcloudio/uni-cli-shared": "3.0.0-3080720230703001",
71
+ "@dcloudio/uni-stacktracey": "3.0.0-3080720230703001",
72
+ "@dcloudio/uni-ui": "^1.4.28",
73
+ "@dcloudio/vite-plugin-uni": "3.0.0-3080720230703001",
74
+ "@vue/tsconfig": "^0.1.3",
75
+ "axios": "^1.4.0",
76
+ "rome": "^12.1.3",
77
+ "typescript": "^4.9.4",
78
+ "unocss": "^0.53.5",
79
+ "unocss-preset-weapp": "^0.53.5",
80
+ "unplugin-auto-import": "^0.16.6",
81
+ "unplugin-vue-components": "^0.25.1",
82
+ "vite": "4.0.4"
83
+ }
84
+ }