@agile-team/wl-skills-kit 2.1.2 → 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 +14 -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 +2 -4
@@ -1,218 +1,218 @@
1
- # jh-picker - 通用关联挑选组件
2
-
3
- > 平台统一的通用数据挑选组件,适用于需要从某一业务数据源中选择一条或多条数据的场景,常用于关联单据、基础资料等
4
-
5
- ## 📦 组件位置
6
-
7
- ```ts
8
- import "@jhlc/common-core";
9
- ```
10
-
11
- 组件已全局注册,可直接在模板中使用 `<jh-picker />`。
12
-
13
- ---
14
-
15
- ## 基本用法
16
-
17
- ### 1️⃣ 单选关联数据(最常用)
18
-
19
- ```vue
20
- <template>
21
- <jh-picker
22
- v-model="form.customerId"
23
- picker-type="customer"
24
- placeholder="请选择客户"
25
- />
26
- </template>
27
-
28
- <script setup lang="ts">
29
- import { ref } from "vue";
30
-
31
- const form = ref({
32
- customerId: ""
33
- });
34
- </script>
35
- ```
36
-
37
- ---
38
-
39
- ### 2️⃣ 多选关联数据
40
-
41
- ```vue
42
- <jh-picker
43
- v-model="form.productIds"
44
- picker-type="product"
45
- multiple
46
- placeholder="请选择商品"
47
- />
48
- ```
49
-
50
- ---
51
-
52
- ## Props 属性
53
-
54
- | 参数 | 说明 | 类型 | 默认值 |
55
- | -------------------- | -------------------------------- | ------------------------------------------------------------------------ | --------------------- |
56
- | modelValue / v-model | 绑定值 | `string \| string[]` | - |
57
- | pickerType | 选择器类型(业务标识) | `string` | - |
58
- | single | 是否单选(与 multiple 相反) | `boolean` | `true` |
59
- | multiple | 是否多选 | `boolean` | `false` |
60
- | placeholder | 占位提示 | `string` | `"请选择"` |
61
- | disabled | 是否禁用 | `boolean` | `false` |
62
- | clearable | 是否可清空 | `boolean` | `true` |
63
- | dataType | 返回数据类型(多选时) | `"array" \| "string"` | `"array"` |
64
- | showType | 显示类型 | `"" \| "button"` | `""` |
65
- | showLabel | 按钮文本(showType="button" 时) | `string` | - |
66
- | buttonType | 按钮类型 | `"default" \| "primary" \| "success" \| "info" \| "warning" \| "danger"` | `"default"` |
67
- | buttonIcon | 按钮图标 | `"Search" \| "Edit" \| "Delete" \| "Plus" \| "Refresh"` | - |
68
- | title | 弹窗标题 | `string` | - |
69
- | width | 弹窗宽度 | `string` | `"800px"` |
70
- | listUrl | 列表查询接口 | `string` | - |
71
- | listByIdsUrl | 根据ID查询接口(回显) | `string` | - |
72
- | query | 查询条件配置 | `Array` | - |
73
- | columns | 表格列配置 | `Array` | - |
74
- | valueAttr | 值字段路径 | `string[] \| string` | `["id"]` |
75
- | labelAttr | 标签字段路径 | `string[] \| string` | `["name"]` |
76
- | dataAttr | 数据字段路径 | `string[] \| string` | `["data", "records"]` |
77
-
78
- > **重点**: `pickerType` 必须是平台配置过的类型,否则需要手动配置 `listUrl`、`query`、`columns` 等参数。
79
-
80
- ---
81
-
82
- ## Events 事件
83
-
84
- | 事件名 | 说明 | 回调参数 |
85
- | ----------------- | -------------- | ------------------------------------- |
86
- | update:modelValue | v-model 更新 | `(value: string \| string[]) => void` |
87
- | change | 选择变化时触发 | `() => void` |
88
- | ok | 确认选择时触发 | `() => void` |
89
- | clear | 清空时触发 | `() => void` |
90
-
91
- ---
92
-
93
- ## 常见场景
94
-
95
- ### 场景 1:选择关联客户
96
-
97
- ```vue
98
- <jh-picker v-model="form.customerId" picker-type="customer" />
99
- ```
100
-
101
- ---
102
-
103
- ### 场景 2:选择关联单据
104
-
105
- ```vue
106
- <jh-picker v-model="form.orderId" picker-type="order" />
107
- ```
108
-
109
- ---
110
-
111
- ### 场景 3:多选关联基础资料
112
-
113
- ```vue
114
- <jh-picker v-model="form.materialIds" picker-type="material" multiple />
115
- ```
116
-
117
- ---
118
-
119
- ### 场景 4:详情页展示(配合 jh-text)
120
-
121
- ```vue
122
- <jh-text :value="detail.customerName" />
123
- ```
124
-
125
- > ⚠️ `jh-picker` 仅负责选择,展示请使用文本组件
126
-
127
- ---
128
-
129
- ## 与手动实现对比
130
-
131
- ### 使用 jh-picker(推荐)
132
-
133
- ```vue
134
- <jh-picker v-model="form.customerId" picker-type="customer" />
135
- ```
136
-
137
- ### 手动实现(不推荐)
138
-
139
- ```vue
140
- <el-input v-model="form.customerName" @click="openDialog" readonly />
141
- ```
142
-
143
- ❌ 需要自己实现弹窗
144
- ❌ 需要处理列表查询
145
- ❌ 需要维护回填逻辑
146
-
147
- ---
148
-
149
- ## 最佳实践
150
-
151
- ### 1️⃣ pickerType 必须语义清晰
152
-
153
- ```vue
154
- <jh-picker picker-type="customer" />
155
- <jh-picker picker-type="product" />
156
- ```
157
-
158
- 确保不同业务类型对应不同选择器配置
159
-
160
- ---
161
-
162
- ### 2️⃣ 编辑 & 展示分离
163
-
164
- | 场景 | 编辑 | 展示 |
165
- | -------- | --------- | ------------------ |
166
- | 关联数据 | jh-picker | jh-text / 普通文本 |
167
-
168
- ---
169
-
170
- ### 3️⃣ 多选返回值说明
171
-
172
- ```ts
173
- // 单选
174
- customerId: "c001";
175
-
176
- // 多选
177
- productIds: ["p001", "p002"];
178
- ```
179
-
180
- ---
181
-
182
- ## 注意事项
183
-
184
- 1. **pickerType 由平台统一配置**
185
- - 不可随意填写
186
- - 必须是平台已支持的类型
187
-
188
- 2. **组件仅返回关联 ID**
189
- - 其他字段需自行处理或由后端返回
190
-
191
- 3. **多选注意字段类型**
192
- - 必须使用数组接收
193
-
194
- ---
195
-
196
- ## 🎯 真实项目示例
197
-
198
- ### 示例 1:销售订单选择客户
199
-
200
- ```vue
201
- <jh-picker v-model="form.customerId" picker-type="customer" />
202
- ```
203
-
204
- ### 示例 2:采购单选择商品
205
-
206
- ```vue
207
- <jh-picker v-model="form.productIds" picker-type="product" multiple />
208
- ```
209
-
210
- ---
211
-
212
- ## 🚀 快速开始
213
-
214
- 1. 确定业务类型(pickerType)
215
- 2. 使用 v-model 绑定 ID
216
- 3. 展示统一使用文本组件
217
-
218
- **推荐作为平台统一的通用关联选择组件使用!**
1
+ # jh-picker - 通用关联挑选组件
2
+
3
+ > 平台统一的通用数据挑选组件,适用于需要从某一业务数据源中选择一条或多条数据的场景,常用于关联单据、基础资料等
4
+
5
+ ## 📦 组件位置
6
+
7
+ ```ts
8
+ import "@jhlc/common-core";
9
+ ```
10
+
11
+ 组件已全局注册,可直接在模板中使用 `<jh-picker />`。
12
+
13
+ ---
14
+
15
+ ## 基本用法
16
+
17
+ ### 1️⃣ 单选关联数据(最常用)
18
+
19
+ ```vue
20
+ <template>
21
+ <jh-picker
22
+ v-model="form.customerId"
23
+ picker-type="customer"
24
+ placeholder="请选择客户"
25
+ />
26
+ </template>
27
+
28
+ <script setup lang="ts">
29
+ import { ref } from "vue";
30
+
31
+ const form = ref({
32
+ customerId: ""
33
+ });
34
+ </script>
35
+ ```
36
+
37
+ ---
38
+
39
+ ### 2️⃣ 多选关联数据
40
+
41
+ ```vue
42
+ <jh-picker
43
+ v-model="form.productIds"
44
+ picker-type="product"
45
+ multiple
46
+ placeholder="请选择商品"
47
+ />
48
+ ```
49
+
50
+ ---
51
+
52
+ ## Props 属性
53
+
54
+ | 参数 | 说明 | 类型 | 默认值 |
55
+ | -------------------- | -------------------------------- | ------------------------------------------------------------------------ | --------------------- |
56
+ | modelValue / v-model | 绑定值 | `string \| string[]` | - |
57
+ | pickerType | 选择器类型(业务标识) | `string` | - |
58
+ | single | 是否单选(与 multiple 相反) | `boolean` | `true` |
59
+ | multiple | 是否多选 | `boolean` | `false` |
60
+ | placeholder | 占位提示 | `string` | `"请选择"` |
61
+ | disabled | 是否禁用 | `boolean` | `false` |
62
+ | clearable | 是否可清空 | `boolean` | `true` |
63
+ | dataType | 返回数据类型(多选时) | `"array" \| "string"` | `"array"` |
64
+ | showType | 显示类型 | `"" \| "button"` | `""` |
65
+ | showLabel | 按钮文本(showType="button" 时) | `string` | - |
66
+ | buttonType | 按钮类型 | `"default" \| "primary" \| "success" \| "info" \| "warning" \| "danger"` | `"default"` |
67
+ | buttonIcon | 按钮图标 | `"Search" \| "Edit" \| "Delete" \| "Plus" \| "Refresh"` | - |
68
+ | title | 弹窗标题 | `string` | - |
69
+ | width | 弹窗宽度 | `string` | `"800px"` |
70
+ | listUrl | 列表查询接口 | `string` | - |
71
+ | listByIdsUrl | 根据ID查询接口(回显) | `string` | - |
72
+ | query | 查询条件配置 | `Array` | - |
73
+ | columns | 表格列配置 | `Array` | - |
74
+ | valueAttr | 值字段路径 | `string[] \| string` | `["id"]` |
75
+ | labelAttr | 标签字段路径 | `string[] \| string` | `["name"]` |
76
+ | dataAttr | 数据字段路径 | `string[] \| string` | `["data", "records"]` |
77
+
78
+ > **重点**: `pickerType` 必须是平台配置过的类型,否则需要手动配置 `listUrl`、`query`、`columns` 等参数。
79
+
80
+ ---
81
+
82
+ ## Events 事件
83
+
84
+ | 事件名 | 说明 | 回调参数 |
85
+ | ----------------- | -------------- | ------------------------------------- |
86
+ | update:modelValue | v-model 更新 | `(value: string \| string[]) => void` |
87
+ | change | 选择变化时触发 | `() => void` |
88
+ | ok | 确认选择时触发 | `() => void` |
89
+ | clear | 清空时触发 | `() => void` |
90
+
91
+ ---
92
+
93
+ ## 常见场景
94
+
95
+ ### 场景 1:选择关联客户
96
+
97
+ ```vue
98
+ <jh-picker v-model="form.customerId" picker-type="customer" />
99
+ ```
100
+
101
+ ---
102
+
103
+ ### 场景 2:选择关联单据
104
+
105
+ ```vue
106
+ <jh-picker v-model="form.orderId" picker-type="order" />
107
+ ```
108
+
109
+ ---
110
+
111
+ ### 场景 3:多选关联基础资料
112
+
113
+ ```vue
114
+ <jh-picker v-model="form.materialIds" picker-type="material" multiple />
115
+ ```
116
+
117
+ ---
118
+
119
+ ### 场景 4:详情页展示(配合 jh-text)
120
+
121
+ ```vue
122
+ <jh-text :value="detail.customerName" />
123
+ ```
124
+
125
+ > ⚠️ `jh-picker` 仅负责选择,展示请使用文本组件
126
+
127
+ ---
128
+
129
+ ## 与手动实现对比
130
+
131
+ ### 使用 jh-picker(推荐)
132
+
133
+ ```vue
134
+ <jh-picker v-model="form.customerId" picker-type="customer" />
135
+ ```
136
+
137
+ ### 手动实现(不推荐)
138
+
139
+ ```vue
140
+ <el-input v-model="form.customerName" @click="openDialog" readonly />
141
+ ```
142
+
143
+ ❌ 需要自己实现弹窗
144
+ ❌ 需要处理列表查询
145
+ ❌ 需要维护回填逻辑
146
+
147
+ ---
148
+
149
+ ## 最佳实践
150
+
151
+ ### 1️⃣ pickerType 必须语义清晰
152
+
153
+ ```vue
154
+ <jh-picker picker-type="customer" />
155
+ <jh-picker picker-type="product" />
156
+ ```
157
+
158
+ 确保不同业务类型对应不同选择器配置
159
+
160
+ ---
161
+
162
+ ### 2️⃣ 编辑 & 展示分离
163
+
164
+ | 场景 | 编辑 | 展示 |
165
+ | -------- | --------- | ------------------ |
166
+ | 关联数据 | jh-picker | jh-text / 普通文本 |
167
+
168
+ ---
169
+
170
+ ### 3️⃣ 多选返回值说明
171
+
172
+ ```ts
173
+ // 单选
174
+ customerId: "c001";
175
+
176
+ // 多选
177
+ productIds: ["p001", "p002"];
178
+ ```
179
+
180
+ ---
181
+
182
+ ## 注意事项
183
+
184
+ 1. **pickerType 由平台统一配置**
185
+ - 不可随意填写
186
+ - 必须是平台已支持的类型
187
+
188
+ 2. **组件仅返回关联 ID**
189
+ - 其他字段需自行处理或由后端返回
190
+
191
+ 3. **多选注意字段类型**
192
+ - 必须使用数组接收
193
+
194
+ ---
195
+
196
+ ## 🎯 真实项目示例
197
+
198
+ ### 示例 1:销售订单选择客户
199
+
200
+ ```vue
201
+ <jh-picker v-model="form.customerId" picker-type="customer" />
202
+ ```
203
+
204
+ ### 示例 2:采购单选择商品
205
+
206
+ ```vue
207
+ <jh-picker v-model="form.productIds" picker-type="product" multiple />
208
+ ```
209
+
210
+ ---
211
+
212
+ ## 🚀 快速开始
213
+
214
+ 1. 确定业务类型(pickerType)
215
+ 2. 使用 v-model 绑定 ID
216
+ 3. 展示统一使用文本组件
217
+
218
+ **推荐作为平台统一的通用关联选择组件使用!**