@agile-team/wl-skills-kit 2.3.0 → 2.3.1

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 (93) hide show
  1. package/CHANGELOG.md +33 -63
  2. package/README.md +15 -148
  3. package/bin/wl-skills.js +2 -100
  4. package/files/.github/guides/README.md +13 -13
  5. package/files/.github/guides/architecture.md +555 -576
  6. package/files/.github/guides/usage.md +176 -176
  7. package/files/.github/reports/README.md +65 -65
  8. package/files/.github/reports/SYS_DICT_INFO.md +50 -50
  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 +376 -376
  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/sync/menu-sync/SKILL.md +263 -263
  48. package/files/.github/skills/sync/menu-sync/USAGE.md +104 -104
  49. package/files/.github/skills/sync/menu-sync/env/env.local.json +7 -7
  50. package/files/.github/skills/sync/menu-sync/env/guide.md +99 -99
  51. package/files/.github/skills/sync/permission-sync/SKILL.draft.md +91 -91
  52. package/files/.github/standards/01-toolchain.md +57 -57
  53. package/files/.github/standards/02-code-structure.md +111 -111
  54. package/files/.github/standards/03-comments.md +53 -53
  55. package/files/.github/standards/04-coding-basics.md +33 -33
  56. package/files/.github/standards/05-logging.md +38 -38
  57. package/files/.github/standards/06-security.md +44 -44
  58. package/files/.github/standards/07-config.md +52 -52
  59. package/files/.github/standards/08-git.md +60 -60
  60. package/files/.github/standards/09-typescript.md +71 -71
  61. package/files/.github/standards/10-pinia.md +57 -57
  62. package/files/.github/standards/11-form-validation.md +81 -81
  63. package/files/.github/standards/12-base-table.md +153 -153
  64. package/files/.github/standards/13-platform-components.md +123 -123
  65. package/files/.github/standards/index.md +89 -89
  66. package/files/demo/produce/aiflow/mmwr-customer-apply-add/api.md +1 -1
  67. package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/data.ts +196 -196
  68. package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/index.scss +150 -150
  69. package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/index.vue +79 -79
  70. package/files/docs/jh-date-range.md +257 -257
  71. package/files/docs/jh-date.md +222 -222
  72. package/files/docs/jh-dept-picker.md +190 -190
  73. package/files/docs/jh-drag-row.md +590 -590
  74. package/files/docs/jh-file-upload.md +216 -216
  75. package/files/docs/jh-picker.md +218 -218
  76. package/files/docs/jh-select.md +148 -148
  77. package/files/docs/jh-text.md +248 -248
  78. package/files/docs/jh-user-picker.md +197 -197
  79. package/files/docs/request.md +24 -9
  80. package/files/src/components/global/C_RightToolbar/data.ts +228 -0
  81. package/files/src/components/global/C_RightToolbar/index.scss +44 -0
  82. package/files/src/components/global/C_RightToolbar/index.vue +34 -336
  83. package/files/src/components/global/C_Splitter/index.scss +61 -0
  84. package/files/src/components/global/C_Splitter/index.vue +2 -64
  85. package/files/src/components/global/C_SvgIcon/index.scss +15 -0
  86. package/files/src/components/global/C_SvgIcon/index.vue +20 -50
  87. package/files/src/components/global/C_TagStatus/index.scss +20 -0
  88. package/files/src/components/global/C_TagStatus/index.vue +1 -22
  89. package/files/src/components/global/C_Tree/data.ts +61 -0
  90. package/files/src/components/global/C_Tree/index.vue +12 -53
  91. package/files/src/components/local/c_listModal/index.scss +4 -0
  92. package/files/src/components/local/c_listModal/index.vue +1 -1
  93. package/package.json +5 -9
@@ -1,216 +1,216 @@
1
- # jh-file-upload - 文件上传组件
2
-
3
- > 平台统一的文件上传组件,已集成平台文件系统,支持上传、回显、下载等能力,只需提供业务关联信息即可使用
4
-
5
- ## 📦 组件位置
6
-
7
- ```ts
8
- import "@jhlc/common-core";
9
- ```
10
-
11
- 组件已全局注册,可直接在模板中使用 `<jh-file-upload />`。
12
-
13
- ---
14
-
15
- ## 基本用法
16
-
17
- ### 1️⃣ 关联业务上传(最常用)
18
-
19
- ```vue
20
- <template>
21
- <jh-file-upload relative-type="order" :relative-id="form.id" />
22
- </template>
23
-
24
- <script setup lang="ts">
25
- import { ref } from "vue";
26
-
27
- const form = ref({
28
- id: "order_001"
29
- });
30
- </script>
31
- ```
32
-
33
- > 上传的文件将自动关联到对应业务数据,无需手动处理上传接口
34
-
35
- ---
36
-
37
- ### 2️⃣ 表单中使用(新增 / 编辑)
38
-
39
- ```vue
40
- <jh-file-upload
41
- relative-type="contract"
42
- :relative-id="form.id"
43
- v-model="form.files"
44
- />
45
- ```
46
-
47
- ---
48
-
49
- ## Props 属性
50
-
51
- | 参数 | 说明 | 类型 | 默认值 |
52
- | -------------------- | ------------------ | ------------------------------------------ | ----------- |
53
- | modelValue / v-model | 文件列表 | `FileItem[] \| string` | `[]` |
54
- | relativeType | 业务类型标识 | `string` | - |
55
- | relativeId | 业务主键ID | `string \| number` | - |
56
- | limit | 最大上传数量 | `number` | `10` |
57
- | disabled | 是否禁用 | `boolean` | `false` |
58
- | readonly | 是否只读 | `boolean` | `false` |
59
- | listType | 文件列表类型 | `"picture" \| "picture-card" \| "no-list"` | `"picture"` |
60
- | accept | 接受的文件类型 | `string` | - |
61
- | fileSizeLimit | 文件大小限制 | `string` | - |
62
- | drag | 是否支持拖拽上传 | `boolean` | `true` |
63
- | multiple | 是否支持多选 | `boolean` | `true` |
64
- | autoUpload | 是否自动上传 | `boolean` | `false` |
65
- | addable | 是否允许添加 | `boolean` | `true` |
66
- | deletable | 是否允许删除 | `boolean` | `true` |
67
- | downloadable | 是否允许下载 | `boolean` | `true` |
68
- | uploadUrl | 自定义上传地址 | `string` | - |
69
- | listUrl | 自定义列表查询地址 | `string` | - |
70
- | removeUrl | 自定义删除地址 | `string` | - |
71
-
72
- > **提示**: 默认使用平台文件系统,无需配置 `uploadUrl` 等参数。
73
-
74
- ---
75
-
76
- ## FileItem 数据结构
77
-
78
- ```ts
79
- interface FileItem {
80
- id: string;
81
- name: string;
82
- url: string;
83
- }
84
- ```
85
-
86
- ---
87
-
88
- ## Events 事件
89
-
90
- | 事件名 | 说明 | 回调参数 |
91
- | ----------------- | ---------------- | --------------------------------------- |
92
- | update:modelValue | v-model 更新 | `(value: FileItem[] \| string) => void` |
93
- | success | 文件上传成功 | `() => void` |
94
- | failed | 文件上传失败 | `() => void` |
95
- | remove | 文件删除 | `() => void` |
96
- | exceed | 超出文件数量限制 | `() => void` |
97
-
98
- ---
99
-
100
- ## 常见场景
101
-
102
- ### 场景 1:订单附件上传
103
-
104
- ```vue
105
- <jh-file-upload relative-type="order" :relative-id="orderId" />
106
- ```
107
-
108
- ---
109
-
110
- ### 场景 2:编辑页文件回显
111
-
112
- ```vue
113
- <jh-file-upload
114
- relative-type="order"
115
- :relative-id="form.id"
116
- v-model="form.files"
117
- />
118
- ```
119
-
120
- ---
121
-
122
- ### 场景 3:详情页只读展示
123
-
124
- ```vue
125
- <jh-file-upload relative-type="order" :relative-id="detail.id" readonly />
126
- ```
127
-
128
- ---
129
-
130
- ## 与手动实现对比
131
-
132
- ### 使用 jh-file-upload(推荐)
133
-
134
- ```vue
135
- <jh-file-upload relative-type="order" :relative-id="id" />
136
- ```
137
-
138
- ### 手动实现(不推荐)
139
-
140
- ```vue
141
- <el-upload action="/api/upload" :on-success="handleSuccess" />
142
- ```
143
-
144
- ❌ 需要自己实现上传接口
145
- ❌ 需要维护文件关联关系
146
- ❌ 回显逻辑复杂
147
-
148
- ---
149
-
150
- ## 最佳实践
151
-
152
- ### 1️⃣ 始终使用 relativeType + relativeId
153
-
154
- ```vue
155
- <jh-file-upload relative-type="order" :relative-id="form.id" />
156
- ```
157
-
158
- 确保文件与业务数据正确关联
159
-
160
- ---
161
-
162
- ### 2️⃣ 新增页与编辑页区别
163
-
164
- - **新增页**:业务 ID 生成后再显示组件
165
- - **编辑页**:直接传入已有 ID,自动回显
166
-
167
- ---
168
-
169
- ### 3️⃣ 只读与编辑分离
170
-
171
- ```vue
172
- <!-- 编辑 -->
173
- <jh-file-upload ... />
174
-
175
- <!-- 详情 -->
176
- <jh-file-upload ... readonly />
177
- ```
178
-
179
- ---
180
-
181
- ## 注意事项
182
-
183
- 1. **无需手动处理上传接口**
184
- - 上传、下载、回显均由组件内部完成
185
-
186
- 2. **relativeId 必须真实存在**
187
- - 否则文件无法正确关联
188
-
189
- 3. **文件删除权限**
190
- - 受平台权限控制
191
-
192
- ---
193
-
194
- ## 🎯 真实项目示例
195
-
196
- ### 示例 1:合同附件
197
-
198
- ```vue
199
- <jh-file-upload relative-type="contract" :relative-id="form.id" />
200
- ```
201
-
202
- ### 示例 2:详情页附件
203
-
204
- ```vue
205
- <jh-file-upload relative-type="contract" :relative-id="detail.id" readonly />
206
- ```
207
-
208
- ---
209
-
210
- ## 🚀 快速开始
211
-
212
- 1. 传入 `relativeType`
213
- 2. 传入业务主键 `relativeId`
214
- 3. 其他逻辑无需关心
215
-
216
- **推荐作为平台统一的文件上传组件使用!**
1
+ # jh-file-upload - 文件上传组件
2
+
3
+ > 平台统一的文件上传组件,已集成平台文件系统,支持上传、回显、下载等能力,只需提供业务关联信息即可使用
4
+
5
+ ## 📦 组件位置
6
+
7
+ ```ts
8
+ import "@jhlc/common-core";
9
+ ```
10
+
11
+ 组件已全局注册,可直接在模板中使用 `<jh-file-upload />`。
12
+
13
+ ---
14
+
15
+ ## 基本用法
16
+
17
+ ### 1️⃣ 关联业务上传(最常用)
18
+
19
+ ```vue
20
+ <template>
21
+ <jh-file-upload relative-type="order" :relative-id="form.id" />
22
+ </template>
23
+
24
+ <script setup lang="ts">
25
+ import { ref } from "vue";
26
+
27
+ const form = ref({
28
+ id: "order_001"
29
+ });
30
+ </script>
31
+ ```
32
+
33
+ > 上传的文件将自动关联到对应业务数据,无需手动处理上传接口
34
+
35
+ ---
36
+
37
+ ### 2️⃣ 表单中使用(新增 / 编辑)
38
+
39
+ ```vue
40
+ <jh-file-upload
41
+ relative-type="contract"
42
+ :relative-id="form.id"
43
+ v-model="form.files"
44
+ />
45
+ ```
46
+
47
+ ---
48
+
49
+ ## Props 属性
50
+
51
+ | 参数 | 说明 | 类型 | 默认值 |
52
+ | -------------------- | ------------------ | ------------------------------------------ | ----------- |
53
+ | modelValue / v-model | 文件列表 | `FileItem[] \| string` | `[]` |
54
+ | relativeType | 业务类型标识 | `string` | - |
55
+ | relativeId | 业务主键ID | `string \| number` | - |
56
+ | limit | 最大上传数量 | `number` | `10` |
57
+ | disabled | 是否禁用 | `boolean` | `false` |
58
+ | readonly | 是否只读 | `boolean` | `false` |
59
+ | listType | 文件列表类型 | `"picture" \| "picture-card" \| "no-list"` | `"picture"` |
60
+ | accept | 接受的文件类型 | `string` | - |
61
+ | fileSizeLimit | 文件大小限制 | `string` | - |
62
+ | drag | 是否支持拖拽上传 | `boolean` | `true` |
63
+ | multiple | 是否支持多选 | `boolean` | `true` |
64
+ | autoUpload | 是否自动上传 | `boolean` | `false` |
65
+ | addable | 是否允许添加 | `boolean` | `true` |
66
+ | deletable | 是否允许删除 | `boolean` | `true` |
67
+ | downloadable | 是否允许下载 | `boolean` | `true` |
68
+ | uploadUrl | 自定义上传地址 | `string` | - |
69
+ | listUrl | 自定义列表查询地址 | `string` | - |
70
+ | removeUrl | 自定义删除地址 | `string` | - |
71
+
72
+ > **提示**: 默认使用平台文件系统,无需配置 `uploadUrl` 等参数。
73
+
74
+ ---
75
+
76
+ ## FileItem 数据结构
77
+
78
+ ```ts
79
+ interface FileItem {
80
+ id: string;
81
+ name: string;
82
+ url: string;
83
+ }
84
+ ```
85
+
86
+ ---
87
+
88
+ ## Events 事件
89
+
90
+ | 事件名 | 说明 | 回调参数 |
91
+ | ----------------- | ---------------- | --------------------------------------- |
92
+ | update:modelValue | v-model 更新 | `(value: FileItem[] \| string) => void` |
93
+ | success | 文件上传成功 | `() => void` |
94
+ | failed | 文件上传失败 | `() => void` |
95
+ | remove | 文件删除 | `() => void` |
96
+ | exceed | 超出文件数量限制 | `() => void` |
97
+
98
+ ---
99
+
100
+ ## 常见场景
101
+
102
+ ### 场景 1:订单附件上传
103
+
104
+ ```vue
105
+ <jh-file-upload relative-type="order" :relative-id="orderId" />
106
+ ```
107
+
108
+ ---
109
+
110
+ ### 场景 2:编辑页文件回显
111
+
112
+ ```vue
113
+ <jh-file-upload
114
+ relative-type="order"
115
+ :relative-id="form.id"
116
+ v-model="form.files"
117
+ />
118
+ ```
119
+
120
+ ---
121
+
122
+ ### 场景 3:详情页只读展示
123
+
124
+ ```vue
125
+ <jh-file-upload relative-type="order" :relative-id="detail.id" readonly />
126
+ ```
127
+
128
+ ---
129
+
130
+ ## 与手动实现对比
131
+
132
+ ### 使用 jh-file-upload(推荐)
133
+
134
+ ```vue
135
+ <jh-file-upload relative-type="order" :relative-id="id" />
136
+ ```
137
+
138
+ ### 手动实现(不推荐)
139
+
140
+ ```vue
141
+ <el-upload action="/api/upload" :on-success="handleSuccess" />
142
+ ```
143
+
144
+ ❌ 需要自己实现上传接口
145
+ ❌ 需要维护文件关联关系
146
+ ❌ 回显逻辑复杂
147
+
148
+ ---
149
+
150
+ ## 最佳实践
151
+
152
+ ### 1️⃣ 始终使用 relativeType + relativeId
153
+
154
+ ```vue
155
+ <jh-file-upload relative-type="order" :relative-id="form.id" />
156
+ ```
157
+
158
+ 确保文件与业务数据正确关联
159
+
160
+ ---
161
+
162
+ ### 2️⃣ 新增页与编辑页区别
163
+
164
+ - **新增页**:业务 ID 生成后再显示组件
165
+ - **编辑页**:直接传入已有 ID,自动回显
166
+
167
+ ---
168
+
169
+ ### 3️⃣ 只读与编辑分离
170
+
171
+ ```vue
172
+ <!-- 编辑 -->
173
+ <jh-file-upload ... />
174
+
175
+ <!-- 详情 -->
176
+ <jh-file-upload ... readonly />
177
+ ```
178
+
179
+ ---
180
+
181
+ ## 注意事项
182
+
183
+ 1. **无需手动处理上传接口**
184
+ - 上传、下载、回显均由组件内部完成
185
+
186
+ 2. **relativeId 必须真实存在**
187
+ - 否则文件无法正确关联
188
+
189
+ 3. **文件删除权限**
190
+ - 受平台权限控制
191
+
192
+ ---
193
+
194
+ ## 🎯 真实项目示例
195
+
196
+ ### 示例 1:合同附件
197
+
198
+ ```vue
199
+ <jh-file-upload relative-type="contract" :relative-id="form.id" />
200
+ ```
201
+
202
+ ### 示例 2:详情页附件
203
+
204
+ ```vue
205
+ <jh-file-upload relative-type="contract" :relative-id="detail.id" readonly />
206
+ ```
207
+
208
+ ---
209
+
210
+ ## 🚀 快速开始
211
+
212
+ 1. 传入 `relativeType`
213
+ 2. 传入业务主键 `relativeId`
214
+ 3. 其他逻辑无需关心
215
+
216
+ **推荐作为平台统一的文件上传组件使用!**