@chenhui996/gg-cli 1.0.7 → 1.0.9
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.
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/template/main-app/.env.development +7 -0
- package/dist/template/main-app/.env.production +7 -0
- package/dist/template/{zhiguan → main-app}/README.md +13 -10
- package/dist/template/main-app/docs//345/276/256/345/211/215/347/253/257/346/236/266/346/236/204/350/256/276/350/256/241/344/270/216/345/274/200/345/217/221/346/214/207/345/215/227.md +285 -0
- package/dist/template/{zhiguan → main-app}/docs//351/241/271/347/233/256/347/233/256/345/275/225/347/273/223/346/236/204/350/247/204/350/214/203.md +24 -15
- package/dist/template/{zhiguan → main-app}/package.json +4 -2
- package/dist/template/{zhiguan → main-app}/src/api/user.ts +1 -1
- package/dist/template/main-app/src/components/AuthRoute/index.tsx +25 -0
- package/dist/template/{zhiguan → main-app}/src/layouts/BasicLayout.tsx +15 -7
- package/dist/template/main-app/src/main.tsx +36 -0
- package/dist/template/{zhiguan → main-app}/src/pages/404.test.tsx +1 -1
- package/dist/template/{zhiguan → main-app}/src/pages/home/index.tsx +2 -68
- package/dist/template/main-app/src/pages/login/index.tsx +97 -0
- package/dist/template/main-app/src/pages/micro-app/index.tsx +12 -0
- package/dist/template/{zhiguan → main-app}/src/router/index.tsx +18 -2
- package/dist/template/main-app/src/store/useGlobalStore.ts +29 -0
- package/dist/template/main-app/src/style.less +40 -0
- package/dist/template/main-app/src/utils/request/index.ts +113 -0
- package/dist/template/{zhiguan → main-app}/src/vite-env.d.ts +1 -0
- package/dist/template/{zhiguan → main-app}/vite.config.ts +28 -0
- package/dist/template/micro-app/.editorconfig +16 -0
- package/dist/template/micro-app/.env +1 -0
- package/dist/template/micro-app/.env.test +4 -0
- package/dist/template/micro-app/.prettierignore +34 -0
- package/dist/template/micro-app/.prettierrc +14 -0
- package/dist/template/micro-app/README.md +186 -0
- package/dist/template/micro-app/eslint.config.js +27 -0
- package/dist/template/micro-app/package-lock.json +7274 -0
- package/dist/template/micro-app/package.json +63 -0
- package/dist/template/micro-app/src/api/user.ts +21 -0
- package/dist/template/micro-app/src/assets/Frame 20.png +0 -0
- package/dist/template/micro-app/src/components/Chart/index.tsx +22 -0
- package/dist/template/micro-app/src/components/ErrorBoundary/index.tsx +82 -0
- package/dist/template/micro-app/src/layouts/BasicLayout.tsx +21 -0
- package/dist/template/micro-app/src/main.tsx +47 -0
- package/dist/template/micro-app/src/pages/404.test.tsx +20 -0
- package/dist/template/micro-app/src/pages/404.tsx +32 -0
- package/dist/template/micro-app/src/pages/home/index.less +59 -0
- package/dist/template/micro-app/src/pages/home/index.tsx +165 -0
- package/dist/template/micro-app/src/router/index.tsx +62 -0
- package/dist/template/micro-app/src/setupTests.ts +1 -0
- package/dist/template/micro-app/src/store/useGlobalStore.ts +20 -0
- package/dist/template/micro-app/src/vite-env.d.ts +16 -0
- package/dist/template/{react19 → micro-app}/tsconfig.app.json +7 -1
- package/dist/template/micro-app/vite.config.ts +116 -0
- package/dist/template/operations-tem/gitignore +24 -0
- package/package.json +1 -1
- package/dist/template/react19/README.md +0 -75
- package/dist/template/react19/eslint.config.js +0 -23
- package/dist/template/react19/package.json +0 -34
- package/dist/template/react19/src/App.css +0 -184
- package/dist/template/react19/src/App.tsx +0 -121
- package/dist/template/react19/src/assets/hero.png +0 -0
- package/dist/template/react19/src/assets/vite.svg +0 -1
- package/dist/template/react19/src/index.css +0 -111
- package/dist/template/react19/src/main.tsx +0 -10
- package/dist/template/react19/vite.config.ts +0 -11
- package/dist/template/zhiguan/src/main.tsx +0 -38
- package/dist/template/zhiguan/src/store/useCounterStore.ts +0 -24
- /package/dist/template/{zhiguan → main-app}/.editorconfig +0 -0
- /package/dist/template/{zhiguan → main-app}/.env +0 -0
- /package/dist/template/{zhiguan → main-app}/.env.test +0 -0
- /package/dist/template/{zhiguan → main-app}/.prettierignore +0 -0
- /package/dist/template/{zhiguan → main-app}/.prettierrc +0 -0
- /package/dist/template/{zhiguan → main-app}/docs/Git/345/274/200/345/217/221/350/247/204/350/214/203.md" +0 -0
- /package/dist/template/{zhiguan → main-app}/docs/React/345/274/200/345/217/221/350/247/204/350/214/203.md" +0 -0
- /package/dist/template/{zhiguan → main-app}/docs/TypeScript/345/274/200/345/217/221/350/247/204/350/214/203.md" +0 -0
- /package/dist/template/{zhiguan → main-app}/docs//345/211/215/347/253/257/346/227/245/345/277/227/344/270/216/347/233/221/346/216/247/345/237/213/347/202/271/350/247/204/350/214/203.md" +0 -0
- /package/dist/template/{zhiguan → main-app}/docs//345/215/225/345/205/203/346/265/213/350/257/225/350/247/204/350/214/203.md" +0 -0
- /package/dist/template/{zhiguan → main-app}/eslint.config.js +0 -0
- /package/dist/template/{react19 → main-app}/index.html +0 -0
- /package/dist/template/{react19 → main-app}/public/favicon.svg +0 -0
- /package/dist/template/{react19 → main-app}/public/icons.svg +0 -0
- /package/dist/template/{zhiguan → main-app}/src/assets/Frame 20.png +0 -0
- /package/dist/template/{react19 → main-app}/src/assets/react.svg +0 -0
- /package/dist/template/{zhiguan → main-app}/src/components/Chart/index.tsx +0 -0
- /package/dist/template/{zhiguan → main-app}/src/components/ErrorBoundary/index.tsx +0 -0
- /package/dist/template/{zhiguan → main-app}/src/pages/404.tsx +0 -0
- /package/dist/template/{zhiguan → main-app}/src/pages/about/index.tsx +0 -0
- /package/dist/template/{zhiguan → main-app}/src/pages/calendar/index.tsx +0 -0
- /package/dist/template/{zhiguan → main-app}/src/pages/dashboard/index.tsx +0 -0
- /package/dist/template/{zhiguan → main-app}/src/pages/home/index.less +0 -0
- /package/dist/template/{zhiguan → main-app}/src/pages/settings/index.tsx +0 -0
- /package/dist/template/{zhiguan → main-app}/src/pages/workspace/index.tsx +0 -0
- /package/dist/template/{zhiguan → main-app}/src/setupTests.ts +0 -0
- /package/dist/template/{zhiguan → main-app}/tsconfig.app.json +0 -0
- /package/dist/template/{react19 → main-app}/tsconfig.json +0 -0
- /package/dist/template/{react19 → main-app}/tsconfig.node.json +0 -0
- /package/dist/template/{zhiguan → micro-app}/.env.development +0 -0
- /package/dist/template/{zhiguan → micro-app}/.env.production +0 -0
- /package/dist/template/{zhiguan → micro-app}/index.html +0 -0
- /package/dist/template/{zhiguan → micro-app}/public/favicon.svg +0 -0
- /package/dist/template/{zhiguan → micro-app}/public/icons.svg +0 -0
- /package/dist/template/{zhiguan → micro-app}/src/assets/react.svg +0 -0
- /package/dist/template/{zhiguan → micro-app}/src/style.less +0 -0
- /package/dist/template/{zhiguan → micro-app}/src/utils/request/index.ts +0 -0
- /package/dist/template/{zhiguan → micro-app}/tsconfig.json +0 -0
- /package/dist/template/{zhiguan → micro-app}/tsconfig.node.json +0 -0
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--text: #6b6375;
|
|
3
|
-
--text-h: #08060d;
|
|
4
|
-
--bg: #fff;
|
|
5
|
-
--border: #e5e4e7;
|
|
6
|
-
--code-bg: #f4f3ec;
|
|
7
|
-
--accent: #aa3bff;
|
|
8
|
-
--accent-bg: rgba(170, 59, 255, 0.1);
|
|
9
|
-
--accent-border: rgba(170, 59, 255, 0.5);
|
|
10
|
-
--social-bg: rgba(244, 243, 236, 0.5);
|
|
11
|
-
--shadow:
|
|
12
|
-
rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px;
|
|
13
|
-
|
|
14
|
-
--sans: system-ui, 'Segoe UI', Roboto, sans-serif;
|
|
15
|
-
--heading: system-ui, 'Segoe UI', Roboto, sans-serif;
|
|
16
|
-
--mono: ui-monospace, Consolas, monospace;
|
|
17
|
-
|
|
18
|
-
font: 18px/145% var(--sans);
|
|
19
|
-
letter-spacing: 0.18px;
|
|
20
|
-
color-scheme: light dark;
|
|
21
|
-
color: var(--text);
|
|
22
|
-
background: var(--bg);
|
|
23
|
-
font-synthesis: none;
|
|
24
|
-
text-rendering: optimizeLegibility;
|
|
25
|
-
-webkit-font-smoothing: antialiased;
|
|
26
|
-
-moz-osx-font-smoothing: grayscale;
|
|
27
|
-
|
|
28
|
-
@media (max-width: 1024px) {
|
|
29
|
-
font-size: 16px;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@media (prefers-color-scheme: dark) {
|
|
34
|
-
:root {
|
|
35
|
-
--text: #9ca3af;
|
|
36
|
-
--text-h: #f3f4f6;
|
|
37
|
-
--bg: #16171d;
|
|
38
|
-
--border: #2e303a;
|
|
39
|
-
--code-bg: #1f2028;
|
|
40
|
-
--accent: #c084fc;
|
|
41
|
-
--accent-bg: rgba(192, 132, 252, 0.15);
|
|
42
|
-
--accent-border: rgba(192, 132, 252, 0.5);
|
|
43
|
-
--social-bg: rgba(47, 48, 58, 0.5);
|
|
44
|
-
--shadow:
|
|
45
|
-
rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
#social .button-icon {
|
|
49
|
-
filter: invert(1) brightness(2);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
#root {
|
|
54
|
-
width: 1126px;
|
|
55
|
-
max-width: 100%;
|
|
56
|
-
margin: 0 auto;
|
|
57
|
-
text-align: center;
|
|
58
|
-
border-inline: 1px solid var(--border);
|
|
59
|
-
min-height: 100svh;
|
|
60
|
-
display: flex;
|
|
61
|
-
flex-direction: column;
|
|
62
|
-
box-sizing: border-box;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
body {
|
|
66
|
-
margin: 0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
h1,
|
|
70
|
-
h2 {
|
|
71
|
-
font-family: var(--heading);
|
|
72
|
-
font-weight: 500;
|
|
73
|
-
color: var(--text-h);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
h1 {
|
|
77
|
-
font-size: 56px;
|
|
78
|
-
letter-spacing: -1.68px;
|
|
79
|
-
margin: 32px 0;
|
|
80
|
-
@media (max-width: 1024px) {
|
|
81
|
-
font-size: 36px;
|
|
82
|
-
margin: 20px 0;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
h2 {
|
|
86
|
-
font-size: 24px;
|
|
87
|
-
line-height: 118%;
|
|
88
|
-
letter-spacing: -0.24px;
|
|
89
|
-
margin: 0 0 8px;
|
|
90
|
-
@media (max-width: 1024px) {
|
|
91
|
-
font-size: 20px;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
p {
|
|
95
|
-
margin: 0;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
code,
|
|
99
|
-
.counter {
|
|
100
|
-
font-family: var(--mono);
|
|
101
|
-
display: inline-flex;
|
|
102
|
-
border-radius: 4px;
|
|
103
|
-
color: var(--text-h);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
code {
|
|
107
|
-
font-size: 15px;
|
|
108
|
-
line-height: 135%;
|
|
109
|
-
padding: 4px 8px;
|
|
110
|
-
background: var(--code-bg);
|
|
111
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vite'
|
|
2
|
-
import react, { reactCompilerPreset } from '@vitejs/plugin-react'
|
|
3
|
-
import babel from '@rolldown/plugin-babel'
|
|
4
|
-
|
|
5
|
-
// https://vite.dev/config/
|
|
6
|
-
export default defineConfig({
|
|
7
|
-
plugins: [
|
|
8
|
-
react(),
|
|
9
|
-
babel({ presets: [reactCompilerPreset()] })
|
|
10
|
-
],
|
|
11
|
-
})
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { createRoot } from 'react-dom/client';
|
|
2
|
-
import { RouterProvider } from 'react-router-dom';
|
|
3
|
-
import { ConfigProvider } from 'antd';
|
|
4
|
-
import zhCN from 'antd/locale/zh_CN';
|
|
5
|
-
import { router } from '@/router';
|
|
6
|
-
import { ErrorBoundary } from '@/components/ErrorBoundary';
|
|
7
|
-
import 'antd/dist/reset.css';
|
|
8
|
-
import './style.less';
|
|
9
|
-
|
|
10
|
-
createRoot(document.getElementById('root')!).render(
|
|
11
|
-
<ErrorBoundary>
|
|
12
|
-
<ConfigProvider
|
|
13
|
-
locale={zhCN}
|
|
14
|
-
theme={{
|
|
15
|
-
token: {
|
|
16
|
-
colorPrimary: '#4F46E5', // 调整为更接近设计稿的深蓝色
|
|
17
|
-
borderRadius: 8, // 全局圆角
|
|
18
|
-
colorBgLayout: '#F9FAFB', // 极淡的背景灰
|
|
19
|
-
},
|
|
20
|
-
components: {
|
|
21
|
-
Layout: {
|
|
22
|
-
siderBg: '#ffffff', // 侧边栏白色背景
|
|
23
|
-
headerBg: '#ffffff', // 顶栏白色背景
|
|
24
|
-
},
|
|
25
|
-
Menu: {
|
|
26
|
-
itemSelectedBg: '#EFF6FF', // 选中项浅蓝背景
|
|
27
|
-
itemSelectedColor: '#4F46E5', // 选中项文字颜色
|
|
28
|
-
},
|
|
29
|
-
Card: {
|
|
30
|
-
borderRadiusLG: 12, // 卡片大圆角
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
}}
|
|
34
|
-
>
|
|
35
|
-
<RouterProvider router={router} />
|
|
36
|
-
</ConfigProvider>
|
|
37
|
-
</ErrorBoundary>,
|
|
38
|
-
);
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { create } from 'zustand';
|
|
2
|
-
|
|
3
|
-
// 1. 定义状态接口
|
|
4
|
-
interface CounterState {
|
|
5
|
-
count: number;
|
|
6
|
-
increment: () => void;
|
|
7
|
-
decrement: () => void;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* 全局计数器状态 (Zustand Store)
|
|
12
|
-
* 这是一个简单的状态管理示例,演示如何使用 Zustand
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* // 在组件中使用
|
|
16
|
-
* const { count, increment } = useCounterStore()
|
|
17
|
-
*/
|
|
18
|
-
export const useCounterStore = create<CounterState>()((set) => ({
|
|
19
|
-
// 初始状态
|
|
20
|
-
count: 0,
|
|
21
|
-
// 修改状态的方法 (Action)
|
|
22
|
-
increment: () => set((state) => ({ count: state.count + 1 })),
|
|
23
|
-
decrement: () => set((state) => ({ count: state.count - 1 })),
|
|
24
|
-
}));
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|