@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,148 +1,148 @@
1
- # jh-select - 字典下拉选择组件
2
-
3
- > 集成平台数据字典的下拉选择组件,只需传入字典名称即可自动加载选项,统一字典使用方式
4
-
5
- ## 📦 组件位置
6
-
7
- ```ts
8
- import "@jhlc/common-core";
9
- ```
10
-
11
- 组件已全局注册,可直接在模板中使用 `<jh-select />`。
12
-
13
- ## 基本用法
14
-
15
- ### 根据字典名称加载
16
-
17
- ```vue
18
- <template>
19
- <jh-select
20
- v-model="form.status"
21
- dict="order_status"
22
- placeholder="请选择订单状态"
23
- clearable
24
- />
25
- </template>
26
-
27
- <script setup lang="ts">
28
- import { ref } from "vue";
29
-
30
- const form = ref({
31
- status: ""
32
- });
33
- </script>
34
- ```
35
-
36
- ## Props 属性
37
-
38
- | 参数 | 说明 | 类型 | 默认值 |
39
- | -------------------- | ------------------------- | -------------------------------------------------------- | ---------- |
40
- | modelValue / v-model | 绑定值 | `string \| number \| Array<string \| number> \| boolean` | - |
41
- | dict | 字典名称(平台字典 code) | `string` | - |
42
- | items | 静态数据选项 | `Array<{label: string, value: any}>` | `[]` |
43
- | placeholder | 占位提示 | `string` | `"请选择"` |
44
- | clearable | 是否可清空 | `boolean` | `true` |
45
- | disabled | 是否禁用 | `boolean` | `false` |
46
- | multiple | 是否多选 | `boolean` | `false` |
47
- | filterable | 是否可搜索 | `boolean` | `false` |
48
- | datasourceType | 数据源类型 | `"static" \| "interface"` | `"static"` |
49
- | multiDataFormat | 多选时的数据格式 | `"string" \| "array"` | `"array"` |
50
- | collapseTag | 多选时是否折叠 Tag | `boolean` | `false` |
51
- | teleported | 是否将下拉面板插入 body | `boolean` | `true` |
52
-
53
- > **重点**: 当 `dict` 属性存在时,组件会自动加载对应字典数据,无需手动设置 `items`。
54
-
55
- ## Events 事件
56
-
57
- | 事件名 | 说明 | 回调参数 |
58
- | ----------------- | ------------ | ----------------- |
59
- | change | 选中值变化 | `(value) => void` |
60
- | update:modelValue | v-model 更新 | `(value) => void` |
61
-
62
- ## 常见场景
63
-
64
- ### 场景 1:列表查询条件
65
-
66
- ```vue
67
- <jh-select v-model="query.status" dict="order_status" placeholder="订单状态" />
68
- ```
69
-
70
- ### 场景 2:表单编辑
71
-
72
- ```vue
73
- <jh-select v-model="form.type" dict="order_type" :disabled="isView" />
74
- ```
75
-
76
- ### 场景 3:多选字典
77
-
78
- ```vue
79
- <jh-select v-model="form.tags" dict="order_tag" multiple />
80
- ```
81
-
82
- ### 场景 4:BaseQuery 配置式用法(推荐)
83
-
84
- ```ts
85
- // data.ts 查询项配置
86
- export const queryItemsConfig: BaseQueryItemDesc<any>[] = [
87
- {
88
- name: "orderStatus",
89
- label: "操作类型",
90
- placeholder: "请选择操作类型",
91
- component: () => {
92
- return {
93
- tag: "jh-select",
94
- // 方式一:静态数据
95
- items: [
96
- { label: "是", value: 1 },
97
- { label: "否", value: 0 }
98
- ]
99
- };
100
- }
101
- },
102
- {
103
- name: "status",
104
- label: "状态",
105
- logicType: BusLogicDataType.dict,
106
- logicValue: "order_status" // 字典 code
107
- // 方式二:使用字典数据(会自动加载)
108
- }
109
- ];
110
- ```
111
-
112
- ### 场景 5:静态 items 方式
113
-
114
- ```vue
115
- <jh-select
116
- v-model="form.gender"
117
- :items="[
118
- { label: '男', value: 1 },
119
- { label: '女', value: 2 }
120
- ]"
121
- placeholder="请选择性别"
122
- />
123
- ```
124
-
125
- ---
126
-
127
- ## 最佳实践
128
-
129
- 1. **始终使用 dict 属性**
130
- - 不要手动写 options
131
- - 保证字典来源统一
132
-
133
- 2. **配合 jh-text 使用**
134
- - 列表展示用 `jh-text`
135
- - 表单编辑用 `jh-select`
136
-
137
- 3. **字典值以字符串为主**
138
- - 避免 number/string 混用
139
-
140
- ## 注意事项
141
-
142
- - 字典数据来自平台缓存
143
- - 字典名称必须是平台已配置的 code
144
- - 多选时返回数组
145
-
146
- ---
147
-
148
- ✅ **推荐作为平台统一的字典下拉组件使用**
1
+ # jh-select - 字典下拉选择组件
2
+
3
+ > 集成平台数据字典的下拉选择组件,只需传入字典名称即可自动加载选项,统一字典使用方式
4
+
5
+ ## 📦 组件位置
6
+
7
+ ```ts
8
+ import "@jhlc/common-core";
9
+ ```
10
+
11
+ 组件已全局注册,可直接在模板中使用 `<jh-select />`。
12
+
13
+ ## 基本用法
14
+
15
+ ### 根据字典名称加载
16
+
17
+ ```vue
18
+ <template>
19
+ <jh-select
20
+ v-model="form.status"
21
+ dict="order_status"
22
+ placeholder="请选择订单状态"
23
+ clearable
24
+ />
25
+ </template>
26
+
27
+ <script setup lang="ts">
28
+ import { ref } from "vue";
29
+
30
+ const form = ref({
31
+ status: ""
32
+ });
33
+ </script>
34
+ ```
35
+
36
+ ## Props 属性
37
+
38
+ | 参数 | 说明 | 类型 | 默认值 |
39
+ | -------------------- | ------------------------- | -------------------------------------------------------- | ---------- |
40
+ | modelValue / v-model | 绑定值 | `string \| number \| Array<string \| number> \| boolean` | - |
41
+ | dict | 字典名称(平台字典 code) | `string` | - |
42
+ | items | 静态数据选项 | `Array<{label: string, value: any}>` | `[]` |
43
+ | placeholder | 占位提示 | `string` | `"请选择"` |
44
+ | clearable | 是否可清空 | `boolean` | `true` |
45
+ | disabled | 是否禁用 | `boolean` | `false` |
46
+ | multiple | 是否多选 | `boolean` | `false` |
47
+ | filterable | 是否可搜索 | `boolean` | `false` |
48
+ | datasourceType | 数据源类型 | `"static" \| "interface"` | `"static"` |
49
+ | multiDataFormat | 多选时的数据格式 | `"string" \| "array"` | `"array"` |
50
+ | collapseTag | 多选时是否折叠 Tag | `boolean` | `false` |
51
+ | teleported | 是否将下拉面板插入 body | `boolean` | `true` |
52
+
53
+ > **重点**: 当 `dict` 属性存在时,组件会自动加载对应字典数据,无需手动设置 `items`。
54
+
55
+ ## Events 事件
56
+
57
+ | 事件名 | 说明 | 回调参数 |
58
+ | ----------------- | ------------ | ----------------- |
59
+ | change | 选中值变化 | `(value) => void` |
60
+ | update:modelValue | v-model 更新 | `(value) => void` |
61
+
62
+ ## 常见场景
63
+
64
+ ### 场景 1:列表查询条件
65
+
66
+ ```vue
67
+ <jh-select v-model="query.status" dict="order_status" placeholder="订单状态" />
68
+ ```
69
+
70
+ ### 场景 2:表单编辑
71
+
72
+ ```vue
73
+ <jh-select v-model="form.type" dict="order_type" :disabled="isView" />
74
+ ```
75
+
76
+ ### 场景 3:多选字典
77
+
78
+ ```vue
79
+ <jh-select v-model="form.tags" dict="order_tag" multiple />
80
+ ```
81
+
82
+ ### 场景 4:BaseQuery 配置式用法(推荐)
83
+
84
+ ```ts
85
+ // data.ts 查询项配置
86
+ export const queryItemsConfig: BaseQueryItemDesc<any>[] = [
87
+ {
88
+ name: "orderStatus",
89
+ label: "操作类型",
90
+ placeholder: "请选择操作类型",
91
+ component: () => {
92
+ return {
93
+ tag: "jh-select",
94
+ // 方式一:静态数据
95
+ items: [
96
+ { label: "是", value: 1 },
97
+ { label: "否", value: 0 }
98
+ ]
99
+ };
100
+ }
101
+ },
102
+ {
103
+ name: "status",
104
+ label: "状态",
105
+ logicType: BusLogicDataType.dict,
106
+ logicValue: "order_status" // 字典 code
107
+ // 方式二:使用字典数据(会自动加载)
108
+ }
109
+ ];
110
+ ```
111
+
112
+ ### 场景 5:静态 items 方式
113
+
114
+ ```vue
115
+ <jh-select
116
+ v-model="form.gender"
117
+ :items="[
118
+ { label: '男', value: 1 },
119
+ { label: '女', value: 2 }
120
+ ]"
121
+ placeholder="请选择性别"
122
+ />
123
+ ```
124
+
125
+ ---
126
+
127
+ ## 最佳实践
128
+
129
+ 1. **始终使用 dict 属性**
130
+ - 不要手动写 options
131
+ - 保证字典来源统一
132
+
133
+ 2. **配合 jh-text 使用**
134
+ - 列表展示用 `jh-text`
135
+ - 表单编辑用 `jh-select`
136
+
137
+ 3. **字典值以字符串为主**
138
+ - 避免 number/string 混用
139
+
140
+ ## 注意事项
141
+
142
+ - 字典数据来自平台缓存
143
+ - 字典名称必须是平台已配置的 code
144
+ - 多选时返回数组
145
+
146
+ ---
147
+
148
+ ✅ **推荐作为平台统一的字典下拉组件使用**