create-young-proj 1.7.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +117 -1
- 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/error.vue +3 -3
- package/template-nuxt-admin/nuxt.config.ts +33 -11
- package/template-nuxt-admin/package.json +14 -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 +5271 -4123
- 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/app.vue +45 -1
- package/template-nuxt-website/layouts/default.vue +18 -16
- package/template-nuxt-website/layouts/home.vue +14 -12
- package/template-nuxt-website/layouts/tabbar.vue +18 -16
- package/template-nuxt-website/nuxt.config.ts +20 -5
- package/template-nuxt-website/package.json +3 -1
- package/template-nuxt-website/server/utils/proxy.ts +1 -30
- package/template-nuxt-website/yarn.lock +4683 -3595
- package/template-nuxt-admin/server/utils/index.ts +0 -36
@@ -0,0 +1,19 @@
|
|
1
|
+
/* eslint-disable */
|
2
|
+
/* prettier-ignore */
|
3
|
+
// @ts-nocheck
|
4
|
+
// Generated by unplugin-vue-components
|
5
|
+
// Read more: https://github.com/vuejs/core/pull/3399
|
6
|
+
export {}
|
7
|
+
|
8
|
+
declare module 'vue' {
|
9
|
+
export interface GlobalComponents {
|
10
|
+
DvBorderBox12: typeof import('@kjgl77/datav-vue3')['BorderBox12']
|
11
|
+
RouterLink: typeof import('vue-router')['RouterLink']
|
12
|
+
RouterView: typeof import('vue-router')['RouterView']
|
13
|
+
YoungCountUp: typeof import('./../src/components/YoungCountUp.vue')['default']
|
14
|
+
YoungECharts: typeof import('./../src/components/YoungECharts/index.vue')['default']
|
15
|
+
YoungHeader: typeof import('./../src/components/YoungHeader.vue')['default']
|
16
|
+
YoungSectionContainer: typeof import('./../src/components/YoungSectionContainer.vue')['default']
|
17
|
+
YoungSectionHeader: typeof import('./../src/components/YoungSectionHeader.vue')['default']
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
/*
|
2
|
+
* @Author: zhangyang
|
3
|
+
* @Date: 2024-02-02 12:05:08
|
4
|
+
* @LastEditTime: 2024-02-02 12:07:33
|
5
|
+
* @Description:
|
6
|
+
*/
|
7
|
+
import type {
|
8
|
+
BarSeriesOption,
|
9
|
+
GaugeSeriesOption,
|
10
|
+
LineSeriesOption,
|
11
|
+
MapSeriesOption,
|
12
|
+
PieSeriesOption,
|
13
|
+
} from 'echarts/charts'
|
14
|
+
|
15
|
+
import type {
|
16
|
+
DatasetComponentOption,
|
17
|
+
GridComponentOption,
|
18
|
+
LegendComponentOption,
|
19
|
+
TitleComponentOption,
|
20
|
+
ToolboxComponentOption,
|
21
|
+
TooltipComponentOption,
|
22
|
+
} from 'echarts/components'
|
23
|
+
|
24
|
+
import type { ComposeOption } from 'echarts/core'
|
25
|
+
|
26
|
+
declare global {
|
27
|
+
type EChartsOption = ComposeOption<
|
28
|
+
| LineSeriesOption
|
29
|
+
| GridComponentOption
|
30
|
+
| TitleComponentOption
|
31
|
+
| TooltipComponentOption
|
32
|
+
| LegendComponentOption
|
33
|
+
| BarSeriesOption
|
34
|
+
| DatasetComponentOption | PieSeriesOption | GaugeSeriesOption | MapSeriesOption | ToolboxComponentOption
|
35
|
+
>
|
36
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/*
|
2
|
+
* @Author: Leo l024983409@qq.com
|
3
|
+
* @Date: 2023-09-24 16:03:06
|
4
|
+
* @LastEditors: Leo l024983409@qq.com
|
5
|
+
* @LastEditTime: 2023-10-02 10:02:27
|
6
|
+
* @Description:
|
7
|
+
*/
|
8
|
+
|
9
|
+
interface ISocialCondition {
|
10
|
+
values: number[]
|
11
|
+
increment: number[]
|
12
|
+
industry: number[]
|
13
|
+
}
|
14
|
+
|
15
|
+
interface IPowerGridConstruction {
|
16
|
+
values: number[]
|
17
|
+
increment: number[]
|
18
|
+
// 省份
|
19
|
+
province: number[]
|
20
|
+
}
|
21
|
+
|
22
|
+
interface IElectricityUsage {
|
23
|
+
values: number[]
|
24
|
+
increment: number[]
|
25
|
+
electricity: number[]
|
26
|
+
}
|
27
|
+
|
28
|
+
interface IManagementImprovement {
|
29
|
+
values: number[]
|
30
|
+
increment: number[]
|
31
|
+
data: number
|
32
|
+
}
|
33
|
+
|
34
|
+
interface IGridReliability {
|
35
|
+
values: number[]
|
36
|
+
data1: number[]
|
37
|
+
data2: number[]
|
38
|
+
}
|
39
|
+
|
40
|
+
interface ISalesOfElectricityAndLineLoss {
|
41
|
+
values: number[]
|
42
|
+
increment: number[]
|
43
|
+
data1: number[]
|
44
|
+
data2: number[]
|
45
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
/*
|
2
|
+
* @Author: Leo l024983409@qq.com
|
3
|
+
* @Date: 2023-09-23 11:49:49
|
4
|
+
* @LastEditors: Please set LastEditors
|
5
|
+
* @LastEditTime: 2024-02-02 16:09:31
|
6
|
+
* @Description:
|
7
|
+
*/
|
8
|
+
// vite-env.d.ts
|
9
|
+
/// <reference types="vite-plugin-pages/client" />
|
10
|
+
|
11
|
+
interface IResult<T = any> {
|
12
|
+
data: T
|
13
|
+
message: string
|
14
|
+
code: number
|
15
|
+
}
|
16
|
+
interface ImportMetaEnv {
|
17
|
+
/**
|
18
|
+
* 接口请求地址
|
19
|
+
*/
|
20
|
+
NUXT_PUBLIC_API_BASE: string
|
21
|
+
/**
|
22
|
+
* 版本号
|
23
|
+
*/
|
24
|
+
NUXT_PUBLIC_CURRENT_VERSION: string
|
25
|
+
}
|
26
|
+
interface IDescription {
|
27
|
+
label: string
|
28
|
+
value: string
|
29
|
+
increment: string
|
30
|
+
}
|
31
|
+
|
32
|
+
declare interface Window {
|
33
|
+
__YOUNG_ENV__: ImportMetaEnv
|
34
|
+
}
|
35
|
+
|
36
|
+
declare module 'virtual:local-server' {
|
37
|
+
const server: string
|
38
|
+
}
|
@@ -0,0 +1,68 @@
|
|
1
|
+
/*
|
2
|
+
* @Author: Leo l024983409@qq.com
|
3
|
+
* @Date: 2023-09-19 20:22:55
|
4
|
+
* @LastEditors: Please set LastEditors
|
5
|
+
* @LastEditTime: 2024-02-02 11:11:34
|
6
|
+
* @Description:
|
7
|
+
*/
|
8
|
+
|
9
|
+
import {
|
10
|
+
defineConfig,
|
11
|
+
presetAttributify,
|
12
|
+
presetIcons,
|
13
|
+
presetTypography,
|
14
|
+
presetUno,
|
15
|
+
transformerDirectives,
|
16
|
+
transformerVariantGroup,
|
17
|
+
} from 'unocss'
|
18
|
+
import { Breakpoint } from './src/enums/breakpointEnum'
|
19
|
+
|
20
|
+
export default defineConfig({
|
21
|
+
shortcuts: [
|
22
|
+
['around', 'flex justify-around items-center'],
|
23
|
+
['between', 'flex justify-between items-center'],
|
24
|
+
['center', 'flex justify-center items-center'],
|
25
|
+
['center-y', 'flex items-center'],
|
26
|
+
[
|
27
|
+
'btn',
|
28
|
+
'px-4 py-1 rounded inline-block bg-teal-600 text-white cursor-pointer hover:bg-teal-700 disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50',
|
29
|
+
],
|
30
|
+
[
|
31
|
+
'icon-btn',
|
32
|
+
'h-30px w-30px transition-all duration-400 dark:h-30px dark:w-30px hover:scale-110 inline-block cursor-pointer select-none transition duration-200 ease-in-out !outline-none',
|
33
|
+
],
|
34
|
+
['b-bottom', 'border-b-1 border-b-solid border-b-[#eee]'],
|
35
|
+
['switch-animation', 'transition duration-300'],
|
36
|
+
['text', 'text-[#00706c] dark:text-[#fff] switch-animation'],
|
37
|
+
],
|
38
|
+
theme: {
|
39
|
+
breakpoints: Breakpoint,
|
40
|
+
},
|
41
|
+
presets: [
|
42
|
+
presetUno(),
|
43
|
+
presetAttributify(),
|
44
|
+
presetIcons({
|
45
|
+
scale: 1.2,
|
46
|
+
warn: true,
|
47
|
+
}),
|
48
|
+
presetTypography(),
|
49
|
+
],
|
50
|
+
rules: [
|
51
|
+
// 多行省略
|
52
|
+
[/^line-clamp-(\d+)$/, ([, value]) => handlerLineClamp(value)],
|
53
|
+
],
|
54
|
+
transformers: [
|
55
|
+
transformerDirectives(),
|
56
|
+
transformerVariantGroup(),
|
57
|
+
],
|
58
|
+
})
|
59
|
+
// 处理多行省略
|
60
|
+
function handlerLineClamp(value: any) {
|
61
|
+
return {
|
62
|
+
'overflow': 'hidden',
|
63
|
+
'display': '-webkit-box',
|
64
|
+
'word-break': 'break-all',
|
65
|
+
'-webkit-box-orient': 'vertical',
|
66
|
+
'-webkit-line-clamp': `${value}`,
|
67
|
+
}
|
68
|
+
}
|
@@ -0,0 +1,131 @@
|
|
1
|
+
/*
|
2
|
+
* @Author: Leo l024983409@qq.com
|
3
|
+
* @Date: 2023-09-19 20:22:55
|
4
|
+
* @LastEditors: Please set LastEditors
|
5
|
+
* @LastEditTime: 2024-02-02 16:44:10
|
6
|
+
* @Description:
|
7
|
+
*/
|
8
|
+
import { URL, fileURLToPath } from 'node:url'
|
9
|
+
import { networkInterfaces } from 'node:os'
|
10
|
+
import { defineConfig } from 'vite'
|
11
|
+
import Vue from '@vitejs/plugin-vue'
|
12
|
+
import Pages from 'vite-plugin-pages'
|
13
|
+
import Layouts from 'vite-plugin-vue-layouts'
|
14
|
+
import Components from 'unplugin-vue-components/vite'
|
15
|
+
import AutoImport from 'unplugin-auto-import/vite'
|
16
|
+
import Inspect from 'vite-plugin-inspect'
|
17
|
+
import Unocss from 'unocss/vite'
|
18
|
+
import legacy from '@vitejs/plugin-legacy'
|
19
|
+
|
20
|
+
import type { ConfigEnv, UserConfigExport } from 'vite'
|
21
|
+
|
22
|
+
function getLocalIP() {
|
23
|
+
const ips = networkInterfaces()
|
24
|
+
|
25
|
+
for (const name of Object.keys(ips)) {
|
26
|
+
const networkInterface = ips[name]
|
27
|
+
for (const ip of networkInterface!) {
|
28
|
+
if (ip.family === 'IPv4' && !ip.internal)
|
29
|
+
return ip.address
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
return '127.0.0.1'
|
34
|
+
}
|
35
|
+
|
36
|
+
export default ({ mode }: ConfigEnv): UserConfigExport => {
|
37
|
+
const localServer = mode !== 'production' ? `http://${getLocalIP()}:3000` : ''
|
38
|
+
console.log('🚀 ~ load ~ localServer:', localServer)
|
39
|
+
|
40
|
+
return defineConfig({
|
41
|
+
resolve: {
|
42
|
+
alias: {
|
43
|
+
'~': fileURLToPath(new URL('./src', import.meta.url)),
|
44
|
+
},
|
45
|
+
},
|
46
|
+
server: {
|
47
|
+
host: true,
|
48
|
+
proxy: {
|
49
|
+
'/api': localServer,
|
50
|
+
},
|
51
|
+
},
|
52
|
+
build: {
|
53
|
+
target: ['chrome58'],
|
54
|
+
cssTarget: ['chrome58'],
|
55
|
+
},
|
56
|
+
plugins: [
|
57
|
+
(function () {
|
58
|
+
const moduleId = 'virtual:local-server'
|
59
|
+
|
60
|
+
return {
|
61
|
+
name: moduleId.split(':')[1],
|
62
|
+
resolveId(id: string) {
|
63
|
+
if (id === moduleId)
|
64
|
+
return moduleId
|
65
|
+
},
|
66
|
+
load(id: string) {
|
67
|
+
if (id === moduleId)
|
68
|
+
return `export const server = '${localServer}'`
|
69
|
+
},
|
70
|
+
}
|
71
|
+
})(),
|
72
|
+
|
73
|
+
Vue(),
|
74
|
+
|
75
|
+
// https://github.com/hannoeru/vite-plugin-pages
|
76
|
+
Pages({
|
77
|
+
extensions: ['vue'],
|
78
|
+
}),
|
79
|
+
|
80
|
+
// https://github.com/JohnCampionJr/vite-plugin-vue-layouts
|
81
|
+
Layouts(),
|
82
|
+
|
83
|
+
// https://github.com/antfu/unplugin-auto-import
|
84
|
+
AutoImport({
|
85
|
+
imports: [
|
86
|
+
'vue',
|
87
|
+
'vue-router',
|
88
|
+
'@vueuse/core',
|
89
|
+
'pinia',
|
90
|
+
],
|
91
|
+
dts: 'types/auto-imports.d.ts',
|
92
|
+
dirs: [
|
93
|
+
'src/stores/**',
|
94
|
+
'src/modules/**',
|
95
|
+
'src/composables/**',
|
96
|
+
'src/store/**',
|
97
|
+
'src/apis',
|
98
|
+
'src/utils/**',
|
99
|
+
'src/components/**',
|
100
|
+
'src/constants/**',
|
101
|
+
'src/enums/**',
|
102
|
+
],
|
103
|
+
vueTemplate: true,
|
104
|
+
}),
|
105
|
+
|
106
|
+
// https://github.com/antfu/unplugin-vue-components
|
107
|
+
Components({
|
108
|
+
extensions: ['vue'],
|
109
|
+
// allow auto import and register components used in markdown
|
110
|
+
include: [/\.vue$/, /\.vue\?vue/],
|
111
|
+
dts: 'types/components.d.ts',
|
112
|
+
resolvers: [(componentName) => {
|
113
|
+
if (componentName.startsWith('Dv'))
|
114
|
+
return { name: componentName.slice(2), from: '@kjgl77/datav-vue3' }
|
115
|
+
},
|
116
|
+
],
|
117
|
+
dirs: ['src/components'],
|
118
|
+
}),
|
119
|
+
|
120
|
+
// https://github.com/antfu/unocss
|
121
|
+
// see uno.config.ts for config
|
122
|
+
Unocss(),
|
123
|
+
|
124
|
+
// https://github.com/antfu/vite-plugin-inspect
|
125
|
+
// Visit http://localhost:3333/__inspect/ to see the inspector
|
126
|
+
Inspect(),
|
127
|
+
|
128
|
+
legacy({ renderLegacyChunks: false }),
|
129
|
+
],
|
130
|
+
})
|
131
|
+
}
|