@agile-team/wl-skills-kit 2.11.1 → 2.11.3

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 (91) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +38 -21
  3. package/bin/wl-skills.js +27 -3
  4. package/files/.wl-skills/docs/jh-pagination.md +505 -505
  5. package/files/.wl-skills/docs/request.md +940 -940
  6. package/files/.wl-skills/docs/validate-exempt.md +113 -0
  7. package/files/.wl-skills/guides/architecture.md +1 -1
  8. package/files/.wl-skills/skills/_compat/headers/cursor-mdc.txt +1 -1
  9. package/files/.wl-skills/skills/_compat/headers/kiro.txt +1 -1
  10. package/files/.wl-skills/skills/_compat/headers/trae.txt +1 -1
  11. package/files/.wl-skills/skills/core/convention-audit/SKILL.md +3 -3
  12. package/files/.wl-skills/skills/core/spec-doc-parse/SKILL.md +332 -332
  13. package/files/.wl-skills/skills/core/spec-doc-parse/USAGE.md +97 -97
  14. package/files/.wl-skills/skills/sync/permission-sync/USAGE.md +107 -107
  15. package/files/.wl-skills/src/components/global/C_ParentView/index.vue +3 -3
  16. package/files/.wl-skills/src/components/global/C_RightToolbar/index.vue +157 -157
  17. package/files/.wl-skills/src/components/global/C_SvgIcon/index.vue +31 -31
  18. package/files/.wl-skills/src/components/global/C_SvgIcon/svgicon.js +10 -10
  19. package/files/.wl-skills/src/components/global/C_TagStatus/README.md +264 -264
  20. package/files/.wl-skills/src/components/global/C_TagStatus/config.ts +192 -192
  21. package/files/.wl-skills/src/components/global/C_TagStatus/index.vue +106 -106
  22. package/files/.wl-skills/src/components/global/C_TagStatus/types.ts +64 -64
  23. package/files/.wl-skills/src/components/global/C_Tree/README.md +153 -153
  24. package/files/.wl-skills/src/components/global/C_Tree/index.scss +42 -42
  25. package/files/.wl-skills/src/components/global/C_Tree/index.vue +78 -78
  26. package/files/.wl-skills/src/components/global/C_Tree/types.ts +59 -59
  27. package/files/.wl-skills/src/components/local/c_formModal/README.md +235 -235
  28. package/files/.wl-skills/src/components/local/c_formModal/data.ts +95 -95
  29. package/files/.wl-skills/src/components/local/c_formModal/index.scss +8 -8
  30. package/files/.wl-skills/src/components/local/c_formModal/index.vue +107 -107
  31. package/files/.wl-skills/src/components/local/c_formSections/data.ts +175 -175
  32. package/files/.wl-skills/src/components/local/c_formSections/index.scss +280 -280
  33. package/files/.wl-skills/src/components/local/c_formSections/index.vue +429 -429
  34. package/files/.wl-skills/src/components/local/c_listModal/data.ts +41 -41
  35. package/files/.wl-skills/src/components/local/c_listModal/index.vue +136 -136
  36. package/files/.wl-skills/src/components/local/c_spliterTitle/index.scss +25 -25
  37. package/files/.wl-skills/src/components/local/c_spliterTitle/index.vue +21 -21
  38. package/files/.wl-skills/src/components/remote/AGGrid/README.md +530 -530
  39. package/files/.wl-skills/src/components/remote/BaseForm/README.md +508 -508
  40. package/files/.wl-skills/src/components/remote/BaseQuery/README.md +865 -865
  41. package/files/.wl-skills/src/components/remote/BaseTable/README.md +941 -941
  42. package/files/.wl-skills/src/components/remote/BaseToolbar/README.md +496 -496
  43. package/files/.wl-skills/src/types/page.ts +24 -24
  44. package/files/.wl-skills/standards/04-coding-basics.md +39 -1
  45. package/files/.wl-skills/standards/09-typescript.md +26 -3
  46. package/files/.wl-skills/standards/12-base-table.md +56 -4
  47. package/files/.wl-skills/standards/13-platform-components.md +1 -0
  48. package/files/.wl-skills/standards/index.md +2 -2
  49. package/files/.wl-skills/templates/README.md +44 -44
  50. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/api.md +54 -54
  51. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/data.ts +346 -346
  52. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/index.scss +1 -1
  53. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/index.vue +28 -28
  54. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add-form/data.ts +115 -115
  55. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add-form/index.scss +44 -44
  56. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add-form/index.vue +43 -43
  57. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change/data.ts +338 -338
  58. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change/index.scss +1 -1
  59. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change/index.vue +28 -28
  60. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change-form/data.ts +115 -115
  61. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change-form/index.scss +44 -44
  62. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change-form/index.vue +43 -43
  63. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/api.md +88 -88
  64. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/data.ts +601 -601
  65. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/index.scss +1 -1
  66. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/index.vue +64 -64
  67. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/api.md +67 -67
  68. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/data.ts +286 -286
  69. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/index.scss +139 -139
  70. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/index.vue +318 -318
  71. package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/api.md +98 -98
  72. package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/data.ts +543 -543
  73. package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/index.scss +1 -1
  74. package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/index.vue +52 -52
  75. package/files/.wl-skills/templates/sale/demo/add-demo/data.ts +518 -518
  76. package/files/.wl-skills/templates/sale/demo/billet-flame-cut-plan/data.ts +524 -524
  77. package/files/.wl-skills/templates/sale/demo/billet-flame-cut-plan/index.scss +154 -154
  78. package/files/.wl-skills/templates/sale/demo/billet-flame-cut-plan/index.vue +117 -117
  79. package/files/.wl-skills/templates/sale/demo/domestic-trade-order/data.ts +308 -308
  80. package/files/.wl-skills/templates/sale/demo/domestic-trade-order/index.scss +99 -99
  81. package/files/.wl-skills/templates/sale/demo/domestic-trade-order/index.vue +77 -77
  82. package/files/.wl-skills/templates/sale/demo/heat-batch-return/data.ts +367 -367
  83. package/files/.wl-skills/templates/sale/demo/heat-batch-return/index.scss +100 -100
  84. package/files/.wl-skills/templates/sale/demo/heat-batch-return/index.vue +170 -170
  85. package/files/.wl-skills/templates/sale/demo/heat-batch-return/meltDialog.vue +320 -320
  86. package/files/.wl-skills/templates/sale/demo/metallurgical-spec/data.ts +824 -824
  87. package/lib/ast-rules.js +395 -12
  88. package/mcp/config.js +46 -46
  89. package/mcp/registry.js +6 -1
  90. package/mcp/tools/projectTools.js +9 -1
  91. package/package.json +2 -2
@@ -1,175 +1,175 @@
1
- /*
2
- * @Author: ChenYu ycyplus@gmail.com
3
- * @Date: 2026-01-01 13:30:00
4
- * @LastEditors: ChenYu ycyplus@gmail.com
5
- * @LastEditTime: 2026-01-01 13:30:00
6
- * @FilePath: \cx-ui-sale\src\components\local\c_formSections\data.ts
7
- * @Description: 表单区块组件 - 类型定义
8
- * Copyright (c) 2026 by CHENY, All Rights Reserved 😎.
9
- */
10
-
11
- import type { Component } from "vue";
12
-
13
- // ========== 类型定义 ==========
14
-
15
- /**
16
- * 字段配置接口
17
- * 定义表单字段的基本属性和行为
18
- */
19
- export interface FieldConfig {
20
- /** 字段属性名(对应 form 对象的 key) */
21
- prop: string;
22
- /** 字段标签 */
23
- label: string;
24
- /** 字段类型 */
25
- type?:
26
- | "input"
27
- | "select"
28
- | "textarea"
29
- | "date"
30
- | "datetime"
31
- | "number"
32
- | "custom";
33
- /** 栅格占据列数(1-24) */
34
- span?: number;
35
- /** 是否必填 */
36
- required?: boolean;
37
- /** 占位符文本 */
38
- placeholder?: string;
39
- /** 是否可清空(select) */
40
- clearable?: boolean;
41
- /** 下拉选项(select) */
42
- options?: Array<{ label: string; value: string | number }>;
43
- /** 文本域行数(textarea) */
44
- rows?: number;
45
- /** 最小值(number) */
46
- min?: number;
47
- /** 最大值(number) */
48
- max?: number;
49
- /** 数字精度(number) */
50
- precision?: number;
51
- /** 步长(number) */
52
- step?: number;
53
- }
54
-
55
- /**
56
- * 区块配置接口
57
- * 定义折叠面板区块的结构和行为
58
- */
59
- export interface SectionConfig {
60
- /** 折叠面板的 name 值(唯一标识) */
61
- name: string;
62
- /** 折叠面板 ID(用于锚点跳转) */
63
- id: string;
64
- /** 显示的标题 */
65
- title: string;
66
- /** 字段配置数组 */
67
- fieldsConfig: FieldConfig[];
68
- /** 显示条件函数(可选,返回 true 显示,false 隐藏) */
69
- visible?: () => boolean;
70
- /** 是否为特殊处理的区块(如特殊需求) */
71
- isSpecial?: boolean;
72
- }
73
-
74
- /**
75
- * 表单数据类型
76
- * 使用索引签名支持动态字段
77
- */
78
- export interface FormDataType {
79
- [key: string]: any;
80
- }
81
-
82
- /**
83
- * 楼层导航配置接口
84
- */
85
- export interface NavTabConfig {
86
- /** 标签名称(唯一标识) */
87
- name: string;
88
- /** 显示文本 */
89
- label: string;
90
- /** 关联的 section name(用于锚点跳转) */
91
- sectionName?: string | null;
92
- }
93
-
94
- /**
95
- * 顶部操作按钮配置接口
96
- */
97
- export interface HeaderAction {
98
- /** 按钮文本 */
99
- label: string;
100
- /** 按钮类型 */
101
- type?: "primary" | "success" | "warning" | "danger" | "info" | "text" | "";
102
- /** 图标名称(Element Plus Icon 组件或字符串) */
103
- icon?: string | Component;
104
- /** 点击事件回调 */
105
- onClick: () => void;
106
- /** 是否禁用 */
107
- disabled?: boolean;
108
- }
109
-
110
- /**
111
- * 布局选项配置接口
112
- */
113
- export interface LayoutOption {
114
- /** 列数 */
115
- columns: 2 | 3 | 4 | 5;
116
- /** 显示图标 */
117
- icon: string;
118
- /** 提示文本 */
119
- title: string;
120
- }
121
-
122
- // ========== 工具函数 ==========
123
-
124
- /**
125
- * 根据必填条件过滤字段配置
126
- * @param fields 原始字段配置数组
127
- * @param onlyRequired 是否只显示必填字段
128
- */
129
- export function filterFieldsByRequired(
130
- fields: FieldConfig[],
131
- onlyRequired: boolean
132
- ): FieldConfig[] {
133
- if (!onlyRequired) return fields;
134
- return fields.filter((field) => field.required);
135
- }
136
-
137
- /**
138
- * 判断区块是否有可显示的字段
139
- * @param fields 字段配置数组
140
- */
141
- export function hasSectionFields(fields: FieldConfig[]): boolean {
142
- return fields.length > 0;
143
- }
144
-
145
- /**
146
- * 生成默认表单数据
147
- * @param sections 区块配置数组
148
- */
149
- export function generateDefaultFormData(
150
- sections: SectionConfig[]
151
- ): FormDataType {
152
- const formData: FormDataType = {};
153
-
154
- sections.forEach((section) => {
155
- section.fieldsConfig.forEach((field) => {
156
- // 根据字段类型设置默认值
157
- switch (field.type) {
158
- case "number":
159
- formData[field.prop] = field.min || 0;
160
- break;
161
- case "select":
162
- formData[field.prop] = "";
163
- break;
164
- case "date":
165
- case "datetime":
166
- formData[field.prop] = null;
167
- break;
168
- default:
169
- formData[field.prop] = "";
170
- }
171
- });
172
- });
173
-
174
- return formData;
175
- }
1
+ /*
2
+ * @Author: ChenYu ycyplus@gmail.com
3
+ * @Date: 2026-01-01 13:30:00
4
+ * @LastEditors: ChenYu ycyplus@gmail.com
5
+ * @LastEditTime: 2026-01-01 13:30:00
6
+ * @FilePath: \cx-ui-sale\src\components\local\c_formSections\data.ts
7
+ * @Description: 表单区块组件 - 类型定义
8
+ * Copyright (c) 2026 by CHENY, All Rights Reserved 😎.
9
+ */
10
+
11
+ import type { Component } from "vue";
12
+
13
+ // ========== 类型定义 ==========
14
+
15
+ /**
16
+ * 字段配置接口
17
+ * 定义表单字段的基本属性和行为
18
+ */
19
+ export interface FieldConfig {
20
+ /** 字段属性名(对应 form 对象的 key) */
21
+ prop: string;
22
+ /** 字段标签 */
23
+ label: string;
24
+ /** 字段类型 */
25
+ type?:
26
+ | "input"
27
+ | "select"
28
+ | "textarea"
29
+ | "date"
30
+ | "datetime"
31
+ | "number"
32
+ | "custom";
33
+ /** 栅格占据列数(1-24) */
34
+ span?: number;
35
+ /** 是否必填 */
36
+ required?: boolean;
37
+ /** 占位符文本 */
38
+ placeholder?: string;
39
+ /** 是否可清空(select) */
40
+ clearable?: boolean;
41
+ /** 下拉选项(select) */
42
+ options?: Array<{ label: string; value: string | number }>;
43
+ /** 文本域行数(textarea) */
44
+ rows?: number;
45
+ /** 最小值(number) */
46
+ min?: number;
47
+ /** 最大值(number) */
48
+ max?: number;
49
+ /** 数字精度(number) */
50
+ precision?: number;
51
+ /** 步长(number) */
52
+ step?: number;
53
+ }
54
+
55
+ /**
56
+ * 区块配置接口
57
+ * 定义折叠面板区块的结构和行为
58
+ */
59
+ export interface SectionConfig {
60
+ /** 折叠面板的 name 值(唯一标识) */
61
+ name: string;
62
+ /** 折叠面板 ID(用于锚点跳转) */
63
+ id: string;
64
+ /** 显示的标题 */
65
+ title: string;
66
+ /** 字段配置数组 */
67
+ fieldsConfig: FieldConfig[];
68
+ /** 显示条件函数(可选,返回 true 显示,false 隐藏) */
69
+ visible?: () => boolean;
70
+ /** 是否为特殊处理的区块(如特殊需求) */
71
+ isSpecial?: boolean;
72
+ }
73
+
74
+ /**
75
+ * 表单数据类型
76
+ * 使用索引签名支持动态字段
77
+ */
78
+ export interface FormDataType {
79
+ [key: string]: any;
80
+ }
81
+
82
+ /**
83
+ * 楼层导航配置接口
84
+ */
85
+ export interface NavTabConfig {
86
+ /** 标签名称(唯一标识) */
87
+ name: string;
88
+ /** 显示文本 */
89
+ label: string;
90
+ /** 关联的 section name(用于锚点跳转) */
91
+ sectionName?: string | null;
92
+ }
93
+
94
+ /**
95
+ * 顶部操作按钮配置接口
96
+ */
97
+ export interface HeaderAction {
98
+ /** 按钮文本 */
99
+ label: string;
100
+ /** 按钮类型 */
101
+ type?: "primary" | "success" | "warning" | "danger" | "info" | "text" | "";
102
+ /** 图标名称(Element Plus Icon 组件或字符串) */
103
+ icon?: string | Component;
104
+ /** 点击事件回调 */
105
+ onClick: () => void;
106
+ /** 是否禁用 */
107
+ disabled?: boolean;
108
+ }
109
+
110
+ /**
111
+ * 布局选项配置接口
112
+ */
113
+ export interface LayoutOption {
114
+ /** 列数 */
115
+ columns: 2 | 3 | 4 | 5;
116
+ /** 显示图标 */
117
+ icon: string;
118
+ /** 提示文本 */
119
+ title: string;
120
+ }
121
+
122
+ // ========== 工具函数 ==========
123
+
124
+ /**
125
+ * 根据必填条件过滤字段配置
126
+ * @param fields 原始字段配置数组
127
+ * @param onlyRequired 是否只显示必填字段
128
+ */
129
+ export function filterFieldsByRequired(
130
+ fields: FieldConfig[],
131
+ onlyRequired: boolean
132
+ ): FieldConfig[] {
133
+ if (!onlyRequired) return fields;
134
+ return fields.filter((field) => field.required);
135
+ }
136
+
137
+ /**
138
+ * 判断区块是否有可显示的字段
139
+ * @param fields 字段配置数组
140
+ */
141
+ export function hasSectionFields(fields: FieldConfig[]): boolean {
142
+ return fields.length > 0;
143
+ }
144
+
145
+ /**
146
+ * 生成默认表单数据
147
+ * @param sections 区块配置数组
148
+ */
149
+ export function generateDefaultFormData(
150
+ sections: SectionConfig[]
151
+ ): FormDataType {
152
+ const formData: FormDataType = {};
153
+
154
+ sections.forEach((section) => {
155
+ section.fieldsConfig.forEach((field) => {
156
+ // 根据字段类型设置默认值
157
+ switch (field.type) {
158
+ case "number":
159
+ formData[field.prop] = field.min || 0;
160
+ break;
161
+ case "select":
162
+ formData[field.prop] = "";
163
+ break;
164
+ case "date":
165
+ case "datetime":
166
+ formData[field.prop] = null;
167
+ break;
168
+ default:
169
+ formData[field.prop] = "";
170
+ }
171
+ });
172
+ });
173
+
174
+ return formData;
175
+ }