create-young-proj 2.0.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +7 -1
  3. package/dist/index.mjs +6 -6
  4. package/package.json +1 -1
  5. package/src/index.ts +6 -1
  6. package/template-electron-win7/.vscode/extensions.json +5 -0
  7. package/template-electron-win7/.vscode/settings.json +49 -0
  8. package/template-electron-win7/README.md +65 -0
  9. package/template-electron-win7/RELEASE_NOTES.md +11 -0
  10. package/template-electron-win7/_gitignore +27 -0
  11. package/template-electron-win7/dev-app-update.yml +2 -0
  12. package/template-electron-win7/electron/config/0.local.config.ts +13 -0
  13. package/template-electron-win7/electron/config/1.dev.config.ts +13 -0
  14. package/template-electron-win7/electron/config/2.test.config.ts +13 -0
  15. package/template-electron-win7/electron/config/3.wtest.config.ts +13 -0
  16. package/template-electron-win7/electron/config/4.online.config.ts +13 -0
  17. package/template-electron-win7/electron/config.ts +13 -0
  18. package/template-electron-win7/electron/electron-env.d.ts +58 -0
  19. package/template-electron-win7/electron/main.ts +318 -0
  20. package/template-electron-win7/electron/preload.ts +23 -0
  21. package/template-electron-win7/electron/update.ts +78 -0
  22. package/template-electron-win7/electron-builder.yaml +67 -0
  23. package/template-electron-win7/env/.env +1 -0
  24. package/template-electron-win7/env/.env.development +9 -0
  25. package/template-electron-win7/env/.env.production +9 -0
  26. package/template-electron-win7/eslint.config.mjs +33 -0
  27. package/template-electron-win7/index.html +16 -0
  28. package/template-electron-win7/package.json +71 -0
  29. package/template-electron-win7/public/icon.ico +0 -0
  30. package/template-electron-win7/scripts/afterPack.mjs +36 -0
  31. package/template-electron-win7/scripts/build.mjs +55 -0
  32. package/template-electron-win7/src/App.vue +23 -0
  33. package/template-electron-win7/src/auto-imports.d.ts +305 -0
  34. package/template-electron-win7/src/components/UpdateDialog.vue +166 -0
  35. package/template-electron-win7/src/components.d.ts +18 -0
  36. package/template-electron-win7/src/layouts/blank.vue +11 -0
  37. package/template-electron-win7/src/layouts/default.vue +13 -0
  38. package/template-electron-win7/src/main.ts +36 -0
  39. package/template-electron-win7/src/modules/1-router.ts +72 -0
  40. package/template-electron-win7/src/modules/2-pinia.ts +13 -0
  41. package/template-electron-win7/src/styles/variables.scss +8 -0
  42. package/template-electron-win7/src/types/global.d.ts +0 -0
  43. package/template-electron-win7/src/utils/env.ts +4 -0
  44. package/template-electron-win7/src/utils/ls.ts +118 -0
  45. package/template-electron-win7/src/views/[...all_404].vue +539 -0
  46. package/template-electron-win7/src/views/index.vue +34 -0
  47. package/template-electron-win7/src/vite-env.d.ts +27 -0
  48. package/template-electron-win7/tsconfig.json +29 -0
  49. package/template-electron-win7/tsconfig.node.json +11 -0
  50. package/template-electron-win7/uno.config.ts +32 -0
  51. package/template-electron-win7/vite.config.ts +78 -0
  52. package/template-electron-win7/yarn.lock +5964 -0
  53. package/template-nuxt-admin/error.vue +3 -3
  54. package/template-nuxt-admin/nuxt.config.ts +20 -7
  55. package/template-nuxt-admin/package.json +5 -3
  56. package/template-nuxt-admin/yarn.lock +3438 -2586
  57. package/template-nuxt-website/app.vue +45 -1
  58. package/template-nuxt-website/layouts/default.vue +18 -16
  59. package/template-nuxt-website/layouts/home.vue +14 -12
  60. package/template-nuxt-website/layouts/tabbar.vue +18 -16
  61. package/template-nuxt-website/nuxt.config.ts +20 -5
  62. package/template-nuxt-website/package.json +2 -1
  63. package/template-nuxt-website/yarn.lock +4677 -3598
@@ -1,11 +1,11 @@
1
1
  <!--
2
2
  * @Author: zhangyang
3
3
  * @Date: 2023-06-12 15:00:07
4
- * @LastEditTime: 2023-09-06 16:05:20
4
+ * @LastEditTime: 2024-06-13 15:00:49
5
5
  * @Description:
6
6
  -->
7
7
  <script lang="ts" setup>
8
- import type { NuxtError } from '#app'
8
+ import type { NuxtError } from 'nuxt/app'
9
9
 
10
10
  const props = defineProps<{
11
11
  error: NuxtError
@@ -26,7 +26,7 @@ const NotShowError = computed(() => {
26
26
  })
27
27
 
28
28
  onMounted(() => {
29
- if (process.server)
29
+ if (import.meta.server)
30
30
  return
31
31
 
32
32
  console.log(props.error, props.error.statusCode)
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * @Author: zhangyang
3
3
  * @Date: 2023-09-21 15:57:55
4
- * @LastEditTime: 2024-05-08 14:29:12
4
+ * @LastEditTime: 2024-06-17 14:06:55
5
5
  * @Description:
6
6
  */
7
7
  import { resolve } from 'node:path'
@@ -22,7 +22,7 @@ export default defineNuxtConfig({
22
22
  { name: 'renderer', content: 'webkit' },
23
23
  { name: 'mobile-web-app-capable', content: 'yes' },
24
24
  { name: 'creator', content: 'BluesYoung-web' },
25
- { 'http-equiv': 'X-UA-Compatible', 'content': 'IE=edge,chrome=1' },
25
+ { 'http-equiv': 'x-ua-compatible', 'content': 'IE=edge,chrome=1' },
26
26
  { id: 'viewportMeta', name: 'viewport', content: 'maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0' },
27
27
  ],
28
28
 
@@ -46,7 +46,7 @@ export default defineNuxtConfig({
46
46
  script: [
47
47
  {
48
48
  innerHTML: `
49
- this.globalThis || (this.globalThis = this);
49
+ // this.globalThis || (this.globalThis = this);
50
50
  window.onerror = function(e) {
51
51
  if (e.toString().includes('ResizeObserver loop')) {
52
52
  return;
@@ -57,6 +57,11 @@ export default defineNuxtConfig({
57
57
  }
58
58
  `,
59
59
  },
60
+ // ! 必须在这里导入,ResizeObserver 写在 additionalLegacyPolyfills 里面不生效
61
+ // ? 基于 polyfill.io 按需导入
62
+ {
63
+ src: '//cdn.polyfill.io/v3/polyfill.min.js?features=ResizeObserver%2CElement.prototype.getAttributeNames',
64
+ },
60
65
  {
61
66
  src: './index.umd.js',
62
67
  async: true,
@@ -78,6 +83,7 @@ export default defineNuxtConfig({
78
83
  },
79
84
 
80
85
  modules: [
86
+ 'nuxt-vite-legacy',
81
87
  '@vueuse/nuxt',
82
88
  '@unocss/nuxt',
83
89
  '@element-plus/nuxt',
@@ -85,13 +91,16 @@ export default defineNuxtConfig({
85
91
  '@vant/nuxt',
86
92
  '@bluesyoung/ui-vue3-element-plus/nuxt',
87
93
  ],
88
-
94
+ // 兼容旧浏览器
95
+ // Optionally, provide @vitejs/plugin-legacy options.
96
+ // For example, for Chrome 49 you could use:
97
+ legacy: {
98
+ targets: ['chrome 49'],
99
+ },
89
100
  vite: {
90
101
  build: {
91
102
  sourcemap: false,
92
- // 兼容旧浏览器
93
- target: ['chrome58'],
94
- cssTarget: ['chrome58'],
103
+ cssTarget: ['chrome49'],
95
104
  },
96
105
  css: {
97
106
  preprocessorOptions: {
@@ -115,4 +124,8 @@ export default defineNuxtConfig({
115
124
  hashMode: true,
116
125
  },
117
126
  },
127
+
128
+ experimental: {
129
+ appManifest: false,
130
+ },
118
131
  })
@@ -16,7 +16,7 @@
16
16
  "@bluesyoung/casdoor-auth": "^0.1.0",
17
17
  "@bluesyoung/http": "^1.0.1",
18
18
  "@bluesyoung/ui-vue3": "^1.0.0",
19
- "@bluesyoung/ui-vue3-element-plus": "1.5.6",
19
+ "@bluesyoung/ui-vue3-element-plus": "1.7.3",
20
20
  "@bluesyoung/utils": "0.3.0",
21
21
  "@wangeditor/editor": "^5.1.23",
22
22
  "@wangeditor/editor-for-vue": "^5.1.12",
@@ -40,14 +40,16 @@
40
40
  "@types/md5": "^2.3.2",
41
41
  "@types/node": "20.8.10",
42
42
  "@types/qrcode": "^1.5.1",
43
- "@unocss/nuxt": "^0.60.3",
43
+ "@unocss/nuxt": "^0.61.0",
44
44
  "@vant/nuxt": "^1.0.2",
45
45
  "@vueuse/nuxt": "^10.2.1",
46
46
  "dayjs": "^1.11.9",
47
47
  "element-plus": "^2.7.3",
48
48
  "eslint": "^9.3.0",
49
49
  "lint-staged": "^15.2.4",
50
- "nuxt": "^3.11.2",
50
+ "mdn-polyfills": "^5.20.0",
51
+ "nuxt": "^3.12.2",
52
+ "nuxt-vite-legacy": "^1.2.0",
51
53
  "pinia": "^2.1.4",
52
54
  "sass": "^1.77.2",
53
55
  "simple-git-hooks": "^2.9.0",