@agile-team/wl-skills-kit 2.1.1 → 2.1.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 (80) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +6 -5
  3. package/bin/wl-skills.js +35 -1
  4. package/files/.github/guides/README.md +13 -13
  5. package/files/.github/guides/architecture.md +555 -555
  6. package/files/.github/guides/usage.md +166 -166
  7. package/files/.github/reports/README.md +65 -65
  8. package/files/.github/reports/SYS_DICT_INFO.md +19 -19
  9. package/files/.github/reports/SYS_MENU_INFO.md +247 -247
  10. package/files/.github/reports/SYS_PERMISSION_INFO.md +20 -20
  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 -33
  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 -44
  13. package/files/.github/skills/_compat/README.md +108 -108
  14. package/files/.github/skills/_compat/headers/agents.txt +8 -8
  15. package/files/.github/skills/_compat/headers/claude-code.txt +7 -7
  16. package/files/.github/skills/_compat/headers/cline.txt +7 -7
  17. package/files/.github/skills/_compat/headers/cursor-mdc.txt +16 -16
  18. package/files/.github/skills/_compat/headers/cursor-rules.txt +7 -7
  19. package/files/.github/skills/_compat/headers/github-copilot.txt +1 -1
  20. package/files/.github/skills/_compat/headers/kiro.txt +10 -10
  21. package/files/.github/skills/_compat/headers/trae.txt +11 -11
  22. package/files/.github/skills/_compat/headers/windsurf.txt +7 -7
  23. package/files/.github/skills/_registry.md +81 -81
  24. package/files/.github/skills/core/api-contract/SKILL.md +344 -344
  25. package/files/.github/skills/core/api-contract/USAGE.md +110 -110
  26. package/files/.github/skills/core/convention-audit/SKILL.md +189 -189
  27. package/files/.github/skills/core/convention-audit/USAGE.md +99 -99
  28. package/files/.github/skills/core/page-codegen/SKILL.md +973 -973
  29. package/files/.github/skills/core/page-codegen/USAGE.md +102 -102
  30. package/files/.github/skills/core/page-codegen/templates/_index.md +46 -46
  31. package/files/.github/skills/core/page-codegen/templates/domains/_CONTRIBUTING.md +107 -107
  32. package/files/.github/skills/core/page-codegen/templates/domains/produce/TPL-OPERATION-STATION.md +442 -442
  33. package/files/.github/skills/core/page-codegen/templates/domains/sale/README.md +26 -26
  34. package/files/.github/skills/core/page-codegen/templates/universal/TPL-CHANGE-HISTORY.md +276 -276
  35. package/files/.github/skills/core/page-codegen/templates/universal/TPL-DETAIL-TABS.md +1145 -1145
  36. package/files/.github/skills/core/page-codegen/templates/universal/TPL-DRIVEN.md +124 -124
  37. package/files/.github/skills/core/page-codegen/templates/universal/TPL-FORM-ROUTE.md +436 -436
  38. package/files/.github/skills/core/page-codegen/templates/universal/TPL-LIST.md +191 -191
  39. package/files/.github/skills/core/page-codegen/templates/universal/TPL-MASTER-DETAIL.md +148 -148
  40. package/files/.github/skills/core/page-codegen/templates/universal/TPL-RECORD-FORM.md +371 -371
  41. package/files/.github/skills/core/page-codegen/templates/universal/TPL-TREE-LIST.md +186 -186
  42. package/files/.github/skills/core/prototype-scan/SKILL.md +498 -498
  43. package/files/.github/skills/core/prototype-scan/USAGE.md +95 -95
  44. package/files/.github/skills/core/template-extract/SKILL.md +139 -139
  45. package/files/.github/skills/core/template-extract/USAGE.md +93 -93
  46. package/files/.github/skills/domain/README.md +51 -51
  47. package/files/.github/skills/ops/code-fix/SKILL.draft.md +108 -108
  48. package/files/.github/skills/sync/dict-sync/SKILL.draft.md +100 -100
  49. package/files/.github/skills/sync/menu-sync/SKILL.md +258 -258
  50. package/files/.github/skills/sync/menu-sync/USAGE.md +104 -104
  51. package/files/.github/skills/sync/menu-sync/env/env.local.json +6 -6
  52. package/files/.github/skills/sync/menu-sync/env/guide.md +83 -83
  53. package/files/.github/skills/sync/permission-sync/SKILL.draft.md +91 -91
  54. package/files/.github/standards/01-toolchain.md +57 -57
  55. package/files/.github/standards/02-code-structure.md +111 -111
  56. package/files/.github/standards/03-comments.md +53 -53
  57. package/files/.github/standards/04-coding-basics.md +33 -33
  58. package/files/.github/standards/05-logging.md +38 -38
  59. package/files/.github/standards/06-security.md +44 -44
  60. package/files/.github/standards/07-config.md +52 -52
  61. package/files/.github/standards/08-git.md +60 -60
  62. package/files/.github/standards/09-typescript.md +71 -71
  63. package/files/.github/standards/10-pinia.md +57 -57
  64. package/files/.github/standards/11-form-validation.md +81 -81
  65. package/files/.github/standards/12-base-table.md +116 -116
  66. package/files/.github/standards/13-platform-components.md +123 -123
  67. package/files/.github/standards/index.md +89 -89
  68. package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/data.ts +196 -196
  69. package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/index.scss +150 -150
  70. package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/index.vue +79 -79
  71. package/files/docs/jh-date-range.md +257 -257
  72. package/files/docs/jh-date.md +222 -222
  73. package/files/docs/jh-dept-picker.md +190 -190
  74. package/files/docs/jh-drag-row.md +590 -590
  75. package/files/docs/jh-file-upload.md +216 -216
  76. package/files/docs/jh-picker.md +218 -218
  77. package/files/docs/jh-select.md +148 -148
  78. package/files/docs/jh-text.md +248 -248
  79. package/files/docs/jh-user-picker.md +197 -197
  80. package/package.json +3 -5
@@ -1,197 +1,197 @@
1
- # jh-user-picker - 用户选择组件
2
-
3
- > 平台统一的用户挑选组件,用于选择单个或多个用户,内置用户数据加载与回显逻辑
4
-
5
- ## 📦 组件位置
6
-
7
- ```ts
8
- import "@jhlc/common-core";
9
- ```
10
-
11
- 组件已全局注册,可直接在模板中使用 `<jh-user-picker />`。
12
-
13
- ---
14
-
15
- ## 基本用法
16
-
17
- ### 1️⃣ 单选用户(最常用)
18
-
19
- ```vue
20
- <template>
21
- <jh-user-picker v-model="form.userId" placeholder="请选择负责人" />
22
- </template>
23
-
24
- <script setup lang="ts">
25
- import { ref } from "vue";
26
-
27
- const form = ref({
28
- userId: ""
29
- });
30
- </script>
31
- ```
32
-
33
- ---
34
-
35
- ### 2️⃣ 多选用户
36
-
37
- ```vue
38
- <jh-user-picker v-model="form.userIds" 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
- | dataType | 返回数据类型(多选时) | `"array" \| "string"` | `"array"` |
53
- | dialogTitle | 弹窗标题 | `string` | `"选择用户"` |
54
- | dialogWidth | 弹窗宽度 | `string` | `"800px"` |
55
- | searchPlaceholder | 搜索框占位文本 | `string` | `"请输入用户名"` |
56
-
57
- > **重点**: 多选时,`dataType="string"` 会返回逗号分隔的字符串,`dataType="array"` 返回数组。
58
-
59
- ---
60
-
61
- ## Events 事件
62
-
63
- | 事件名 | 说明 | 回调参数 |
64
- | ----------------- | ------------------------ | ------------------------------------- |
65
- | update:modelValue | v-model 更新 | `(value: string \| string[]) => void` |
66
- | confirm | 确认选择时触发 | `() => void` |
67
- | clear | 清空时触发 | `() => void` |
68
- | blur | 失去焦点时触发 | `() => void` |
69
- | closed | 弹窗关闭时触发 | `() => void` |
70
- | remove | 移除选中项时触发(多选) | `() => void` |
71
-
72
- ---
73
-
74
- ## 常见场景
75
-
76
- ### 场景 1:表单负责人选择
77
-
78
- ```vue
79
- <jh-user-picker v-model="form.ownerId" placeholder="请选择负责人" />
80
- ```
81
-
82
- ---
83
-
84
- ### 场景 2:查询条件(多选)
85
-
86
- ```vue
87
- <jh-user-picker v-model="query.userIds" multiple placeholder="请选择用户" />
88
- ```
89
-
90
- ---
91
-
92
- ### 场景 3:详情页只读展示(配合 jh-text)
93
-
94
- ```vue
95
- <jh-text type="user" :value="detail.userId" />
96
- ```
97
-
98
- > ⚠️ `jh-user-picker` 仅用于选择,展示请使用 `jh-text`
99
-
100
- ---
101
-
102
- ## 与手动实现对比
103
-
104
- ### 使用 jh-user-picker(推荐)
105
-
106
- ```vue
107
- <jh-user-picker v-model="form.userId" />
108
- ```
109
-
110
- ### 手动实现(不推荐)
111
-
112
- ```vue
113
- <el-select v-model="form.userId">
114
- <el-option
115
- v-for="user in userList"
116
- :key="user.id"
117
- :label="user.name"
118
- :value="user.id"
119
- />
120
- </el-select>
121
- ```
122
-
123
- ❌ 需要自己加载用户列表
124
- ❌ 需要处理回显
125
- ❌ 每个页面重复实现
126
-
127
- ---
128
-
129
- ## 最佳实践
130
-
131
- ### 1️⃣ 编辑 & 展示分离
132
-
133
- | 场景 | 编辑 | 展示 |
134
- | ---- | -------------- | ------- |
135
- | 用户 | jh-user-picker | jh-text |
136
-
137
- ---
138
-
139
- ### 2️⃣ 表单中直接使用 v-model
140
-
141
- ```vue
142
- <jh-user-picker v-model="form.userId" />
143
- ```
144
-
145
- 避免手动监听 `change` 事件
146
-
147
- ---
148
-
149
- ### 3️⃣ 多选返回值说明
150
-
151
- ```ts
152
- // 单选
153
- userId: "u001";
154
-
155
- // 多选
156
- userIds: ["u001", "u002"];
157
- ```
158
-
159
- ---
160
-
161
- ## 注意事项
162
-
163
- 1. **组件内部已处理用户数据加载**
164
- - 不需要手动请求接口
165
- - 支持自动回显
166
-
167
- 2. **仅返回用户 ID**
168
- - 展示用户名称请使用 `jh-text`
169
-
170
- 3. **多选时注意字段类型**
171
- - 必须使用数组接收
172
-
173
- ---
174
-
175
- ## 🎯 真实项目示例
176
-
177
- ### 示例 1:新增页面
178
-
179
- ```vue
180
- <jh-user-picker v-model="form.createUserId" />
181
- ```
182
-
183
- ### 示例 2:查询条件
184
-
185
- ```vue
186
- <jh-user-picker v-model="query.userIds" multiple />
187
- ```
188
-
189
- ---
190
-
191
- ## 🚀 快速开始
192
-
193
- - **单选**:直接使用 v-model
194
- - **多选**:添加 `multiple`
195
- - **展示**:统一使用 `jh-text type="user"`
196
-
197
- **推荐作为平台统一的用户选择组件使用!**
1
+ # jh-user-picker - 用户选择组件
2
+
3
+ > 平台统一的用户挑选组件,用于选择单个或多个用户,内置用户数据加载与回显逻辑
4
+
5
+ ## 📦 组件位置
6
+
7
+ ```ts
8
+ import "@jhlc/common-core";
9
+ ```
10
+
11
+ 组件已全局注册,可直接在模板中使用 `<jh-user-picker />`。
12
+
13
+ ---
14
+
15
+ ## 基本用法
16
+
17
+ ### 1️⃣ 单选用户(最常用)
18
+
19
+ ```vue
20
+ <template>
21
+ <jh-user-picker v-model="form.userId" placeholder="请选择负责人" />
22
+ </template>
23
+
24
+ <script setup lang="ts">
25
+ import { ref } from "vue";
26
+
27
+ const form = ref({
28
+ userId: ""
29
+ });
30
+ </script>
31
+ ```
32
+
33
+ ---
34
+
35
+ ### 2️⃣ 多选用户
36
+
37
+ ```vue
38
+ <jh-user-picker v-model="form.userIds" 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
+ | dataType | 返回数据类型(多选时) | `"array" \| "string"` | `"array"` |
53
+ | dialogTitle | 弹窗标题 | `string` | `"选择用户"` |
54
+ | dialogWidth | 弹窗宽度 | `string` | `"800px"` |
55
+ | searchPlaceholder | 搜索框占位文本 | `string` | `"请输入用户名"` |
56
+
57
+ > **重点**: 多选时,`dataType="string"` 会返回逗号分隔的字符串,`dataType="array"` 返回数组。
58
+
59
+ ---
60
+
61
+ ## Events 事件
62
+
63
+ | 事件名 | 说明 | 回调参数 |
64
+ | ----------------- | ------------------------ | ------------------------------------- |
65
+ | update:modelValue | v-model 更新 | `(value: string \| string[]) => void` |
66
+ | confirm | 确认选择时触发 | `() => void` |
67
+ | clear | 清空时触发 | `() => void` |
68
+ | blur | 失去焦点时触发 | `() => void` |
69
+ | closed | 弹窗关闭时触发 | `() => void` |
70
+ | remove | 移除选中项时触发(多选) | `() => void` |
71
+
72
+ ---
73
+
74
+ ## 常见场景
75
+
76
+ ### 场景 1:表单负责人选择
77
+
78
+ ```vue
79
+ <jh-user-picker v-model="form.ownerId" placeholder="请选择负责人" />
80
+ ```
81
+
82
+ ---
83
+
84
+ ### 场景 2:查询条件(多选)
85
+
86
+ ```vue
87
+ <jh-user-picker v-model="query.userIds" multiple placeholder="请选择用户" />
88
+ ```
89
+
90
+ ---
91
+
92
+ ### 场景 3:详情页只读展示(配合 jh-text)
93
+
94
+ ```vue
95
+ <jh-text type="user" :value="detail.userId" />
96
+ ```
97
+
98
+ > ⚠️ `jh-user-picker` 仅用于选择,展示请使用 `jh-text`
99
+
100
+ ---
101
+
102
+ ## 与手动实现对比
103
+
104
+ ### 使用 jh-user-picker(推荐)
105
+
106
+ ```vue
107
+ <jh-user-picker v-model="form.userId" />
108
+ ```
109
+
110
+ ### 手动实现(不推荐)
111
+
112
+ ```vue
113
+ <el-select v-model="form.userId">
114
+ <el-option
115
+ v-for="user in userList"
116
+ :key="user.id"
117
+ :label="user.name"
118
+ :value="user.id"
119
+ />
120
+ </el-select>
121
+ ```
122
+
123
+ ❌ 需要自己加载用户列表
124
+ ❌ 需要处理回显
125
+ ❌ 每个页面重复实现
126
+
127
+ ---
128
+
129
+ ## 最佳实践
130
+
131
+ ### 1️⃣ 编辑 & 展示分离
132
+
133
+ | 场景 | 编辑 | 展示 |
134
+ | ---- | -------------- | ------- |
135
+ | 用户 | jh-user-picker | jh-text |
136
+
137
+ ---
138
+
139
+ ### 2️⃣ 表单中直接使用 v-model
140
+
141
+ ```vue
142
+ <jh-user-picker v-model="form.userId" />
143
+ ```
144
+
145
+ 避免手动监听 `change` 事件
146
+
147
+ ---
148
+
149
+ ### 3️⃣ 多选返回值说明
150
+
151
+ ```ts
152
+ // 单选
153
+ userId: "u001";
154
+
155
+ // 多选
156
+ userIds: ["u001", "u002"];
157
+ ```
158
+
159
+ ---
160
+
161
+ ## 注意事项
162
+
163
+ 1. **组件内部已处理用户数据加载**
164
+ - 不需要手动请求接口
165
+ - 支持自动回显
166
+
167
+ 2. **仅返回用户 ID**
168
+ - 展示用户名称请使用 `jh-text`
169
+
170
+ 3. **多选时注意字段类型**
171
+ - 必须使用数组接收
172
+
173
+ ---
174
+
175
+ ## 🎯 真实项目示例
176
+
177
+ ### 示例 1:新增页面
178
+
179
+ ```vue
180
+ <jh-user-picker v-model="form.createUserId" />
181
+ ```
182
+
183
+ ### 示例 2:查询条件
184
+
185
+ ```vue
186
+ <jh-user-picker v-model="query.userIds" multiple />
187
+ ```
188
+
189
+ ---
190
+
191
+ ## 🚀 快速开始
192
+
193
+ - **单选**:直接使用 v-model
194
+ - **多选**:添加 `multiple`
195
+ - **展示**:统一使用 `jh-text type="user"`
196
+
197
+ **推荐作为平台统一的用户选择组件使用!**
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@agile-team/wl-skills-kit",
3
- "version": "2.1.1",
3
+ "version": "2.1.3",
4
4
  "description": "AI Skill 模板包 — 一键导入 AI 指令 + 组件文档 + 通用组件 + 领域样例,覆盖 Copilot/Cursor/Windsurf/Kiro 等主流 AI 编辑器",
5
5
  "main": "./bin/wl-skills.js",
6
6
  "bin": {
7
- "wl-skills": "./bin/wl-skills.js"
7
+ "wl-skills": "bin/wl-skills.js"
8
8
  },
9
9
  "files": [
10
10
  "bin/",
@@ -32,8 +32,6 @@
32
32
  },
33
33
  "engines": {
34
34
  "node": ">=16.0.0"
35
- },
36
- "devDependencies": {
37
- "xlsx": "^0.18.5"
38
35
  }
39
36
  }
37
+