create-young-proj 1.6.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +110 -0
- package/README.md +6 -1
- package/dist/index.mjs +19 -19
- package/package.json +1 -1
- package/src/index.ts +6 -1
- package/template-admin-server/src/service/role.service.ts +5 -3
- package/template-big-screen/.editorconfig +14 -0
- package/template-big-screen/.nvmrc +1 -0
- package/template-big-screen/.vscode/extensions.json +12 -0
- package/template-big-screen/.vscode/settings.json +39 -0
- package/template-big-screen/Dockerfile +49 -0
- package/template-big-screen/README.md +20 -0
- package/template-big-screen/_gitignore +23 -0
- package/template-big-screen/_npmrc +2 -0
- package/template-big-screen/_nvmrc +1 -0
- package/template-big-screen/boot.mjs +16 -0
- package/template-big-screen/config/.devrc +1 -0
- package/template-big-screen/config/.onlinerc +1 -0
- package/template-big-screen/config/.testrc +1 -0
- package/template-big-screen/eslint.config.js +34 -0
- package/template-big-screen/index.html +48 -0
- package/template-big-screen/nitro.config.ts +23 -0
- package/template-big-screen/package.json +66 -0
- package/template-big-screen/plugins/init.ts +57 -0
- package/template-big-screen/public/favicon.svg +3 -0
- package/template-big-screen/routes/api/[...all].ts +19 -0
- package/template-big-screen/routes/get/env.ts +13 -0
- package/template-big-screen/src/App.vue +24 -0
- package/template-big-screen/src/apis/get.ts +77 -0
- package/template-big-screen/src/apis/index.ts +53 -0
- package/template-big-screen/src/apis/post.ts +14 -0
- package/template-big-screen/src/assets/data/china.json +1 -0
- package/template-big-screen/src/components/YoungCountUp.vue +29 -0
- package/template-big-screen/src/components/YoungECharts/config.ts +56 -0
- package/template-big-screen/src/components/YoungECharts/index.vue +111 -0
- package/template-big-screen/src/components/YoungHeader.vue +54 -0
- package/template-big-screen/src/components/YoungSectionContainer.vue +55 -0
- package/template-big-screen/src/components/YoungSectionHeader.vue +23 -0
- package/template-big-screen/src/composables/breakPoint.ts +20 -0
- package/template-big-screen/src/composables/dark.ts +52 -0
- package/template-big-screen/src/composables/echarts.ts +17 -0
- package/template-big-screen/src/composables/loadData.ts +38 -0
- package/template-big-screen/src/directives/ellipsis.ts +20 -0
- package/template-big-screen/src/directives/index.ts +13 -0
- package/template-big-screen/src/enums/breakpointEnum.ts +9 -0
- package/template-big-screen/src/layouts/404.vue +19 -0
- package/template-big-screen/src/layouts/blank.vue +9 -0
- package/template-big-screen/src/layouts/default.vue +17 -0
- package/template-big-screen/src/main.ts +59 -0
- package/template-big-screen/src/modules/index.ts +8 -0
- package/template-big-screen/src/modules/pinia.ts +11 -0
- package/template-big-screen/src/modules/router.ts +28 -0
- package/template-big-screen/src/pages/[...all].vue +16 -0
- package/template-big-screen/src/pages/electricity/build.vue +135 -0
- package/template-big-screen/src/pages/electricity/reliability.vue +137 -0
- package/template-big-screen/src/pages/electricity/sale-and-cost.vue +158 -0
- package/template-big-screen/src/pages/index.vue +59 -0
- package/template-big-screen/src/pages/kpi.vue +129 -0
- package/template-big-screen/src/pages/manage-improve.vue +114 -0
- package/template-big-screen/src/pages/social/condition.vue +202 -0
- package/template-big-screen/src/pages/social/electricity-usage.vue +140 -0
- package/template-big-screen/src/styles/index.scss +82 -0
- package/template-big-screen/tsconfig.json +38 -0
- package/template-big-screen/types/auto-imports.d.ts +949 -0
- package/template-big-screen/types/components.d.ts +19 -0
- package/template-big-screen/types/echarts.d.ts +36 -0
- package/template-big-screen/types/index.d.ts +45 -0
- package/template-big-screen/types/type.d.ts +38 -0
- package/template-big-screen/uno.config.ts +68 -0
- package/template-big-screen/vite.config.ts +131 -0
- package/template-big-screen/yarn.lock +7443 -0
- package/template-nuxt-admin/README.md +3 -3
- package/template-nuxt-admin/boot.mjs +4 -1
- package/template-nuxt-admin/composables/config.ts +2 -2
- package/template-nuxt-admin/config/.devrc +1 -1
- package/template-nuxt-admin/config/.onlinerc +1 -1
- package/template-nuxt-admin/config/.testrc +1 -1
- package/template-nuxt-admin/nuxt.config.ts +14 -5
- package/template-nuxt-admin/package.json +12 -11
- package/template-nuxt-admin/pages/system/api.vue +6 -6
- package/template-nuxt-admin/pages/system/role.vue +4 -4
- package/template-nuxt-admin/pages/system/user.vue +4 -4
- package/template-nuxt-admin/server/api/[...all].ts +10 -3
- package/template-nuxt-admin/server/plugins/env.ts +5 -4
- package/template-nuxt-admin/uno.config.ts +1 -9
- package/template-nuxt-admin/yarn.lock +3659 -3363
- package/template-nuxt-mobile/package.json +1 -0
- package/template-nuxt-mobile/server/utils/proxy.ts +1 -30
- package/template-nuxt-mobile/yarn.lock +9 -0
- package/template-nuxt-website/package.json +1 -0
- package/template-nuxt-website/server/utils/proxy.ts +1 -30
- package/template-nuxt-website/yarn.lock +9 -0
- package/template-uni-app/README.md +6 -1
- package/template-uni-app/_env +2 -1
- package/template-uni-app/auto-imports.d.ts +0 -4
- package/template-uni-app/custom-plugins/multiconf.ts +13 -1
- package/template-uni-app/package.json +17 -17
- package/template-uni-app/pnpm-lock.yaml +565 -985
- package/template-uni-app/src/App.vue +11 -1
- package/template-uni-app/src/apis/index.ts +9 -2
- package/template-uni-app/src/components/young-loading/young-loading.vue +4 -2
- package/template-uni-app/src/env.d.ts +7 -2
- package/template-uni-app/src/utils/auth.ts +24 -1
- package/template-uni-app/src/utils/index.ts +1 -2
- package/template-uni-app/src/utils/system.ts +6 -1
- package/template-nuxt-admin/server/utils/index.ts +0 -36
- package/template-uni-app/src/utils/map.ts +0 -98
@@ -1,40 +1,11 @@
|
|
1
1
|
/*
|
2
2
|
* @Author: zhangyang
|
3
3
|
* @Date: 2023-09-27 11:22:08
|
4
|
-
* @LastEditTime:
|
4
|
+
* @LastEditTime: 2024-03-08 15:04:57
|
5
5
|
* @Description:
|
6
6
|
*/
|
7
|
-
import type { ServerOptions as HTTPProxyOptions } from 'http-proxy'
|
8
|
-
import ProxyModule from 'http-proxy'
|
9
7
|
import type { H3Event } from 'h3'
|
10
8
|
|
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
|
-
}
|
37
|
-
|
38
9
|
/**
|
39
10
|
* 服务端发送的请求
|
40
11
|
*/
|
@@ -4232,6 +4232,15 @@ gzip-size@^7.0.0:
|
|
4232
4232
|
dependencies:
|
4233
4233
|
duplexer "^0.1.2"
|
4234
4234
|
|
4235
|
+
h3-proxy@^1.12.0:
|
4236
|
+
version "1.12.0"
|
4237
|
+
resolved "https://registry.npmmirror.com/h3-proxy/-/h3-proxy-1.12.0.tgz#2a25c6df3fae63e8a1183ba234cd100038e0d4ca"
|
4238
|
+
integrity sha512-nvYRfRVPyU2Nt3Z5gZoAPp8swUH6XTltV6mRQUnTJHc9UulYcCVyQCZX32tJdGESDvurE18WtjXT8sWWioCzFw==
|
4239
|
+
dependencies:
|
4240
|
+
consola "^3.2.3"
|
4241
|
+
is-glob "^4.0.3"
|
4242
|
+
micromatch "^4.0.5"
|
4243
|
+
|
4235
4244
|
h3@^1.6.6, h3@^1.8.1, h3@^1.8.2:
|
4236
4245
|
version "1.8.2"
|
4237
4246
|
resolved "https://registry.npmmirror.com/h3/-/h3-1.8.2.tgz#69ea8ca0285c1bb268cd08b9a7017e02939f88b7"
|
@@ -1,40 +1,11 @@
|
|
1
1
|
/*
|
2
2
|
* @Author: zhangyang
|
3
3
|
* @Date: 2023-09-27 11:22:08
|
4
|
-
* @LastEditTime:
|
4
|
+
* @LastEditTime: 2024-03-08 15:05:53
|
5
5
|
* @Description:
|
6
6
|
*/
|
7
|
-
import type { ServerOptions as HTTPProxyOptions } from 'http-proxy'
|
8
|
-
import ProxyModule from 'http-proxy'
|
9
7
|
import type { H3Event } from 'h3'
|
10
8
|
|
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
|
-
}
|
37
|
-
|
38
9
|
/**
|
39
10
|
* 服务端发送的请求
|
40
11
|
*/
|
@@ -4146,6 +4146,15 @@ gzip-size@^7.0.0:
|
|
4146
4146
|
dependencies:
|
4147
4147
|
duplexer "^0.1.2"
|
4148
4148
|
|
4149
|
+
h3-proxy@^1.12.0:
|
4150
|
+
version "1.12.0"
|
4151
|
+
resolved "https://registry.npmmirror.com/h3-proxy/-/h3-proxy-1.12.0.tgz#2a25c6df3fae63e8a1183ba234cd100038e0d4ca"
|
4152
|
+
integrity sha512-nvYRfRVPyU2Nt3Z5gZoAPp8swUH6XTltV6mRQUnTJHc9UulYcCVyQCZX32tJdGESDvurE18WtjXT8sWWioCzFw==
|
4153
|
+
dependencies:
|
4154
|
+
consola "^3.2.3"
|
4155
|
+
is-glob "^4.0.3"
|
4156
|
+
micromatch "^4.0.5"
|
4157
|
+
|
4149
4158
|
h3@^1.6.6, h3@^1.8.1, h3@^1.8.2:
|
4150
4159
|
version "1.8.2"
|
4151
4160
|
resolved "https://registry.npmmirror.com/h3/-/h3-1.8.2.tgz#69ea8ca0285c1bb268cd08b9a7017e02939f88b7"
|
package/template-uni-app/_env
CHANGED
@@ -423,7 +423,6 @@ declare module 'vue' {
|
|
423
423
|
readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
|
424
424
|
readonly extendRef: UnwrapRef<typeof import('@vueuse/core')['extendRef']>
|
425
425
|
readonly fingerPrintAuth: UnwrapRef<typeof import('./src/utils/auth')['fingerPrintAuth']>
|
426
|
-
readonly geocoderLocation: UnwrapRef<typeof import('./src/utils/map')['geocoderLocation']>
|
427
426
|
readonly getActivePinia: UnwrapRef<typeof import('pinia')['getActivePinia']>
|
428
427
|
readonly getAuthInfo: UnwrapRef<typeof import('./src/utils/auth')['getAuthInfo']>
|
429
428
|
readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
|
@@ -516,7 +515,6 @@ declare module 'vue' {
|
|
516
515
|
readonly resolveRef: UnwrapRef<typeof import('@vueuse/core')['resolveRef']>
|
517
516
|
readonly resolveUnref: UnwrapRef<typeof import('@vueuse/core')['resolveUnref']>
|
518
517
|
readonly route: UnwrapRef<typeof import('./src/utils/route')['route']>
|
519
|
-
readonly searchLoaction: UnwrapRef<typeof import('./src/utils/map')['searchLoaction']>
|
520
518
|
readonly setActivePinia: UnwrapRef<typeof import('pinia')['setActivePinia']>
|
521
519
|
readonly setLocationInfo: UnwrapRef<typeof import('./src/store/local/index')['setLocationInfo']>
|
522
520
|
readonly setMapStoreSuffix: UnwrapRef<typeof import('pinia')['setMapStoreSuffix']>
|
@@ -796,7 +794,6 @@ declare module '@vue/runtime-core' {
|
|
796
794
|
readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
|
797
795
|
readonly extendRef: UnwrapRef<typeof import('@vueuse/core')['extendRef']>
|
798
796
|
readonly fingerPrintAuth: UnwrapRef<typeof import('./src/utils/auth')['fingerPrintAuth']>
|
799
|
-
readonly geocoderLocation: UnwrapRef<typeof import('./src/utils/map')['geocoderLocation']>
|
800
797
|
readonly getActivePinia: UnwrapRef<typeof import('pinia')['getActivePinia']>
|
801
798
|
readonly getAuthInfo: UnwrapRef<typeof import('./src/utils/auth')['getAuthInfo']>
|
802
799
|
readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
|
@@ -889,7 +886,6 @@ declare module '@vue/runtime-core' {
|
|
889
886
|
readonly resolveRef: UnwrapRef<typeof import('@vueuse/core')['resolveRef']>
|
890
887
|
readonly resolveUnref: UnwrapRef<typeof import('@vueuse/core')['resolveUnref']>
|
891
888
|
readonly route: UnwrapRef<typeof import('./src/utils/route')['route']>
|
892
|
-
readonly searchLoaction: UnwrapRef<typeof import('./src/utils/map')['searchLoaction']>
|
893
889
|
readonly setActivePinia: UnwrapRef<typeof import('pinia')['setActivePinia']>
|
894
890
|
readonly setLocationInfo: UnwrapRef<typeof import('./src/store/local/index')['setLocationInfo']>
|
895
891
|
readonly setMapStoreSuffix: UnwrapRef<typeof import('pinia')['setMapStoreSuffix']>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* @Author: zhangyang
|
3
3
|
* @Date: 2023-07-19 14:32:45
|
4
|
-
* @LastEditTime:
|
4
|
+
* @LastEditTime: 2024-02-01 11:29:08
|
5
5
|
* @Description:
|
6
6
|
*/
|
7
7
|
import type { Plugin } from 'vite'
|
@@ -22,6 +22,9 @@ export function multiConf(env: string) {
|
|
22
22
|
},
|
23
23
|
generateBundle(options, bundle) {
|
24
24
|
const appid = configEnv.VITE_APPID
|
25
|
+
const appname = configEnv.VITE_APPNAME
|
26
|
+
|
27
|
+
// 微信小程序
|
25
28
|
const json = bundle['project.config.json'] as OutputAsset
|
26
29
|
if (json?.source && typeof json.source === 'string') {
|
27
30
|
const jsonConf = JSON.parse(json.source)
|
@@ -80,6 +83,15 @@ export function multiConf(env: string) {
|
|
80
83
|
|
81
84
|
app.source = JSON.stringify(appConf, null, 2)
|
82
85
|
}
|
86
|
+
|
87
|
+
// APP
|
88
|
+
const manifest = bundle['manifest.json'] as OutputAsset
|
89
|
+
if (manifest?.source && typeof manifest.source === 'string') {
|
90
|
+
const manifestConf = JSON.parse(manifest.source)
|
91
|
+
manifestConf.id = appid
|
92
|
+
manifestConf.name = appname
|
93
|
+
manifest.source = JSON.stringify(manifestConf, null, 2)
|
94
|
+
}
|
83
95
|
},
|
84
96
|
} as Plugin
|
85
97
|
}
|
@@ -47,19 +47,19 @@
|
|
47
47
|
"dependencies": {
|
48
48
|
"@bluesyoung/http": "^1.2.0",
|
49
49
|
"@bluesyoung/utils": "^0.2.1",
|
50
|
-
"@dcloudio/uni-app": "3.0.0-
|
51
|
-
"@dcloudio/uni-app-plus": "3.0.0-
|
52
|
-
"@dcloudio/uni-components": "3.0.0-
|
53
|
-
"@dcloudio/uni-h5": "3.0.0-
|
54
|
-
"@dcloudio/uni-mp-alipay": "3.0.0-
|
55
|
-
"@dcloudio/uni-mp-baidu": "3.0.0-
|
56
|
-
"@dcloudio/uni-mp-jd": "3.0.0-
|
57
|
-
"@dcloudio/uni-mp-kuaishou": "3.0.0-
|
58
|
-
"@dcloudio/uni-mp-lark": "3.0.0-
|
59
|
-
"@dcloudio/uni-mp-qq": "3.0.0-
|
60
|
-
"@dcloudio/uni-mp-toutiao": "3.0.0-
|
61
|
-
"@dcloudio/uni-mp-weixin": "3.0.0-
|
62
|
-
"@dcloudio/uni-quickapp-webview": "3.0.0-
|
50
|
+
"@dcloudio/uni-app": "3.0.0-3090920231225001",
|
51
|
+
"@dcloudio/uni-app-plus": "3.0.0-3090920231225001",
|
52
|
+
"@dcloudio/uni-components": "3.0.0-3090920231225001",
|
53
|
+
"@dcloudio/uni-h5": "3.0.0-3090920231225001",
|
54
|
+
"@dcloudio/uni-mp-alipay": "3.0.0-3090920231225001",
|
55
|
+
"@dcloudio/uni-mp-baidu": "3.0.0-3090920231225001",
|
56
|
+
"@dcloudio/uni-mp-jd": "3.0.0-3090920231225001",
|
57
|
+
"@dcloudio/uni-mp-kuaishou": "3.0.0-3090920231225001",
|
58
|
+
"@dcloudio/uni-mp-lark": "3.0.0-3090920231225001",
|
59
|
+
"@dcloudio/uni-mp-qq": "3.0.0-3090920231225001",
|
60
|
+
"@dcloudio/uni-mp-toutiao": "3.0.0-3090920231225001",
|
61
|
+
"@dcloudio/uni-mp-weixin": "3.0.0-3090920231225001",
|
62
|
+
"@dcloudio/uni-quickapp-webview": "3.0.0-3090920231225001",
|
63
63
|
"@uni-helper/uni-use": "^0.17.1",
|
64
64
|
"@vueuse/core": "9",
|
65
65
|
"dayjs": "^1.11.10",
|
@@ -78,11 +78,11 @@
|
|
78
78
|
"devDependencies": {
|
79
79
|
"@antfu/eslint-config": "^1.1.2",
|
80
80
|
"@dcloudio/types": "^3.4.3",
|
81
|
-
"@dcloudio/uni-automator": "3.0.0-
|
82
|
-
"@dcloudio/uni-cli-shared": "3.0.0-
|
83
|
-
"@dcloudio/uni-stacktracey": "3.0.0-
|
81
|
+
"@dcloudio/uni-automator": "3.0.0-3090920231225001",
|
82
|
+
"@dcloudio/uni-cli-shared": "3.0.0-3090920231225001",
|
83
|
+
"@dcloudio/uni-stacktracey": "3.0.0-3090920231225001",
|
84
84
|
"@dcloudio/uni-ui": "^1.4.28",
|
85
|
-
"@dcloudio/vite-plugin-uni": "3.0.0-
|
85
|
+
"@dcloudio/vite-plugin-uni": "3.0.0-3090920231225001",
|
86
86
|
"@types/md5": "^2.3.5",
|
87
87
|
"@uni-helper/pages-json-schema": "^0.2.12",
|
88
88
|
"@uni-helper/uni-app-types": "^0.5.8",
|