@agile-team/wl-skills-kit 1.2.1 → 2.1.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 (86) hide show
  1. package/CHANGELOG.md +120 -0
  2. package/README.md +169 -366
  3. package/bin/wl-skills.js +149 -43
  4. package/files/.github/copilot-instructions.md +104 -43
  5. package/files/.github/guides/README.md +13 -0
  6. package/files/.github/guides/architecture.md +555 -0
  7. package/files/.github/guides/usage.md +166 -0
  8. package/files/.github/reports/README.md +65 -0
  9. package/files/.github/reports/SYS_DICT_INFO.md +19 -0
  10. package/files/.github/reports/SYS_PERMISSION_INFO.md +20 -0
  11. package/files/.github/reports//347/273/204/344/273/266/346/217/220/345/217/226/345/273/272/350/256/256.md +33 -0
  12. package/files/.github/reports//350/247/204/350/214/203/345/256/241/346/237/245/346/212/245/345/221/212.md +44 -0
  13. package/files/.github/skills/_compat/README.md +108 -0
  14. package/files/.github/skills/_compat/editors.json +61 -0
  15. package/files/.github/skills/_compat/headers/agents.txt +8 -0
  16. package/files/.github/skills/_compat/headers/claude-code.txt +7 -0
  17. package/files/.github/skills/_compat/headers/cline.txt +7 -0
  18. package/files/.github/skills/_compat/headers/cursor-mdc.txt +16 -0
  19. package/files/.github/skills/_compat/headers/cursor-rules.txt +7 -0
  20. package/files/.github/skills/_compat/headers/github-copilot.txt +1 -0
  21. package/files/.github/skills/_compat/headers/kiro.txt +10 -0
  22. package/files/.github/skills/_compat/headers/trae.txt +11 -0
  23. package/files/.github/skills/_compat/headers/windsurf.txt +7 -0
  24. package/files/.github/skills/_registry.md +81 -0
  25. package/files/.github/skills/{api-contract → core/api-contract}/SKILL.md +126 -29
  26. package/files/.github/skills/core/api-contract/USAGE.md +110 -0
  27. package/files/.github/skills/core/convention-audit/SKILL.md +189 -0
  28. package/files/.github/skills/core/convention-audit/USAGE.md +99 -0
  29. package/files/.github/skills/{page-codegen → core/page-codegen}/SKILL.md +64 -21
  30. package/files/.github/skills/core/page-codegen/USAGE.md +102 -0
  31. package/files/.github/skills/core/page-codegen/templates/_index.md +46 -0
  32. package/files/.github/skills/core/page-codegen/templates/domains/_CONTRIBUTING.md +107 -0
  33. package/files/.github/skills/{page-codegen → core/page-codegen/templates/domains/produce}/TPL-OPERATION-STATION.md +442 -442
  34. package/files/.github/skills/core/page-codegen/templates/domains/sale/README.md +26 -0
  35. package/files/.github/skills/{page-codegen → core/page-codegen/templates/universal}/TPL-DETAIL-TABS.md +94 -39
  36. package/files/.github/skills/{page-codegen → core/page-codegen/templates/universal}/TPL-DRIVEN.md +124 -124
  37. package/files/.github/skills/core/prototype-scan/USAGE.md +95 -0
  38. package/files/.github/skills/core/template-extract/SKILL.md +139 -0
  39. package/files/.github/skills/core/template-extract/USAGE.md +93 -0
  40. package/files/.github/skills/domain/README.md +51 -0
  41. package/files/.github/skills/ops/code-fix/SKILL.draft.md +108 -0
  42. package/files/.github/skills/sync/dict-sync/SKILL.draft.md +100 -0
  43. package/files/.github/skills/{menu-sync → sync/menu-sync}/SKILL.md +258 -258
  44. package/files/.github/skills/sync/menu-sync/USAGE.md +104 -0
  45. package/files/.github/skills/{menu-sync → sync/menu-sync}/env/guide.md +83 -83
  46. package/files/.github/skills/sync/permission-sync/SKILL.draft.md +91 -0
  47. package/files/.github/standards/01-toolchain.md +57 -0
  48. package/files/.github/standards/02-code-structure.md +111 -0
  49. package/files/.github/standards/03-comments.md +53 -0
  50. package/files/.github/standards/04-coding-basics.md +33 -0
  51. package/files/.github/standards/05-logging.md +38 -0
  52. package/files/.github/standards/06-security.md +44 -0
  53. package/files/.github/standards/07-config.md +52 -0
  54. package/files/.github/standards/08-git.md +60 -0
  55. package/files/.github/standards/09-typescript.md +71 -0
  56. package/files/.github/standards/10-pinia.md +57 -0
  57. package/files/.github/standards/11-form-validation.md +81 -0
  58. package/files/.github/standards/12-base-table.md +116 -0
  59. package/files/.github/standards/13-platform-components.md +123 -0
  60. package/files/.github/standards/index.md +89 -0
  61. package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/data.ts +196 -196
  62. package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/index.scss +150 -150
  63. package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/index.vue +79 -79
  64. package/files/docs/jh-date-range.md +257 -257
  65. package/files/docs/jh-date.md +222 -222
  66. package/files/docs/jh-dept-picker.md +190 -190
  67. package/files/docs/jh-drag-row.md +590 -590
  68. package/files/docs/jh-file-upload.md +216 -216
  69. package/files/docs/jh-picker.md +218 -218
  70. package/files/docs/jh-select.md +148 -148
  71. package/files/docs/jh-text.md +248 -248
  72. package/files/docs/jh-user-picker.md +197 -197
  73. package/package.json +4 -1
  74. package/files/.github/docs/menu-sync-design.md +0 -264
  75. package/files/.github/docs/use-skill.md +0 -382
  76. package/files/.github/docs/wl-skills-kit.md +0 -266
  77. package/files/.github/skills/convention-extract/SKILL.md +0 -236
  78. /package/files/.github/{docs → reports}/SYS_MENU_INFO.md +0 -0
  79. /package/files/.github/skills/{page-codegen → core/page-codegen/templates/universal}/TPL-CHANGE-HISTORY.md +0 -0
  80. /package/files/.github/skills/{page-codegen → core/page-codegen/templates/universal}/TPL-FORM-ROUTE.md +0 -0
  81. /package/files/.github/skills/{page-codegen → core/page-codegen/templates/universal}/TPL-LIST.md +0 -0
  82. /package/files/.github/skills/{page-codegen → core/page-codegen/templates/universal}/TPL-MASTER-DETAIL.md +0 -0
  83. /package/files/.github/skills/{page-codegen → core/page-codegen/templates/universal}/TPL-RECORD-FORM.md +0 -0
  84. /package/files/.github/skills/{page-codegen → core/page-codegen/templates/universal}/TPL-TREE-LIST.md +0 -0
  85. /package/files/.github/skills/{prototype-scan → core/prototype-scan}/SKILL.md +0 -0
  86. /package/files/.github/skills/{menu-sync → sync/menu-sync}/env/env.local.json +0 -0
@@ -1,190 +1,190 @@
1
- # jh-dept-picker - 部门选择组件
2
-
3
- > 平台统一的部门挑选组件,用于选择单个或多个部门,内置部门树数据加载与回显逻辑
4
-
5
- ## 📦 组件位置
6
-
7
- ```ts
8
- import "@jhlc/common-core";
9
- ```
10
-
11
- 组件已全局注册,可直接在模板中使用 `<jh-dept-picker />`。
12
-
13
- ---
14
-
15
- ## 基本用法
16
-
17
- ### 1️⃣ 单选部门(最常用)
18
-
19
- ```vue
20
- <template>
21
- <jh-dept-picker v-model="form.deptId" placeholder="请选择部门" />
22
- </template>
23
-
24
- <script setup lang="ts">
25
- import { ref } from "vue";
26
-
27
- const form = ref({
28
- deptId: ""
29
- });
30
- </script>
31
- ```
32
-
33
- ---
34
-
35
- ### 2️⃣ 多选部门
36
-
37
- ```vue
38
- <jh-dept-picker v-model="form.deptIds" multiple placeholder="请选择相关部门" />
39
- ```
40
-
41
- ---
42
-
43
- ## Props 属性
44
-
45
- | 参数 | 说明 | 类型 | 默认值 |
46
- | -------------------- | ---------------------- | --------------------- | ------------------ |
47
- | modelValue / v-model | 绑定值 | `string \| string[]` | - |
48
- | multiple | 是否多选 | `boolean` | `false` |
49
- | placeholder | 占位提示 | `string` | `"请选择部门"` |
50
- | disabled | 是否禁用 | `boolean` | `false` |
51
- | clearable | 是否可清空 | `boolean` | `true` |
52
- | checkStrictly | 父子是否不关联 | `boolean` | `false` |
53
- | dataType | 返回数据类型(多选时) | `"array" \| "string"` | `"array"` |
54
- | dialogTitle | 弹窗标题 | `string` | `"选择部门"` |
55
- | dialogWidth | 弹窗宽度 | `string` | `"600px"` |
56
- | searchPlaceholder | 搜索框占位文本 | `string` | `"请输入部门名称"` |
57
-
58
- > **重点**:
59
- >
60
- > - 默认父子关联,选中父节点会自动选中子节点
61
- > - `checkStrictly=true` 时,父子不互相关联
62
-
63
- ---
64
-
65
- ## Events 事件
66
-
67
- | 事件名 | 说明 | 回调参数 |
68
- | ----------------- | ------------------------ | ------------------------------------- |
69
- | update:modelValue | v-model 更新 | `(value: string \| string[]) => void` |
70
- | confirm | 确认选择时触发 | `() => void` |
71
- | clear | 清空时触发 | `() => void` |
72
- | closed | 弹窗关闭时触发 | `() => void` |
73
- | remove | 移除选中项时触发(多选) | `() => void` |
74
-
75
- ---
76
-
77
- ## 常见场景
78
-
79
- ### 场景 1:表单部门选择
80
-
81
- ```vue
82
- <jh-dept-picker v-model="form.deptId" placeholder="请选择所属部门" />
83
- ```
84
-
85
- ---
86
-
87
- ### 场景 2:查询条件(多选)
88
-
89
- ```vue
90
- <jh-dept-picker v-model="query.deptIds" multiple placeholder="请选择部门" />
91
- ```
92
-
93
- ---
94
-
95
- ### 场景 3:详情页部门展示(配合 jh-text)
96
-
97
- ```vue
98
- <jh-text type="dept" :value="detail.deptId" />
99
- ```
100
-
101
- > ⚠️ `jh-dept-picker` 仅用于选择,展示请使用 `jh-text`
102
-
103
- ---
104
-
105
- ## 与手动实现对比
106
-
107
- ### 使用 jh-dept-picker(推荐)
108
-
109
- ```vue
110
- <jh-dept-picker v-model="form.deptId" />
111
- ```
112
-
113
- ### 手动实现(不推荐)
114
-
115
- ```vue
116
- <el-tree-select v-model="form.deptId" :data="deptTree" />
117
- ```
118
-
119
- ❌ 需要自己加载部门树
120
- ❌ 需要处理父子关系
121
- ❌ 回显逻辑复杂
122
-
123
- ---
124
-
125
- ## 最佳实践
126
-
127
- ### 1️⃣ 编辑 & 展示分离
128
-
129
- | 场景 | 编辑 | 展示 |
130
- | ---- | -------------- | ------- |
131
- | 部门 | jh-dept-picker | jh-text |
132
-
133
- ---
134
-
135
- ### 2️⃣ 多选返回值说明
136
-
137
- ```ts
138
- // 单选
139
- deptId: "d001";
140
-
141
- // 多选
142
- deptIds: ["d001", "d002"];
143
- ```
144
-
145
- ---
146
-
147
- ### 3️⃣ 树形选择说明
148
-
149
- - 默认父子关联
150
- - `checkStrictly=true` 时父子不互相关联
151
-
152
- ---
153
-
154
- ## 注意事项
155
-
156
- 1. **组件内部已处理部门数据加载**
157
- - 不需要手动请求接口
158
- - 支持树形结构与自动回显
159
-
160
- 2. **仅返回部门 ID**
161
- - 部门名称展示统一使用 `jh-text`
162
-
163
- 3. **多选字段类型**
164
- - 必须使用数组接收
165
-
166
- ---
167
-
168
- ## 🎯 真实项目示例
169
-
170
- ### 示例 1:新增页面
171
-
172
- ```vue
173
- <jh-dept-picker v-model="form.deptId" />
174
- ```
175
-
176
- ### 示例 2:查询条件
177
-
178
- ```vue
179
- <jh-dept-picker v-model="query.deptIds" multiple />
180
- ```
181
-
182
- ---
183
-
184
- ## 🚀 快速开始
185
-
186
- - **单选**:直接使用 v-model
187
- - **多选**:添加 `multiple`
188
- - **部门展示**:统一使用 `jh-text type="dept"`
189
-
190
- **推荐作为平台统一的部门选择组件使用!**
1
+ # jh-dept-picker - 部门选择组件
2
+
3
+ > 平台统一的部门挑选组件,用于选择单个或多个部门,内置部门树数据加载与回显逻辑
4
+
5
+ ## 📦 组件位置
6
+
7
+ ```ts
8
+ import "@jhlc/common-core";
9
+ ```
10
+
11
+ 组件已全局注册,可直接在模板中使用 `<jh-dept-picker />`。
12
+
13
+ ---
14
+
15
+ ## 基本用法
16
+
17
+ ### 1️⃣ 单选部门(最常用)
18
+
19
+ ```vue
20
+ <template>
21
+ <jh-dept-picker v-model="form.deptId" placeholder="请选择部门" />
22
+ </template>
23
+
24
+ <script setup lang="ts">
25
+ import { ref } from "vue";
26
+
27
+ const form = ref({
28
+ deptId: ""
29
+ });
30
+ </script>
31
+ ```
32
+
33
+ ---
34
+
35
+ ### 2️⃣ 多选部门
36
+
37
+ ```vue
38
+ <jh-dept-picker v-model="form.deptIds" multiple placeholder="请选择相关部门" />
39
+ ```
40
+
41
+ ---
42
+
43
+ ## Props 属性
44
+
45
+ | 参数 | 说明 | 类型 | 默认值 |
46
+ | -------------------- | ---------------------- | --------------------- | ------------------ |
47
+ | modelValue / v-model | 绑定值 | `string \| string[]` | - |
48
+ | multiple | 是否多选 | `boolean` | `false` |
49
+ | placeholder | 占位提示 | `string` | `"请选择部门"` |
50
+ | disabled | 是否禁用 | `boolean` | `false` |
51
+ | clearable | 是否可清空 | `boolean` | `true` |
52
+ | checkStrictly | 父子是否不关联 | `boolean` | `false` |
53
+ | dataType | 返回数据类型(多选时) | `"array" \| "string"` | `"array"` |
54
+ | dialogTitle | 弹窗标题 | `string` | `"选择部门"` |
55
+ | dialogWidth | 弹窗宽度 | `string` | `"600px"` |
56
+ | searchPlaceholder | 搜索框占位文本 | `string` | `"请输入部门名称"` |
57
+
58
+ > **重点**:
59
+ >
60
+ > - 默认父子关联,选中父节点会自动选中子节点
61
+ > - `checkStrictly=true` 时,父子不互相关联
62
+
63
+ ---
64
+
65
+ ## Events 事件
66
+
67
+ | 事件名 | 说明 | 回调参数 |
68
+ | ----------------- | ------------------------ | ------------------------------------- |
69
+ | update:modelValue | v-model 更新 | `(value: string \| string[]) => void` |
70
+ | confirm | 确认选择时触发 | `() => void` |
71
+ | clear | 清空时触发 | `() => void` |
72
+ | closed | 弹窗关闭时触发 | `() => void` |
73
+ | remove | 移除选中项时触发(多选) | `() => void` |
74
+
75
+ ---
76
+
77
+ ## 常见场景
78
+
79
+ ### 场景 1:表单部门选择
80
+
81
+ ```vue
82
+ <jh-dept-picker v-model="form.deptId" placeholder="请选择所属部门" />
83
+ ```
84
+
85
+ ---
86
+
87
+ ### 场景 2:查询条件(多选)
88
+
89
+ ```vue
90
+ <jh-dept-picker v-model="query.deptIds" multiple placeholder="请选择部门" />
91
+ ```
92
+
93
+ ---
94
+
95
+ ### 场景 3:详情页部门展示(配合 jh-text)
96
+
97
+ ```vue
98
+ <jh-text type="dept" :value="detail.deptId" />
99
+ ```
100
+
101
+ > ⚠️ `jh-dept-picker` 仅用于选择,展示请使用 `jh-text`
102
+
103
+ ---
104
+
105
+ ## 与手动实现对比
106
+
107
+ ### 使用 jh-dept-picker(推荐)
108
+
109
+ ```vue
110
+ <jh-dept-picker v-model="form.deptId" />
111
+ ```
112
+
113
+ ### 手动实现(不推荐)
114
+
115
+ ```vue
116
+ <el-tree-select v-model="form.deptId" :data="deptTree" />
117
+ ```
118
+
119
+ ❌ 需要自己加载部门树
120
+ ❌ 需要处理父子关系
121
+ ❌ 回显逻辑复杂
122
+
123
+ ---
124
+
125
+ ## 最佳实践
126
+
127
+ ### 1️⃣ 编辑 & 展示分离
128
+
129
+ | 场景 | 编辑 | 展示 |
130
+ | ---- | -------------- | ------- |
131
+ | 部门 | jh-dept-picker | jh-text |
132
+
133
+ ---
134
+
135
+ ### 2️⃣ 多选返回值说明
136
+
137
+ ```ts
138
+ // 单选
139
+ deptId: "d001";
140
+
141
+ // 多选
142
+ deptIds: ["d001", "d002"];
143
+ ```
144
+
145
+ ---
146
+
147
+ ### 3️⃣ 树形选择说明
148
+
149
+ - 默认父子关联
150
+ - `checkStrictly=true` 时父子不互相关联
151
+
152
+ ---
153
+
154
+ ## 注意事项
155
+
156
+ 1. **组件内部已处理部门数据加载**
157
+ - 不需要手动请求接口
158
+ - 支持树形结构与自动回显
159
+
160
+ 2. **仅返回部门 ID**
161
+ - 部门名称展示统一使用 `jh-text`
162
+
163
+ 3. **多选字段类型**
164
+ - 必须使用数组接收
165
+
166
+ ---
167
+
168
+ ## 🎯 真实项目示例
169
+
170
+ ### 示例 1:新增页面
171
+
172
+ ```vue
173
+ <jh-dept-picker v-model="form.deptId" />
174
+ ```
175
+
176
+ ### 示例 2:查询条件
177
+
178
+ ```vue
179
+ <jh-dept-picker v-model="query.deptIds" multiple />
180
+ ```
181
+
182
+ ---
183
+
184
+ ## 🚀 快速开始
185
+
186
+ - **单选**:直接使用 v-model
187
+ - **多选**:添加 `multiple`
188
+ - **部门展示**:统一使用 `jh-text type="dept"`
189
+
190
+ **推荐作为平台统一的部门选择组件使用!**