zant-admin 1.0.1 → 2.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 (67) hide show
  1. package/LICENSE +21 -0
  2. package/README.en.md +414 -25
  3. package/README.md +426 -277
  4. package/bin/cli.js +99 -99
  5. package/bin/generator.js +502 -502
  6. package/bin/prompts.js +158 -158
  7. package/bin/utils.js +133 -133
  8. package/package.json +3 -3
  9. package/public/logo.png +0 -0
  10. package/src/App.vue +1 -1
  11. package/src/api/methods/sysAccount.js +0 -1
  12. package/src/api/methods/sysDictItem.js +3 -3
  13. package/src/api/methods/system.js +10 -11
  14. package/src/api/request.js +39 -39
  15. package/src/assets/css/style.css +0 -11
  16. package/src/assets/css/zcui.css +1002 -319
  17. package/src/assets/imgs/logo.png +0 -0
  18. package/src/assets/imgs/md/console.png +0 -0
  19. package/src/assets/imgs/md/login.png +0 -0
  20. package/src/assets/imgs/md/menu.png +0 -0
  21. package/src/assets/imgs/md/serviceMonitoring.png +0 -0
  22. package/src/assets/imgs/md/statistics.png +0 -0
  23. package/src/components/FormTable.vue +50 -37
  24. package/src/components/IconPicker.vue +351 -344
  25. package/src/components/MainPage.vue +220 -339
  26. package/src/components/edit/QuartzEdit.vue +1 -1
  27. package/src/components/edit/SysAccountEdit.vue +15 -8
  28. package/src/components/edit/SysDictEdit.vue +6 -4
  29. package/src/components/edit/SysDictItemEdit.vue +8 -6
  30. package/src/components/edit/SysRoleEdit.vue +5 -3
  31. package/src/components/edit/sysMenuEdit.vue +10 -25
  32. package/src/config/index.js +74 -74
  33. package/src/directives/permission.js +49 -45
  34. package/src/main.js +2 -3
  35. package/src/router/index.js +48 -30
  36. package/src/stores/config.js +7 -1
  37. package/src/stores/menu.js +32 -8
  38. package/src/stores/user.js +17 -17
  39. package/src/utils/regionUtils.js +20 -16
  40. package/src/utils/useFormCRUD.js +59 -60
  41. package/src/views/baiscstatis/center.vue +53 -42
  42. package/src/views/baiscstatis/iframePage.vue +9 -11
  43. package/src/views/console.vue +92 -42
  44. package/src/views/demo/button.vue +269 -0
  45. package/src/views/demo/importexport.vue +8 -12
  46. package/src/views/demo/region.vue +103 -21
  47. package/src/views/demo/statistics.vue +38 -19
  48. package/src/views/home.vue +2 -3
  49. package/src/views/login.vue +254 -149
  50. package/src/views/operations/log/logQuartz.vue +0 -1
  51. package/src/views/operations/quartz.vue +22 -24
  52. package/src/views/system/sysAccount.vue +16 -11
  53. package/src/views/system/sysDict.vue +9 -6
  54. package/src/views/system/sysMenu.vue +17 -15
  55. package/src/views/system/sysRole.vue +44 -21
  56. package/SCAFFOLD_README.md +0 -215
  57. package/src/assets/imgs/md/1.png +0 -0
  58. package/src/assets/imgs/md/10.png +0 -0
  59. package/src/assets/imgs/md/11.png +0 -0
  60. package/src/assets/imgs/md/2.png +0 -0
  61. package/src/assets/imgs/md/3.png +0 -0
  62. package/src/assets/imgs/md/4.png +0 -0
  63. package/src/assets/imgs/md/5.png +0 -0
  64. package/src/assets/imgs/md/6.png +0 -0
  65. package/src/assets/imgs/md/7.png +0 -0
  66. package/src/assets/imgs/md/8.png +0 -0
  67. package/src/assets/imgs/md/9.png +0 -0
package/bin/cli.js CHANGED
@@ -1,99 +1,99 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * ZAnt Admin 脚手架 CLI 工具
5
- * 基于 Vue 3 + Vite + Ant Design Vue 的前端管理系统脚手架
6
- */
7
-
8
- import { Command } from 'commander';
9
- import { createProject } from './generator.js';
10
- import { checkNodeVersion } from './utils.js';
11
- import { collectProjectConfig, askSkipInstall } from './prompts.js';
12
-
13
- const program = new Command();
14
-
15
- // 设置程序信息
16
- program
17
- .name('zant-admin')
18
- .description('基于 Vue 3 + Vite + Ant Design Vue 的前端管理系统脚手架')
19
- .version('1.0.0');
20
-
21
- // 创建项目命令
22
- program
23
- .command('create <project-name>')
24
- .description('创建一个新的 ZAnt Admin 项目')
25
- .option('-t, --template <template>', '选择项目模板', 'default')
26
- .option('-d, --description <description>', '项目描述', '基于 Vue 3 + Vite + Ant Design Vue 的前端管理系统')
27
- .option('-a, --author <author>', '作者名称', '')
28
- .option('--skip-install', '跳过依赖安装')
29
- .option('--no-interactive', '禁用交互式模式')
30
- .action(async (projectName, options) => {
31
- try {
32
- // 检查 Node.js 版本
33
- checkNodeVersion();
34
-
35
- let finalOptions = { ...options };
36
-
37
- // 交互式模式
38
- if (options.interactive) {
39
- console.log(`🚀 开始创建项目: ${projectName}`);
40
- const config = await collectProjectConfig(projectName);
41
-
42
- finalOptions = {
43
- ...finalOptions,
44
- template: config.template,
45
- description: config.description,
46
- author: config.author,
47
- features: config.features
48
- };
49
-
50
- // 询问是否跳过依赖安装
51
- if (!finalOptions.skipInstall) {
52
- finalOptions.skipInstall = await askSkipInstall();
53
- }
54
- } else {
55
- console.log(`🚀 开始创建项目: ${projectName}`);
56
- console.log('📋 项目配置:');
57
- console.log(` 模板: ${options.template}`);
58
- console.log(` 描述: ${options.description}`);
59
- console.log(` 作者: ${options.author || '未指定'}`);
60
- }
61
-
62
- // 创建项目
63
- await createProject(projectName, finalOptions);
64
-
65
- console.log('✅ 项目创建成功!');
66
- console.log('📁 项目目录结构已生成');
67
-
68
- if (!finalOptions.skipInstall) {
69
- console.log('📦 正在安装依赖...');
70
- }
71
-
72
- console.log('\n🎉 接下来您可以:');
73
- console.log(` cd ${projectName}`);
74
- if (!finalOptions.skipInstall) {
75
- console.log(' npm run dev');
76
- } else {
77
- console.log(' npm install');
78
- console.log(' npm run dev');
79
- }
80
-
81
- } catch (error) {
82
- console.error('❌ 项目创建失败:', error.message);
83
- process.exit(1);
84
- }
85
- });
86
-
87
- // 显示模板列表命令
88
- program
89
- .command('list-templates')
90
- .description('显示可用的项目模板')
91
- .action(() => {
92
- console.log('📋 可用模板:');
93
- console.log(' default - 默认模板 (Vue 3 + Vite + Ant Design Vue)');
94
- console.log(' basic - 基础模板 (仅包含核心功能)');
95
- console.log(' full - 完整模板 (包含所有示例页面)');
96
- });
97
-
98
- // 解析命令行参数
99
- program.parse();
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * ZAnt Admin 脚手架 CLI 工具
5
+ * 基于 Vue 3 + Vite + Ant Design Vue 的前端管理系统脚手架
6
+ */
7
+
8
+ import { Command } from 'commander';
9
+ import { createProject } from './generator.js';
10
+ import { checkNodeVersion } from './utils.js';
11
+ import { collectProjectConfig, askSkipInstall } from './prompts.js';
12
+
13
+ const program = new Command();
14
+
15
+ // 设置程序信息
16
+ program
17
+ .name('zant-admin')
18
+ .description('基于 Vue 3.5 + Vite + Ant Design Vue 的前端管理系统脚手架')
19
+ .version('2.0.0');
20
+
21
+ // 创建项目命令
22
+ program
23
+ .command('create <project-name>')
24
+ .description('创建一个新的 ZAnt Admin 项目')
25
+ .option('-t, --template <template>', '选择项目模板', 'default')
26
+ .option('-d, --description <description>', '项目描述', '基于 Vue 3.5 + Vite + Ant Design Vue 的前端管理系统')
27
+ .option('-a, --author <author>', '作者名称', '')
28
+ .option('--skip-install', '跳过依赖安装')
29
+ .option('--no-interactive', '禁用交互式模式')
30
+ .action(async (projectName, options) => {
31
+ try {
32
+ // 检查 Node.js 版本
33
+ checkNodeVersion();
34
+
35
+ let finalOptions = { ...options };
36
+
37
+ // 交互式模式
38
+ if (options.interactive) {
39
+ console.log(`🚀 开始创建项目: ${projectName}`);
40
+ const config = await collectProjectConfig(projectName);
41
+
42
+ finalOptions = {
43
+ ...finalOptions,
44
+ template: config.template,
45
+ description: config.description,
46
+ author: config.author,
47
+ features: config.features
48
+ };
49
+
50
+ // 询问是否跳过依赖安装
51
+ if (!finalOptions.skipInstall) {
52
+ finalOptions.skipInstall = await askSkipInstall();
53
+ }
54
+ } else {
55
+ console.log(`🚀 开始创建项目: ${projectName}`);
56
+ console.log('📋 项目配置:');
57
+ console.log(` 模板: ${options.template}`);
58
+ console.log(` 描述: ${options.description}`);
59
+ console.log(` 作者: ${options.author || '未指定'}`);
60
+ }
61
+
62
+ // 创建项目
63
+ await createProject(projectName, finalOptions);
64
+
65
+ console.log('✅ 项目创建成功!');
66
+ console.log('📁 项目目录结构已生成');
67
+
68
+ if (!finalOptions.skipInstall) {
69
+ console.log('📦 正在安装依赖...');
70
+ }
71
+
72
+ console.log('\n🎉 接下来您可以:');
73
+ console.log(` cd ${projectName}`);
74
+ if (!finalOptions.skipInstall) {
75
+ console.log(' npm run dev');
76
+ } else {
77
+ console.log(' npm install');
78
+ console.log(' npm run dev');
79
+ }
80
+
81
+ } catch (error) {
82
+ console.error('❌ 项目创建失败:', error.message);
83
+ process.exit(1);
84
+ }
85
+ });
86
+
87
+ // 显示模板列表命令
88
+ program
89
+ .command('list-templates')
90
+ .description('显示可用的项目模板')
91
+ .action(() => {
92
+ console.log('📋 可用模板:');
93
+ console.log(' default - 默认模板 (Vue 3 + Vite + Ant Design Vue)');
94
+ console.log(' basic - 基础模板 (仅包含核心功能)');
95
+ console.log(' full - 完整模板 (包含所有示例页面)');
96
+ });
97
+
98
+ // 解析命令行参数
99
+ program.parse();