create-tengits-app 1.0.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 (53) hide show
  1. package/PUBLISH.md +151 -0
  2. package/README.md +255 -0
  3. package/USAGE.md +154 -0
  4. package/bin/cli.js +195 -0
  5. package/eslint.config.mjs +33 -0
  6. package/global.d.ts +9 -0
  7. package/package.json +67 -0
  8. package/packages/main/.env +24 -0
  9. package/packages/main/.env.pre +3 -0
  10. package/packages/main/.env.test +4 -0
  11. package/packages/main/.eslintrc +9 -0
  12. package/packages/main/README.md +18 -0
  13. package/packages/main/dist/manifest.json +40 -0
  14. package/packages/main/index.html +80 -0
  15. package/packages/main/index.ts +12 -0
  16. package/packages/main/package.json +43 -0
  17. package/packages/main/postcss.config.js +7 -0
  18. package/packages/main/public/antd.dark.css +26419 -0
  19. package/packages/main/public/dark.css +32 -0
  20. package/packages/main/public/evaluation-template.csv +10 -0
  21. package/packages/main/rsbuild.config.ts +79 -0
  22. package/packages/main/src/App.tsx +108 -0
  23. package/packages/main/src/configSystemData.ts +27 -0
  24. package/packages/main/src/i18n.js +140 -0
  25. package/packages/main/src/index.jsx +22 -0
  26. package/packages/main/src/index.less +250 -0
  27. package/packages/main/src/menus.jsx +123 -0
  28. package/packages/main/src/pages/Home/index.tsx +102 -0
  29. package/packages/main/src/pages/Login/common.ts +26 -0
  30. package/packages/main/src/pages/Login/index.less +15 -0
  31. package/packages/main/src/pages/Login/index.tsx +238 -0
  32. package/packages/main/src/routes.tsx +75 -0
  33. package/packages/main/src/styles/index.css +38 -0
  34. package/packages/main/src/types/less.d.ts +4 -0
  35. package/packages/main/src/types/tengitsui.d.ts +7 -0
  36. package/packages/main/src/types/utils.d.ts +39 -0
  37. package/packages/main/src/utils/checkPermission.js +19 -0
  38. package/packages/main/src/utils/day.js +18 -0
  39. package/packages/main/src/utils/download.js +30 -0
  40. package/packages/main/src/utils/fileUtils.ts +45 -0
  41. package/packages/main/src/utils/guid.js +6 -0
  42. package/packages/main/src/utils/gzip.js +26 -0
  43. package/packages/main/src/utils/importFile.js +51 -0
  44. package/packages/main/src/utils/index.ts +9 -0
  45. package/packages/main/src/utils/request.js +40 -0
  46. package/packages/main/src/utils/uploadFileToCloud.js +102 -0
  47. package/packages/main/src/utils/utils.ts +331 -0
  48. package/packages/main/src/utils/uuid.js +13 -0
  49. package/packages/main/src/utils/version.js +158 -0
  50. package/packages/main/tailwind.config.js +27 -0
  51. package/packages/main/tsconfig.json +6 -0
  52. package/pnpm-workspace.yaml +16 -0
  53. package/tsconfig.json +23 -0
package/bin/cli.js ADDED
@@ -0,0 +1,195 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Tengits 前端脚手架 CLI
5
+ * 快速创建基于 React + Rsbuild + TypeScript + Tailwind CSS + Antd 的现代前端项目
6
+ */
7
+
8
+ const fs = require('fs-extra');
9
+ const path = require('path');
10
+ const { execSync } = require('child_process');
11
+ const readline = require('readline');
12
+
13
+ /**
14
+ * 获取用户输入
15
+ * @param {string} question 问题
16
+ * @returns {Promise<string>} 用户输入
17
+ */
18
+ const getUserInput = (question) => {
19
+ const rl = readline.createInterface({
20
+ input: process.stdin,
21
+ output: process.stdout
22
+ });
23
+
24
+ return new Promise((resolve) => {
25
+ rl.question(question, (answer) => {
26
+ rl.close();
27
+ resolve(answer.trim());
28
+ });
29
+ });
30
+ };
31
+
32
+ /**
33
+ * 创建项目
34
+ */
35
+ const createProject = async () => {
36
+ console.log('🚀 欢迎使用 Tengits 前端脚手架!');
37
+ console.log('');
38
+
39
+ // 获取项目名称
40
+ const projectName = await getUserInput('请输入项目名称(默认: my-react-app): ') || 'my-react-app';
41
+
42
+ const targetDir = path.resolve(process.cwd(), projectName);
43
+
44
+ // 检查目录是否存在
45
+ if (fs.existsSync(targetDir)) {
46
+ console.log(`❌ 目录 ${projectName} 已经存在!`);
47
+ process.exit(1);
48
+ }
49
+
50
+ console.log(`\n📁 正在创建项目: ${projectName}`);
51
+ console.log(`📍 目标目录: ${targetDir}`);
52
+
53
+ try {
54
+ // 创建目标目录
55
+ fs.ensureDirSync(targetDir);
56
+
57
+ // 获取模板目录(脚手架包的根目录)
58
+ const templateDir = path.resolve(__dirname, '..');
59
+
60
+ // 需要排除的文件和目录
61
+ const excludeList = [
62
+ 'node_modules',
63
+ '.git',
64
+ 'bin',
65
+ 'pnpm-lock.yaml',
66
+ '.DS_Store',
67
+ 'yarn.lock',
68
+ 'package-lock.json'
69
+ ];
70
+
71
+ // 复制模板文件
72
+ console.log('📋 正在复制模板文件...');
73
+
74
+ const copyRecursive = (src, dest) => {
75
+ const stats = fs.statSync(src);
76
+
77
+ if (stats.isDirectory()) {
78
+ const dirName = path.basename(src);
79
+ if (excludeList.includes(dirName)) {
80
+ return;
81
+ }
82
+
83
+ fs.ensureDirSync(dest);
84
+ const files = fs.readdirSync(src);
85
+
86
+ files.forEach(file => {
87
+ if (!excludeList.includes(file)) {
88
+ copyRecursive(path.join(src, file), path.join(dest, file));
89
+ }
90
+ });
91
+ } else {
92
+ fs.copyFileSync(src, dest);
93
+ }
94
+ };
95
+
96
+ // 复制所有文件
97
+ const templateFiles = fs.readdirSync(templateDir);
98
+ templateFiles.forEach(file => {
99
+ if (!excludeList.includes(file)) {
100
+ const srcPath = path.join(templateDir, file);
101
+ const destPath = path.join(targetDir, file);
102
+ copyRecursive(srcPath, destPath);
103
+ }
104
+ });
105
+
106
+ // 更新 package.json
107
+ console.log('⚙️ 正在配置 package.json...');
108
+ const packageJsonPath = path.join(targetDir, 'package.json');
109
+ const packageJson = fs.readJsonSync(packageJsonPath);
110
+
111
+ // 更新项目基本信息
112
+ packageJson.name = projectName;
113
+ packageJson.description = `基于 Tengits 技术栈的现代前端项目 - ${projectName}`;
114
+ packageJson.version = '0.1.0';
115
+ packageJson.author = '';
116
+
117
+ // 移除脚手架相关的配置
118
+ delete packageJson.bin;
119
+
120
+ fs.writeJsonSync(packageJsonPath, packageJson, { spaces: 2 });
121
+
122
+ // 更新子包的 package.json
123
+ const mainPackageJsonPath = path.join(targetDir, 'packages/main/package.json');
124
+ if (fs.existsSync(mainPackageJsonPath)) {
125
+ const mainPackageJson = fs.readJsonSync(mainPackageJsonPath);
126
+ mainPackageJson.name = `${projectName}-app`;
127
+ fs.writeJsonSync(mainPackageJsonPath, mainPackageJson, { spaces: 2 });
128
+ }
129
+
130
+ console.log('📦 正在安装依赖...');
131
+
132
+ // 切换到项目目录并安装依赖
133
+ process.chdir(targetDir);
134
+
135
+ try {
136
+ // 尝试使用 pnpm
137
+ execSync('pnpm --version', { stdio: 'ignore' });
138
+ console.log('使用 pnpm 安装依赖...');
139
+ execSync('pnpm install', { stdio: 'inherit' });
140
+ } catch (error) {
141
+ try {
142
+ // 如果没有 pnpm,尝试使用 yarn
143
+ execSync('yarn --version', { stdio: 'ignore' });
144
+ console.log('使用 yarn 安装依赖...');
145
+ execSync('yarn install', { stdio: 'inherit' });
146
+ } catch (error) {
147
+ // 如果都没有,使用 npm
148
+ console.log('使用 npm 安装依赖...');
149
+ execSync('npm install', { stdio: 'inherit' });
150
+ }
151
+ }
152
+
153
+ console.log('\n✅ 项目创建成功!');
154
+ console.log('\n🎉 接下来可以运行以下命令:');
155
+ console.log(`\n cd ${projectName}`);
156
+
157
+ // 根据使用的包管理器给出启动命令
158
+ if (fs.existsSync('pnpm-lock.yaml')) {
159
+ console.log(' pnpm start # 启动开发服务器');
160
+ console.log(' pnpm build # 构建生产版本');
161
+ } else if (fs.existsSync('yarn.lock')) {
162
+ console.log(' yarn start # 启动开发服务器');
163
+ console.log(' yarn build # 构建生产版本');
164
+ } else {
165
+ console.log(' npm start # 启动开发服务器');
166
+ console.log(' npm run build # 构建生产版本');
167
+ }
168
+
169
+ console.log('\n📚 项目特性:');
170
+ console.log(' ⚡ Rsbuild - 快速构建工具');
171
+ console.log(' ⚛️ React 18 - 现代 React 开发');
172
+ console.log(' 🔷 TypeScript - 类型安全');
173
+ console.log(' 🎨 Tailwind CSS - 实用优先的 CSS 框架');
174
+ console.log(' 🐜 Ant Design - 企业级 UI 组件库');
175
+ console.log(' 🌍 国际化支持 - 多语言');
176
+ console.log(' 📱 响应式设计');
177
+ console.log('\n开始你的开发之旅吧! 🚀');
178
+
179
+ } catch (error) {
180
+ console.error('\n❌ 创建项目时发生错误:', error.message);
181
+
182
+ // 清理失败的目录
183
+ if (fs.existsSync(targetDir)) {
184
+ fs.removeSync(targetDir);
185
+ }
186
+
187
+ process.exit(1);
188
+ }
189
+ };
190
+
191
+ // 运行脚手架
192
+ createProject().catch(error => {
193
+ console.error('❌ 发生未预期的错误:', error);
194
+ process.exit(1);
195
+ });
@@ -0,0 +1,33 @@
1
+ import antfu from '@antfu/eslint-config'
2
+
3
+ export default antfu(
4
+ {
5
+ react: true, // 启用 react
6
+ typescript: true, // 启用 ts
7
+ ignores: ['public', 'dist'], // 忽略 public/dist 目录
8
+ stylistic: {
9
+ semi: true, // 保留分号
10
+ },
11
+ formatters: {
12
+ css: true,
13
+ html: true,
14
+ markdown: 'prettier',
15
+ },
16
+ },
17
+ {
18
+ rules: {
19
+ 'no-extend-native': 0,
20
+ 'no-useless-return': 0,
21
+ 'no-undef': 2,
22
+ 'no-console': 0, // 允许写 console.log
23
+ 'unused-imports/no-unused-vars': 0, // 解构未使用
24
+ 'jsdoc/check-param-names': [1, { checkDestructured: false }], // 是否检查解构属性
25
+ // 'no-unused-vars': 1, // 未使用变量 警告
26
+ 'antfu/top-level-function': 0,
27
+ // 未使用变量 警告
28
+ 'ts/no-unused-vars': ['warn', {
29
+ argsIgnorePattern: '^_',
30
+ }],
31
+ },
32
+ },
33
+ )
package/global.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ export {};
2
+ declare global {
3
+ interface Window {
4
+ /**
5
+ * bi 的 editor 示例,但用于 report
6
+ */
7
+ biEditorForReport?: any;
8
+ }
9
+ }
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "create-tengits-app",
3
+ "version": "1.0.0",
4
+ "description": "🚀 快速创建基于 React + Rsbuild + TypeScript + Tailwind CSS + Antd 的现代前端项目脚手架",
5
+ "author": "",
6
+ "license": "MIT",
7
+ "keywords": [
8
+ "react",
9
+ "rsbuild",
10
+ "typescript",
11
+ "tailwindcss",
12
+ "antd",
13
+ "scaffold",
14
+ "cli",
15
+ "template",
16
+ "frontend",
17
+ "boilerplate"
18
+ ],
19
+ "bin": {
20
+ "create-tengits-app": "./bin/cli.js"
21
+ },
22
+ "exports": {
23
+ "./*": {
24
+ "import": {
25
+ "default": "./packages/*/index.ts"
26
+ }
27
+ }
28
+ },
29
+ "main": "index.js",
30
+ "files": [
31
+ "bin",
32
+ "packages",
33
+ "*.json",
34
+ "*.yaml",
35
+ "*.md",
36
+ "*.mjs",
37
+ "*.d.ts"
38
+ ],
39
+ "scripts": {
40
+ "start": "pnpm --filter main start",
41
+ "build": "pnpm --filter main build",
42
+ "preview": "pnpm --filter main preview",
43
+ "doctor": "pnpm --filter main doctor",
44
+ "install-all": "pnpm install",
45
+ "test-cli": "node bin/cli.js"
46
+ },
47
+ "dependencies": {
48
+ "fs-extra": "^11.2.0",
49
+ "i18next": "^25.0.2",
50
+ "i18next-http-backend": "^3.0.2",
51
+ "react-i18next": "^15.5.1"
52
+ },
53
+ "devDependencies": {
54
+ "@types/fs-extra": "^11.0.4"
55
+ },
56
+ "engines": {
57
+ "node": ">=16.0.0"
58
+ },
59
+ "repository": {
60
+ "type": "git",
61
+ "url": "https://github.com/your-username/create-tengits-app.git"
62
+ },
63
+ "bugs": {
64
+ "url": "https://github.com/your-username/create-tengits-app/issues"
65
+ },
66
+ "homepage": "https://github.com/your-username/create-tengits-app#readme"
67
+ }
@@ -0,0 +1,24 @@
1
+ VITE_TITLE="AI"
2
+ VITE_SYSTEM_NAME="AI"
3
+ VITE_TENCENT_COS_APPID="1255466169"
4
+ VITE_TENCENT_COS_BUCKET="ttos-test-1255466169"
5
+ VITE_TENCENT_COS_REGION=ap-guangzhou
6
+ VITE_TENCENT_COS_APPID_TEST="1255466169"
7
+ VITE_TENCENT_COS_BUCKET_TEST="ttos-test-1255466169"
8
+ VITE_SYSTEM_ID=100
9
+ VITE_TCAPTCHE_APPID=2023363327
10
+ VITE_SYSTEM_CODE="AI"
11
+ SKIP_PREFLIGHT_CHECK=true
12
+ VITE_SYSTEM_VERSION='3.0.0'
13
+
14
+ # bisheng
15
+ # VITE_BISHENG_INDEPENDENCE = false
16
+ VITE_BISHENG_TENCENT_COS_BUCKET="tlai-1255466169"
17
+
18
+ VITE_AI_APPLICATIONID = 1344658626716544
19
+ VITE_REACT_APP_HOST='http://106.52.205.159:19001'
20
+
21
+ VITE_LOGIN_BG='https://static-1255466169.cos.ap-guangzhou.myqcloud.com/sys/fee/system-bg.png'
22
+ VITE_LGOIN_TITLE_BG='https://static-1255466169.cos.ap-guangzhou.myqcloud.com/sys/fee/system-name.png'
23
+ VITE_SYSTEM_LOGO='https://static-1255466169.cos.ap-guangzhou.myqcloud.com/ai/tenglu_logo_en.svg'
24
+ VITE_SHRINK_LOGO='https://static-1255466169.cos.ap-guangzhou.myqcloud.com/assets/logo/logo_shrink.png'
@@ -0,0 +1,3 @@
1
+ VITE_TCAPTCHE_APPID=2023363327
2
+ VITE_SHEET_VERSION='0.16.1'
3
+ VITE_REACT_APP_HOST='https://tlai.tengits.com'
@@ -0,0 +1,4 @@
1
+ REACT_APP_TCAPTCHE_APPID=2053107556
2
+ REACT_APP_SHEET_VERSION='0.16.1'
3
+ REACT_APP_PRE_BETA='1'
4
+ VITE_REACT_APP_HOST=http://106.52.205.159:19001
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "@antfu",
3
+ "rules": {
4
+ "no-undef": "off",
5
+ "no-restricted-globals": "off",
6
+ "no-unused-vars": "off",
7
+ "camelcase": 0
8
+ }
9
+ }
@@ -0,0 +1,18 @@
1
+ # AI Package
2
+
3
+ ## External Dependencies
4
+
5
+ The following external CDN dependencies are required:
6
+
7
+ ```
8
+ https://cdn.bootcdn.net/ajax/libs/react/16.8.6/umd/react.development.js
9
+ https://cdn.bootcdn.net/ajax/libs/react-dom/16.8.6/umd/react-dom.development.js
10
+ ```
11
+
12
+ ## Installation
13
+
14
+ 1. First, install the global dependencies:
15
+
16
+ ```bash
17
+ pnpm link -g
18
+ ```
@@ -0,0 +1,40 @@
1
+ {
2
+ "allFiles": [
3
+ "/static/js/async/node_modules_pnpm_cross-fetch_4_0_0_node_modules_cross-fetch_dist_browser-ponyfill_js_lazy-co-6570d5.js",
4
+ "/static/js/lib-react.js",
5
+ "/static/js/vendors-node_modules_pnpm_rsbuild_core_1_4_7_node_modules_rsbuild_core_dist_client_overlay_js-3e6b0e.js",
6
+ "/static/js/index.js",
7
+ "/index.html",
8
+ "/static/js/async/node_modules_pnpm_cross-fetch_4_0_0_node_modules_cross-fetch_dist_browser-ponyfill_js_lazy-co-6570d5.js.map",
9
+ "/static/js/lib-react.js.map",
10
+ "/static/js/vendors-node_modules_pnpm_rsbuild_core_1_4_7_node_modules_rsbuild_core_dist_client_overlay_js-3e6b0e.js.map",
11
+ "/static/js/index.js.map",
12
+ "/index.d738b7548a5654e6.hot-update.js.map"
13
+ ],
14
+ "entries": {
15
+ "index": {
16
+ "assets": [
17
+ "static/js/index.js.map",
18
+ "index.d738b7548a5654e6.hot-update.js.map",
19
+ "static/js/vendors-node_modules_pnpm_rsbuild_core_1_4_7_node_modules_rsbuild_core_dist_client_overlay_js-3e6b0e.js.map",
20
+ "static/js/lib-react.js.map",
21
+ "static/js/async/node_modules_pnpm_cross-fetch_4_0_0_node_modules_cross-fetch_dist_browser-ponyfill_js_lazy-co-6570d5.js.map"
22
+ ],
23
+ "html": [
24
+ "/index.html"
25
+ ],
26
+ "initial": {
27
+ "js": [
28
+ "/static/js/index.js",
29
+ "/static/js/vendors-node_modules_pnpm_rsbuild_core_1_4_7_node_modules_rsbuild_core_dist_client_overlay_js-3e6b0e.js",
30
+ "/static/js/lib-react.js"
31
+ ]
32
+ },
33
+ "async": {
34
+ "js": [
35
+ "/static/js/async/node_modules_pnpm_cross-fetch_4_0_0_node_modules_cross-fetch_dist_browser-ponyfill_js_lazy-co-6570d5.js"
36
+ ]
37
+ }
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,80 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
6
+ <meta name="theme-color" content="#000000" />
7
+ <title><%= VITE_SYSTEM_NAME %></title>
8
+ <link rel="icon" href="/logo-<%= VITE_SYSTEM_ID %>.png" type="image/x-icon" />
9
+ <link href="https://static-1255466169.cos.ap-guangzhou.myqcloud.com/tui5/1.1.4/index.css" rel="stylesheet" />
10
+ <link href="https://static-1255466169.cos.ap-guangzhou.myqcloud.com/antd/5.25.3/reset.css" rel="stylesheet" />
11
+ <link
12
+ rel="stylesheet"
13
+ href="https://static-1255466169.cos.ap-guangzhou.myqcloud.com/bi/assets/SourceHanSansCN-Regular.otf"
14
+ />
15
+ </head>
16
+
17
+ <body>
18
+ <main id="container"></main>
19
+ <div
20
+ id="zoomModal"
21
+ style="
22
+ display: none;
23
+ width: 1400px;
24
+ height: 800px;
25
+ position: absolute;
26
+ top: 50%;
27
+ background: #fff;
28
+ left: 50%;
29
+ transform: translate(-50%, -50%);
30
+ padding: 48px;
31
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
32
+ "
33
+ >
34
+ <div id="zoomChart" style="width: 1304px; height: 704px"></div>
35
+ </div>
36
+
37
+ <!-- react 版本 16.14.0 18.2.0 -->
38
+ <script
39
+ type="text/javascript"
40
+ src="https://static-1255466169.cos.ap-guangzhou.myqcloud.com/react/18.2.0/react.<%= PROD ? 'production.min' : 'development' %>.js"
41
+ ></script>
42
+ <script>
43
+ window.React.default = window.React;
44
+ </script>
45
+ <script
46
+ type="text/javascript"
47
+ src="https://static-1255466169.cos.ap-guangzhou.myqcloud.com/react-dom/18.2.0/react-dom.<%= PROD ? 'production.min' : 'development' %>.js"
48
+ ></script>
49
+ <script
50
+ type="text/javascript"
51
+ src="https://static-1255466169.cos.ap-guangzhou.myqcloud.com/react-router-dom/6.23.1/router.umd.min.js"
52
+ ></script>
53
+ <script
54
+ type="text/javascript"
55
+ src="https://static-1255466169.cos.ap-guangzhou.myqcloud.com/react-router-dom/6.23.1/react-router.production.min.js"
56
+ ></script>
57
+ <script
58
+ type="text/javascript"
59
+ src="https://static-1255466169.cos.ap-guangzhou.myqcloud.com/react-router-dom/6.23.1/react-router-dom.production.min.js"
60
+ ></script>
61
+ <script src="https://static-1255466169.cos.ap-guangzhou.myqcloud.com/assets/echarts/5.3.2/echarts.min.js"></script>
62
+ <script src="https://static-1255466169.cos.ap-guangzhou.myqcloud.com/assets/echarts/echarts-gl.min.js"></script>
63
+ <script src="https://static-1255466169.cos.ap-guangzhou.myqcloud.com/assets/jspdf/2.5.1/jspdf.umd.min.js"></script>
64
+ <script src="https://turing.captcha.qcloud.com/TCaptcha.js"></script>
65
+ <script src="https://static-1255466169.cos.ap-guangzhou.myqcloud.com/assets/tween/tween.umd.min.js"></script>
66
+ <script src="https://jjgtest-1300239480.cos.ap-nanjing.myqcloud.com/0c88e307-a1b1-d2e9-40b1-69b99707081c/dayjs.js"></script>
67
+ <script src="https://jjgtest-1300239480.cos.ap-nanjing.myqcloud.com/95ed4e68-12d9-35cf-e195-7be69df0efcc/locale.js"></script>
68
+ <script src="https://static-1255466169.cos.ap-guangzhou.myqcloud.com/cos-js-sdk-v5/1.8.7/cos-js-sdk-v5.min.js"></script>
69
+ <script src="https://static-1255466169.cos.ap-guangzhou.myqcloud.com/antd/5.25.3/antd-with-locales.min.js.js"></script>
70
+ <script src="https://static-1255466169.cos.ap-guangzhou.myqcloud.com/tui5/1.1.4/index.js"></script>
71
+ <script src="https://static-1255466169.cos.ap-guangzhou.myqcloud.com/assets/fonts/iconpark.js"></script>
72
+ <script src="https://static-1255466169.cos.ap-guangzhou.myqcloud.com/pako.min.js"></script>
73
+ <script src="https://static-1255466169.cos.ap-guangzhou.myqcloud.com/Grapick/index.js"></script>
74
+ <!-- AES加密 -->
75
+ <script src="https://static-1255466169.cos.ap-guangzhou.myqcloud.com/web-pc/crypto-js.js"></script>
76
+ <script>
77
+ dayjs.locale('zh-cn');
78
+ </script>
79
+ </body>
80
+ </html>
@@ -0,0 +1,12 @@
1
+ export { default as ChatInput } from './src/components/Chat/ChatInput';
2
+ export { default as ChatLayout } from './src/components/Chat/ChatLayout';
3
+ export { default as ChatMessage } from './src/components/Chat/ChatMessage';
4
+ export { default as ChatReportText } from './src/components/Chat/ChatReportText';
5
+ export * from './src/components/Chat/common';
6
+ export { default as OutLineMessage } from './src/components/Chat/OutLineMessage';
7
+ export * from './src/components/Chat/service';
8
+ export { default as DocMemberDrawer } from './src/components/DocMemberDrawer';
9
+ export * from './src/constants';
10
+ export { default as useKnowLedgeTreeList } from './src/hooks/useKnowLedgeTreeList';
11
+ export { default as UploadToKnowledgeBaseModal } from './src/pages/KnowledgeBase/components/UploadModal';
12
+ export { default as GuideInputForm } from './src/components/Chat/GuideInputForm';
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "main-app",
3
+ "type": "module",
4
+ "version": "1.0.1",
5
+ "sideEffects": false,
6
+ "main": "index.ts",
7
+ "scripts": {
8
+ "start": "rsbuild dev",
9
+ "start:test": "rsbuild dev --env-mode test --port 3013",
10
+ "start:pre": "rsbuild dev --env-mode pre --port 3013",
11
+ "build": "rsbuild build",
12
+ "build:test": "rsbuild build --env-mode test",
13
+ "build:pre": "rsbuild build --env-mode pre",
14
+ "preview": "rsbuild preview"
15
+ },
16
+ "dependencies": {
17
+ "antd": "^5.24.7",
18
+ "axios": "^1.7.9",
19
+ "react": "18",
20
+ "react-dom": "18",
21
+ "react-query": "3.39.3",
22
+ "react-router-dom": "^6.28.1",
23
+ "typescript": "^4.9.5"
24
+ },
25
+ "devDependencies": {
26
+ "@rsbuild/core": "catalog:",
27
+ "@rsbuild/plugin-react": "catalog:",
28
+ "@rsbuild/plugin-svgr": "catalog:",
29
+ "@types/jest": "^28.1.8",
30
+ "@types/node": "^18.19.70",
31
+ "@types/react": "^18.3.18",
32
+ "@types/react-dom": "^18.3.5",
33
+ "autoprefixer": "^10.4.21",
34
+ "postcss": "^8.5.3",
35
+ "tailwindcss": "^3.4.17"
36
+ },
37
+ "browserslist": [
38
+ ">0.2%",
39
+ "not dead",
40
+ "not ie <= 11",
41
+ "not op_mini all"
42
+ ]
43
+ }
@@ -0,0 +1,7 @@
1
+ export default {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {},
5
+ },
6
+ }
7
+