sohelp-eleplus 1.1.27 → 1.1.28

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 (202) hide show
  1. package/components.js +1 -0
  2. package/package.json +2 -2
  3. package/sohelp-ace-editor/README.md +32 -42
  4. package/sohelp-ace-editor/index.vue +166 -156
  5. package/sohelp-api-doc/README.md +36 -0
  6. package/sohelp-api-doc/index.vue +160 -0
  7. package/sohelp-application-select/README.md +9 -7
  8. package/sohelp-application-select/index.vue +10 -13
  9. package/sohelp-autocode/README.md +14 -26
  10. package/sohelp-calendar-view/README.md +9 -7
  11. package/sohelp-calendar-view/index.vue +10 -9
  12. package/sohelp-card/README.md +15 -17
  13. package/sohelp-card/index.vue +1 -1
  14. package/sohelp-card-view/README.md +9 -7
  15. package/sohelp-card-view/index.vue +10 -9
  16. package/sohelp-condition/README.md +29 -49
  17. package/sohelp-condition/index.vue +2 -1
  18. package/sohelp-country-select/README.md +15 -123
  19. package/sohelp-cry-input/README.md +19 -195
  20. package/sohelp-cry-input/index.vue +5 -1
  21. package/sohelp-date/README.md +12 -15
  22. package/sohelp-datetime/README.md +15 -17
  23. package/sohelp-datetime-picker/README.md +18 -18
  24. package/sohelp-datetime-picker/index.vue +11 -4
  25. package/sohelp-datetime-range/README.md +20 -23
  26. package/sohelp-demo-block/README.md +43 -0
  27. package/sohelp-demo-block/index.vue +229 -0
  28. package/sohelp-dict/README.md +28 -23
  29. package/sohelp-dict/index.vue +17 -17
  30. package/sohelp-drawer/README.md +28 -26
  31. package/sohelp-drop-card/README.md +29 -28
  32. package/sohelp-drop-card/index.vue +0 -1
  33. package/sohelp-dyn-select/README.md +31 -16
  34. package/sohelp-dyn-select/index.vue +65 -67
  35. package/sohelp-dyn-tree/README.md +26 -20
  36. package/sohelp-dyn-tree/index.vue +2 -2
  37. package/sohelp-dyn-tree-select/README.md +28 -19
  38. package/sohelp-dyn-tree-select/index.vue +23 -7
  39. package/sohelp-entity-form/README.md +65 -30
  40. package/sohelp-entity-form/index.vue +3 -2
  41. package/sohelp-entity-grid/README.md +13 -11
  42. package/sohelp-entity-grid/index.vue +1 -1
  43. package/sohelp-file-upload/README.md +25 -27
  44. package/sohelp-file-upload/index.vue +1 -1
  45. package/sohelp-filter-scheme/README.md +34 -30
  46. package/sohelp-filter-scheme/index.vue +2 -2
  47. package/sohelp-grid/README.md +52 -33
  48. package/sohelp-grid/index.vue +2217 -2210
  49. package/sohelp-grid/js/SohelpGridConfig.js +3 -3
  50. package/sohelp-grid/js/useSohelpGridConfig.js +641 -642
  51. package/sohelp-grid-select/README.md +32 -27
  52. package/sohelp-grid-select/index.vue +6 -5
  53. package/sohelp-grid-view/README.md +51 -22
  54. package/sohelp-grid-view-select/README.md +33 -25
  55. package/sohelp-grid-view-select/index.vue +2 -1
  56. package/sohelp-group-view/README.md +14 -4
  57. package/sohelp-group-view/index.vue +10 -9
  58. package/sohelp-icon-select/README.md +14 -12
  59. package/sohelp-image-upload/README.md +27 -27
  60. package/sohelp-image-upload/index.vue +2 -2
  61. package/sohelp-import/README.md +25 -24
  62. package/sohelp-input/README.md +27 -11
  63. package/sohelp-input/index.vue +15 -2
  64. package/sohelp-input-tag/README.md +53 -0
  65. package/sohelp-input-tag/index.vue +337 -0
  66. package/sohelp-modal/README.md +42 -16
  67. package/sohelp-modal/index.vue +21 -4
  68. package/sohelp-modal-select/README.md +745 -0
  69. package/sohelp-modal-select/index.vue +705 -0
  70. package/sohelp-module/README.md +24 -13
  71. package/sohelp-number-input/README.md +15 -8
  72. package/sohelp-number-input/index.vue +3 -0
  73. package/sohelp-number-range/README.md +22 -12
  74. package/sohelp-number-range/index.vue +3 -11
  75. package/sohelp-org-modal-select/README.md +47 -0
  76. package/sohelp-org-modal-select/index.vue +411 -0
  77. package/sohelp-org-select/README.md +23 -10
  78. package/sohelp-org-select/index.vue +41 -24
  79. package/sohelp-org-tree/README.md +19 -7
  80. package/sohelp-org-tree/index.vue +1 -2
  81. package/sohelp-org-tree-select/README.md +22 -11
  82. package/sohelp-org-tree-select/index.vue +1 -2
  83. package/sohelp-org-user-tree/README.md +19 -7
  84. package/sohelp-org-user-tree/index.vue +1 -2
  85. package/sohelp-org-user-tree-select/README.md +8 -3
  86. package/sohelp-org-user-tree-select/index.vue +8 -7
  87. package/sohelp-page/README.md +20 -11
  88. package/sohelp-page/index.vue +1 -1
  89. package/sohelp-pagination/README.md +14 -6
  90. package/sohelp-pagination/index.vue +1 -1
  91. package/sohelp-power/README.md +34 -19
  92. package/sohelp-power/index.vue +2 -2
  93. package/sohelp-pro-form/README.md +64 -21
  94. package/sohelp-pro-layout/README.md +10 -4
  95. package/sohelp-pro-layout/index.vue +8 -7
  96. package/sohelp-pro-table/README.md +30 -6
  97. package/sohelp-process/README.md +26 -13
  98. package/sohelp-process/index.vue +6 -6
  99. package/sohelp-rate/README.md +24 -12
  100. package/sohelp-rate/index.vue +5 -1
  101. package/sohelp-relation/README.md +10 -4
  102. package/sohelp-relation/index.vue +8 -7
  103. package/sohelp-relation-modal-select/README.md +41 -0
  104. package/sohelp-relation-modal-select/index.vue +70 -0
  105. package/sohelp-rich-text/README.md +29 -11
  106. package/sohelp-rich-text/index.vue +21 -20
  107. package/sohelp-richtext/README.md +12 -2
  108. package/sohelp-richtext/index.vue +8 -6
  109. package/sohelp-role-modal-select/README.md +45 -0
  110. package/sohelp-role-modal-select/index.vue +111 -0
  111. package/sohelp-role-select/README.md +18 -10
  112. package/sohelp-role-select/index.vue +36 -27
  113. package/sohelp-search/README.md +12 -4
  114. package/sohelp-search/index.vue +2 -2
  115. package/sohelp-search-pro-form/README.md +15 -1
  116. package/sohelp-search-pro-form/index.vue +2 -1
  117. package/sohelp-select/README.md +31 -30
  118. package/sohelp-select/index.vue +79 -84
  119. package/sohelp-split-panel/README.md +17 -18
  120. package/sohelp-switch/README.md +21 -19
  121. package/sohelp-switch/index.vue +34 -33
  122. package/sohelp-table/README.md +35 -27
  123. package/sohelp-table/index.vue +110 -109
  124. package/sohelp-table-select/README.md +55 -0
  125. package/sohelp-tenant-select/README.md +19 -18
  126. package/sohelp-tenant-select/index.vue +105 -109
  127. package/sohelp-text/README.md +16 -10
  128. package/sohelp-text/index.vue +5 -5
  129. package/sohelp-textarea-input/README.md +19 -12
  130. package/sohelp-time/README.md +11 -10
  131. package/sohelp-tree/README.md +24 -19
  132. package/sohelp-tree/index.vue +21 -23
  133. package/sohelp-tree-select/README.md +23 -10
  134. package/sohelp-user-modal-select/README.md +739 -0
  135. package/sohelp-user-modal-select/index.vue +87 -0
  136. package/sohelp-user-select/README.md +26 -15
  137. package/sohelp-user-select/index.vue +6 -2
  138. package/sohelp-user-tag/README.md +5 -7
  139. package/sohelp-user-tag/index.vue +8 -8
  140. package/sohelp-user-tree/README.md +5 -8
  141. package/sohelp-user-tree/index.vue +8 -7
  142. package/sohelp-vform-drawer/README.md +36 -18
  143. package/sohelp-vform-drawer/index.vue +2 -2
  144. package/sohelp-vform-eleplus/README.md +33 -31
  145. package/sohelp-vform-eleplus/index.vue +2 -2
  146. package/sohelp-vform-eleplus/tinymce/langs/zh_CN.js +461 -461
  147. package/sohelp-vform-eleplus/tinymce/langs/zh_TW.js +418 -418
  148. package/sohelp-vform-eleplus/tinymce/skins/content/dark/content.css +72 -72
  149. package/sohelp-vform-eleplus/tinymce/skins/content/dark/content.min.css +7 -7
  150. package/sohelp-vform-eleplus/tinymce/skins/content/default/content.css +67 -67
  151. package/sohelp-vform-eleplus/tinymce/skins/content/default/content.min.css +7 -7
  152. package/sohelp-vform-eleplus/tinymce/skins/content/document/content.css +72 -72
  153. package/sohelp-vform-eleplus/tinymce/skins/content/document/content.min.css +7 -7
  154. package/sohelp-vform-eleplus/tinymce/skins/content/writer/content.css +68 -68
  155. package/sohelp-vform-eleplus/tinymce/skins/content/writer/content.min.css +7 -7
  156. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.css +732 -732
  157. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.inline.css +726 -726
  158. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.inline.min.css +7 -7
  159. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.min.css +7 -7
  160. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.mobile.css +29 -29
  161. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.mobile.min.css +7 -7
  162. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.css +3047 -3047
  163. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.min.css +7 -7
  164. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.mobile.css +673 -673
  165. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.mobile.min.css +7 -7
  166. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.shadowdom.css +37 -37
  167. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.shadowdom.min.css +7 -7
  168. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.css +714 -714
  169. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.inline.css +726 -726
  170. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.inline.min.css +7 -7
  171. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.min.css +7 -7
  172. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.mobile.css +29 -29
  173. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.mobile.min.css +7 -7
  174. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.css +3047 -3047
  175. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.min.css +7 -7
  176. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.mobile.css +673 -673
  177. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +7 -7
  178. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +37 -37
  179. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +7 -7
  180. package/sohelp-vform-modal/README.md +36 -18
  181. package/sohelp-vform-modal/index.vue +2 -2
  182. package/sohelp-vform-select/README.md +9 -7
  183. package/sohelp-vform-select/index.vue +8 -7
  184. package/sohelp-vxe-grid/DefaultGridOptions.js +5 -3
  185. package/sohelp-vxe-grid/DefaultProps.js +0 -1
  186. package/sohelp-vxe-grid/README.md +540 -35
  187. package/sohelp-vxe-grid/SohelpGridConfig.js +8 -6
  188. package/sohelp-vxe-grid/index.vue +141 -94
  189. package/sohelp-vxe-grid-select/README.md +41 -26
  190. package/sohelp-vxe-table/README.md +23 -20
  191. package/sohelp-vxe-table/index.vue +5 -4
  192. package/sohelp-workflow/README.md +21 -17
  193. package/sohelp-workflow/index.vue +25 -22
  194. package/sohelp-workflow-drawer/README.md +41 -28
  195. package/sohelp-workflow-drawer/components/table.vue +158 -158
  196. package/sohelp-workflow-drawer/index.vue +86 -71
  197. package/sohelp-workflow-drawer/js/index.js +15 -13
  198. package/style/index.scss +0 -0
  199. package/utils/safe-eval.js +89 -0
  200. package/sohelp-dyn-select/props.js +0 -67
  201. package/sohelp-user-select/index.vue~ +0 -53
  202. package/sohelp-user-select/props.js +0 -71
@@ -1,38 +1,43 @@
1
- # SohelpGridSelect 表格选择器组件
1
+ # SohelpGridSelect 网格下拉选择器
2
2
 
3
- 结合了输入框和弹窗表格的选择器组件。点击输入框弹出 `SohelpGridView` 选择数据,支持单选和多选,选中结果以 Tag 形式展示。
3
+ 基于 el-select 和 SohelpGridView 封装的下拉网格选择组件。在下拉面板中嵌入数据网格列表,支持单选和多选模式,已选项以 Tag 标签形式展示在输入框中。
4
4
 
5
5
  ## 基础用法
6
6
 
7
- ```html
8
- <sohelp-grid-select
9
- v-model="selectedIds"
10
- :config="gridSelectConfig"
11
- multiple
12
- />
7
+ ```vue
8
+ <template>
9
+ <sohelp-grid-select
10
+ v-model="selectedValue"
11
+ v-model:data="selectedData"
12
+ refid="demo_grid"
13
+ labelField="name"
14
+ valueField="id"
15
+ :multiple="true"
16
+ />
17
+ </template>
18
+
19
+ <script setup>
20
+ import { ref } from 'vue';
21
+ const selectedValue = ref([]);
22
+ const selectedData = ref([]);
23
+ </script>
13
24
  ```
14
25
 
15
26
  ## 属性 (Props)
16
27
 
17
- | 属性名 | 类型 | 默认值 | 说明 |
18
- | modelValue | String/Array | - | 绑定的值(ID ID 数组) |
19
- | data | Array | [] | 选中的完整数据对象数组 |
20
- | config | Object | {} | 配置对象,包含弹窗标题、表格视图编码(viewCode)等 |
21
- | multiple | Boolean | false | 是否多选 |
22
- | valueField | String | 'id' | 值字段名 |
23
- | textField | String | 'name' | 显示文本字段名 |
24
- | disabled | Boolean | false | 是否禁用 |
28
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 |
29
+ | --- | --- | --- | --- | --- |
30
+ | modelValue | String / Array | `[]` | | 绑定值,单选时为字符串,多选时为数组 |
31
+ | data | Array | `[]` | | 已选中的数据对象数组 |
32
+ | refid | String | - | | 网格列表配置ID |
33
+ | labelField | String | `'label'` | | 显示文本对应的字段名 |
34
+ | valueField | String | `'id'` | | 值字段名 |
35
+ | multiple | Boolean | `false` | | 是否允许多选 |
36
+ | url | String | - | 否 | 自定义数据源URL |
25
37
 
26
38
  ## 事件 (Events)
27
39
 
28
- | 事件名 | 说明 | 回调参数 |
29
- | update:modelValue | 更新绑定值 | (value: String/Array) |
30
- | update:data | 更新选中对象数据 | (data: Array) |
31
- | change | 值变化时触发 | (value, data) |
32
-
33
- ## 功能特性
34
-
35
- - **弹窗选择**: 点击弹出 `SohelpGridView` 进行数据选择。
36
- - **回显**: 支持通过 `data` 属性回显已选数据的文本。
37
- - **多选展示**: 多选模式下使用 `el-tag` 展示选中项,支持移除。
38
- - **搜索**: 弹窗内支持完整的表格筛选功能。
40
+ | 事件名 | 回调参数 | 说明 |
41
+ | --- | --- | --- |
42
+ | update:modelValue | (value) | 绑定值更新时触发 |
43
+ | update:data | (data) | 已选数据更新时触发 |
@@ -74,7 +74,7 @@
74
74
  url: String
75
75
  });
76
76
 
77
- const emit = defineEmits(['update:value', 'update:data']);
77
+ const emit = defineEmits(['update:modelValue', 'update:data']);
78
78
 
79
79
  const selectRef = ref(null);
80
80
  const tableRef = ref(null);
@@ -132,7 +132,7 @@
132
132
  const clear = () => {
133
133
  selectedValue.value = [];
134
134
  tableRef.value?.clearRadioRow();
135
- emit('update:value', []);
135
+ emit('update:modelValue', []);
136
136
  close();
137
137
  };
138
138
 
@@ -175,7 +175,8 @@
175
175
  originValue.value = [...arr];
176
176
  selectedValue.value = [...arr];
177
177
  }
178
- }
178
+ },
179
+ { immediate: true }
179
180
  );
180
181
 
181
182
  watch(
@@ -197,7 +198,7 @@
197
198
  </script>
198
199
  <script>
199
200
  export default {
200
- name: 'SohelpGrkdSelect'
201
+ name: 'SohelpGridSelect'
201
202
  };
202
203
  </script>
203
204
  <style lang="scss" scoped>
@@ -228,7 +229,7 @@
228
229
  }
229
230
  }
230
231
 
231
- .sohelp-table-select.hide-placeholder {
232
+ .sohelp-grid-select.hide-placeholder {
232
233
  :deep(.el-select) {
233
234
  .el-select__prefix {
234
235
  flex: 1 1 100%;
@@ -1,34 +1,63 @@
1
- # SohelpGridView 综合表格视图组件
1
+ # SohelpGridView 网格视图
2
2
 
3
- 这是一个组合组件,集成了 `SohelpFilterScheme`(筛选区)和 `SohelpGrid`(表格区),实现了典型的“左侧/顶部筛选 + 右侧/底部表格”的布局模式,并内置了数据加载逻辑。
3
+ 基于 SohelpGrid SohelpFilter 封装的带高级筛选面板的网格视图组件。通过分割面板(ele-split-panel)将筛选区域和数据列表区域组合在一起,支持筛选面板的显示/隐藏、位置切换等功能。
4
4
 
5
5
  ## 基础用法
6
6
 
7
- ```html
8
- <sohelp-grid-view
9
- viewCode="user_list_view"
10
- entityName="SysUser"
11
- />
7
+ ```vue
8
+ <template>
9
+ <sohelp-grid-view ref="gridViewRef" refid="demo_grid" :autoLoad="true" />
10
+ </template>
11
+
12
+ <script setup>
13
+ import { ref } from 'vue';
14
+ const gridViewRef = ref(null);
15
+ </script>
12
16
  ```
13
17
 
14
18
  ## 属性 (Props)
15
19
 
16
- | 属性名 | 类型 | 默认值 | 说明 |
17
- | config | Object | - | 视图配置对象(如果未提供 viewCode,可直接传入配置) |
18
- | viewCode | String | - | 视图编码,用于从后端加载视图配置 |
19
- | entityName | String | - | 实体名称,用于默认的数据请求 |
20
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 |
21
+ | --- | --- | --- | --- | --- |
22
+ | refid | String | `''` | | 网格列表配置ID |
23
+ | autoLoad | Boolean | `true` | | 是否自动加载数据 |
24
+ | filterValue | Object | `{ keywords: '', power: 0, filter: [], scheme: '', sort: '', order: '' }` | 否 | 过滤条件数据 |
20
25
 
21
- ## 公开方法 (Expose)
26
+ ## 双向绑定 (v-model)
27
+
28
+ | 属性名 | 类型 | 说明 |
29
+ | --- | --- | --- |
30
+ | filterValue | Object | 过滤条件数据 |
31
+ | config | Object | 网格配置对象,包含 filter.config 等 |
32
+
33
+ ## 事件 (Events)
22
34
 
23
- - `reload(params)`: 刷新表格数据。
24
- - `getSelectRecords()`: 获取表格选中行。
35
+ | 事件名 | 回调参数 | 说明 |
36
+ | --- | --- | --- |
37
+ | menuRightClick | (config) | 右键菜单点击时触发 |
38
+ | toolbarButtonClick | (config, rows) | 工具栏按钮点击时触发 |
39
+ | operationButtonClick | (config) | 操作列按钮点击时触发 |
40
+ | changeFilterScheme | (schemeValue, filterValue) | 筛选方案变更时触发 |
41
+ | editClosed | (props) | 编辑关闭后触发 |
42
+ | currentColumnChange | (props) | 当前列变化时触发 |
43
+ | checkboxChange | (row, checked, type) | 复选框状态变化时触发 |
44
+ | pageChange | (config) | 分页变更时触发 |
45
+ | radioChange | (config) | 单选变更时触发 |
25
46
 
26
- ## 核心逻辑
47
+ ## 插槽 (Slots)
48
+
49
+ 组件通过动态插槽透传所有插槽到内部 SohelpGrid 组件。
50
+
51
+ ## 公开方法 (Expose)
27
52
 
28
- 1. **配置加载**: 组件挂载时,根据 `viewCode` 调用 `/engine/web/view/read` 获取视图配置(包括筛选配置和表格列配置)。
29
- 2. **数据加载**:
30
- - 监听筛选组件的 `filter` 事件。
31
- - 监听表格组件的 `page-change` 和 `sort-change` 事件。
32
- - 自动组装分页、排序、筛选参数,调用 `/engine/web/entity/findAll` (或其他配置的接口) 加载数据。
33
- 3. **布局**: 支持筛选区和表格区的伸缩布局(SplitPane)。
34
- 4. **状态保存**: 支持保存用户对列宽、筛选条件的个性化设置。
53
+ - `getSelection()` - 获取当前选中的数据
54
+ - `getCrudUpdater()` - 获取 CRUD 更新器
55
+ - `reload(params, callback)` - 重新加载数据
56
+ - `load(params, callback)` - 加载数据
57
+ - `refresh()` - 刷新数据
58
+ - `validate()` - 表格数据校验
59
+ - `setCheckboxRowKey(row, checked)` - 设置复选框选中状态
60
+ - `getCheckboxRecords()` - 获取选中的记录
61
+ - `getCheckboxReserveRecords(isFull)` - 获取保留的记录
62
+ - `getData()` - 获取表格数据
63
+ - `setRadioRowKey(row, checked)` - 设置单选框选中状态
@@ -1,36 +1,44 @@
1
- # SohelpGridViewSelect 表格视图选择器
1
+ # SohelpGridViewSelect 网格弹窗选择器
2
2
 
3
- 基于 `SohelpGridView` 的弹窗选择器组件。通过 `refid` 引用配置,点击按钮弹出表格视图进行数据选择,支持单选和多选。
3
+ 基于 el-input 和 ele-modal 弹窗封装的网格数据选择组件。点击输入框右侧按钮弹出模态窗口,内嵌 SohelpGridView 网格列表进行数据选择,支持单选和多选模式,已选项以 Tag 标签形式展示在输入框前缀中。
4
4
 
5
5
  ## 基础用法
6
6
 
7
- ```html
8
- <sohelp-grid-view-select
9
- v-model="selectedId"
10
- refid="user_view_ref"
11
- />
7
+ ```vue
8
+ <template>
9
+ <sohelp-grid-view-select
10
+ v-model="selectedValue"
11
+ v-model:data="selectedData"
12
+ refid="demo_grid"
13
+ labelField="name"
14
+ valueField="id"
15
+ :multiple="false"
16
+ />
17
+ </template>
18
+
19
+ <script setup>
20
+ import { ref } from 'vue';
21
+ const selectedValue = ref('');
22
+ const selectedData = ref(null);
23
+ </script>
12
24
  ```
13
25
 
14
26
  ## 属性 (Props)
15
27
 
16
- | 属性名 | 类型 | 默认值 | 说明 |
17
- | modelValue | String/Array | [] | 绑定的值(ID ID 数组) |
18
- | refid | String | - | 必填,视图引用 ID,用于加载表格配置 |
19
- | multiple | Boolean | false | 是否多选 |
20
- | data | Object/Array | - | 已选中的数据对象(用于回显) |
21
- | labelField | String | 'label' | 显示文本字段名 |
22
- | valueField | String | 'id' | 值字段名 |
28
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 |
29
+ | --- | --- | --- | --- | --- |
30
+ | modelValue | String / Array | `[]` | | 绑定值,单选时为字符串,多选时为数组 |
31
+ | refid | String | - | | 网格列表配置ID |
32
+ | multiple | Boolean | `false` | | 是否允许多选 |
33
+ | data | Object / Array | - | | 已选中的数据对象或数组 |
34
+ | labelField | String | `'label'` | | 显示文本对应的字段名 |
35
+ | valueField | String | `'id'` | 否 | 值字段名 |
23
36
 
24
37
  ## 事件 (Events)
25
38
 
26
- | 事件名 | 说明 | 回调参数 |
27
- | update:modelValue | 更新绑定值 | (value) |
28
- | update:data | 更新选中数据对象 | (data) |
29
- | confirm | 确认选择时触发 | (rows) |
30
- | show | 弹窗打开时触发 | - |
31
-
32
- ## 功能特性
33
-
34
- - **引用配置**: 通过 `refid` 复用已有的表格视图配置。
35
- - **标签展示**: 选中的数据以标签形式展示在输入框区域,支持移除。
36
- - **弹窗选择**: 集成完整的 `SohelpGridView`,支持筛选、分页等功能。
39
+ | 事件名 | 回调参数 | 说明 |
40
+ | --- | --- | --- |
41
+ | update:modelValue | (value) | 绑定值更新时触发 |
42
+ | update:data | (data) | 已选数据更新时触发 |
43
+ | confirm | (rows) | 用户确认选择时触发,参数为选中的行数据 |
44
+ | show | - | 弹窗打开时触发 |
@@ -94,7 +94,7 @@ const _data = computed(() => {
94
94
  */
95
95
  const handleClose = (tag) => {
96
96
  if(props.multiple) {
97
- props.data.splice(props.data.indexOf(tag), 1);
97
+ emit("update:data", props.data.filter(item => item !== tag));
98
98
  }else{
99
99
  emit("update:modelValue", null);
100
100
  emit("update:data", null);
@@ -115,6 +115,7 @@ const cancel = () => {
115
115
  */
116
116
  const confirm = () => {
117
117
  const rows = tableRef.value.getSelection();
118
+ if (rows.length === 0) return;
118
119
  if (props.multiple) {
119
120
  let _data = [];
120
121
  for (let i = 0; i < rows.length; i++) {
@@ -1,7 +1,17 @@
1
- # SohelpGroupView 分组视图组件
1
+ # SohelpGroupView 分组视图
2
2
 
3
- *当前版本仅为占位组件,功能待完善。*
3
+ 当前版本仅为占位组件,预留用于展示按状态或其他字段分组的视图。
4
4
 
5
- ## 描述
5
+ ## 基础用法
6
6
 
7
- 预留用于展示按状态或其他字段分组的视图组件。
7
+ ```vue
8
+ <template>
9
+ <sohelp-group-view />
10
+ </template>
11
+ ```
12
+
13
+ ## 属性 (Props)
14
+
15
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 |
16
+ | --- | --- | --- | --- | --- |
17
+ | - | - | - | - | 暂无属性 |
@@ -1,11 +1,12 @@
1
- <script setup>
2
-
3
- </script>
4
-
5
1
  <template>
6
- <div>按状态分组视图</div>
2
+ <div class="sohelp-group-view">
3
+ <!-- TODO: 待实现 - 按状态分组视图 -->
4
+ <el-empty description="按状态分组视图 - 待实现" />
5
+ </div>
7
6
  </template>
8
-
9
- <style scoped lang="scss">
10
-
11
- </style>
7
+ <script setup>
8
+ // TODO: 待实现
9
+ </script>
10
+ <script>
11
+ export default { name: 'SohelpGroupView' };
12
+ </script>
@@ -1,21 +1,23 @@
1
1
  # SohelpIconSelect 图标选择器
2
2
 
3
- 支持多种图标库(Element Plus, EleAdminPlus, VxeUI)的图标选择组件,提供可视化预览。
3
+ 基于 `el-select` 封装的图标选择组件,内置 Element PlusEleAdminPlus VxeUI 三个图标库,支持可视化预览、搜索过滤和选中图标前缀展示。
4
4
 
5
5
  ## 基础用法
6
6
 
7
- ```html
8
- <sohelp-icon-select v-model="iconName" />
9
- ```
7
+ ```vue
8
+ <template>
9
+ <sohelp-icon-select v-model="iconName" />
10
+ </template>
10
11
 
11
- ## 属性 (Props)
12
+ <script setup>
13
+ import { ref } from 'vue';
12
14
 
13
- | 属性名 | 类型 | 默认值 | 说明 |
14
- | modelValue | String | - | 选中的图标名称 |
15
+ const iconName = ref('');
16
+ </script>
17
+ ```
15
18
 
16
- ## 功能特性
19
+ ## 属性 (Props)
17
20
 
18
- - **多图库支持**: 内置 Element Plus、EleAdminPlus VxeUI 图标库。
19
- - **可视化预览**: 下拉列表中直接展示图标样式。
20
- - **搜索**: 支持通过图标名称过滤。
21
- - **前缀展示**: 输入框前缀显示当前选中的图标。
21
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 |
22
+ | :--- | :--- | :--- | :--- | :--- |
23
+ | modelValue | String | - | 否 | 选中的图标名称(v-model) |
@@ -1,35 +1,35 @@
1
- # SohelpImageUpload 图片上传组件
1
+ # SohelpImageUpload 图片上传
2
2
 
3
- 基于 `vxe-upload` 定制的图片上传组件,专注于图片处理,支持预览、粘贴上传、多图上传等。
3
+ 基于 `vxe-upload` 封装的图片上传组件(`mode="image"`),支持粘贴上传、图片预览、下载和删除,自动对接后端文件接口。
4
4
 
5
5
  ## 基础用法
6
6
 
7
- ```html
8
- <sohelp-image-upload v-model="imageId" />
7
+ ```vue
8
+ <template>
9
+ <sohelp-image-upload v-model="imageId" v-model:data="imageData" refid="myRefId" ref_id="recordId" ref_type="1" />
10
+ </template>
11
+
12
+ <script setup>
13
+ import { ref } from 'vue';
14
+ const imageId = ref('');
15
+ const imageData = ref([]);
16
+ </script>
9
17
  ```
10
18
 
11
19
  ## 属性 (Props)
12
20
 
13
- | 属性名 | 类型 | 默认值 | 说明 |
14
- | modelValue | String/Array | - | 绑定的图片 ID |
15
- | data | Object/Array | [] | 图片对象数据 |
16
- | readonly | Boolean | false | 是否只读 |
17
- | multiple | Boolean | false | 是否多选 |
18
- | limitCount | Number | 9 | 最大上传数量 |
19
- | limitSize | Number | 10 | 单张图片大小限制 (MB) |
20
- | imageTypes | Array | ['jpg', 'png'...] | 允许的图片类型 |
21
- | imageConfig | Object | {width: 30, height: 26} | 图片显示配置 |
22
-
23
- ## 事件 (Events)
24
-
25
- | 事件名 | 说明 | 回调参数 |
26
- | update:modelValue | 更新绑定 ID | (value) |
27
- | update:data | 更新图片对象数据 | (data) |
28
-
29
- ## 功能特性
30
-
31
- - **图片预览**: 上传后可预览缩略图。
32
- - **粘贴上传**: 支持从剪贴板粘贴图片上传。
33
- - **下载**: 支持下载图片。
34
- - **删除**: 支持删除图片,需二次确认。
35
- - **进度显示**: 显示上传百分比。
21
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 |
22
+ | --- | --- | --- | --- | --- |
23
+ | modelValue (v-model) | String / Array | - | | 图片ID,多图时为数组 |
24
+ | data (v-model:data) | Object / Array | `[]` | | 图片详细数据(含 id 和 filename) |
25
+ | readonly | Boolean | `false` | | 是否只读 |
26
+ | datasource | Function | `() => {}` | | 异步数据源 |
27
+ | multiple | Boolean | `false` | | 是否支持多图片上传 |
28
+ | limitCount | Number | `9` | | 单次上传图片数量限制 |
29
+ | limitSize | Number | `10` | | 单张图片大小限制(MB) |
30
+ | imageTypes | Array | `['jpg','jpeg','png','webp','bmp','gif']` | 否 | 支持的图片格式 |
31
+ | imageConfig | Object | `{ width: 30, height: 26 }` | 否 | 图片缩略图尺寸配置 |
32
+ | moreConfig | Object | `{ maxCount: 1, layout: 'horizontal' }` | 否 | 上传组件额外配置 |
33
+ | refid | String | - | 否 | 业务关联ID |
34
+ | ref_id | String | - | | 引用记录ID |
35
+ | ref_type | String / Number | - | 否 | 引用类型 |
@@ -80,7 +80,7 @@
80
80
  * 支持上传图片的类型
81
81
  */
82
82
  imageTypes: {
83
- type: Object,
83
+ type: Array,
84
84
  default: () => {
85
85
  return ['jpg', 'jpeg', 'png', 'webp', 'bmp', 'gif'];
86
86
  }
@@ -168,7 +168,7 @@
168
168
  if (res.meta.success) {
169
169
  ElMessage.success(res.meta.message);
170
170
  originList.value = originList.value.filter((item) => item.id !== id);
171
- modelValue.value = '';
171
+ modelValue.value = props.multiple ? [] : '';
172
172
  return true;
173
173
  } else {
174
174
  ElMessage.error(res.meta.message);
@@ -1,35 +1,36 @@
1
- # SohelpImport 数据导入组件
1
+ # SohelpImport 数据导入
2
2
 
3
- 提供 Excel 数据导入功能的完整解决方案,包含模板下载、文件上传、数据预览、导入历史管理等功能。
3
+ 基于 `ele-modal` 封装的 Excel 数据导入组件,支持文件上传、数据预览、模板下载、导入历史查看和恢复。
4
4
 
5
5
  ## 基础用法
6
6
 
7
- ```html
8
- <sohelp-import
9
- v-model="showImport"
10
- refid="user_import_ref"
11
- :fields="importFields"
12
- />
7
+ ```vue
8
+ <template>
9
+ <sohelp-import v-model="visible" refid="myRefId" :fields="fields" @close="onClose" />
10
+ </template>
11
+
12
+ <script setup>
13
+ import { ref } from 'vue';
14
+ const visible = ref(false);
15
+ const fields = ref([
16
+ { name: 'name', label: '姓名' },
17
+ { name: 'phone', label: '电话' }
18
+ ]);
19
+ const onClose = () => { /* 关闭回调 */ };
20
+ </script>
13
21
  ```
14
22
 
15
23
  ## 属性 (Props)
16
24
 
17
- | 属性名 | 类型 | 默认值 | 说明 |
18
- | modelValue | Boolean | false | 控制弹窗显示隐藏 |
19
- | refid | String | - | 必填,导入配置引用 ID |
20
- | fields | Array | [] | 可导入字段列表,用于配置映射 |
25
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 |
26
+ | --- | --- | --- | --- | --- |
27
+ | modelValue (v-model) | Boolean | - | | 控制弹窗显示/隐藏 |
28
+ | refid | String | - | | 业务关联ID,用于接口调用 |
29
+ | fields | Array | `[]` | 否 | 可导入字段列表,每项含 `name` 和 `label` |
21
30
 
22
31
  ## 事件 (Events)
23
32
 
24
- | 事件名 | 说明 | 回调参数 |
25
- | update:modelValue | 弹窗显隐状态更新 | (visible) |
26
- | close | 关闭弹窗时触发 | - |
27
-
28
- ## 功能特性
29
-
30
- - **模板下载**: 根据 `refid` 下载对应的 Excel 导入模板。
31
- - **文件上传**: 支持拖拽上传,限制文件格式 (.xls, .xlsx) 和大小。
32
- - **数据预览**: 上传后自动解析并展示前 50 条数据供预览。
33
- - **导入历史**: 查看历史导入记录,支持重新下载原文件、恢复导入或删除记录。
34
- - **配置映射**: (可选) 支持配置 Excel 列与系统字段的映射关系。
35
- - **进度反馈**: 上传和解析过程有明确的进度和状态提示。
33
+ | 事件名 | 回调参数 | 说明 |
34
+ | --- | --- | --- |
35
+ | update:modelValue | `value: Boolean` | 弹窗显示状态变化 |
36
+ | close | - | 弹窗关闭时触发 |
@@ -1,21 +1,37 @@
1
- # SohelpInput 输入框组件
1
+ # SohelpInput 输入框
2
2
 
3
- 基于 `el-input` 的封装,增加了自动聚焦功能。
3
+ 基于 `el-input` 封装的文本输入框组件,支持自动聚焦、禁用/只读时自动清空占位符,并透传所有 `el-input` 属性与插槽。
4
4
 
5
5
  ## 基础用法
6
6
 
7
- ```html
8
- <sohelp-input v-model="value" auto-focus />
7
+ ```vue
8
+ <template>
9
+ <sohelp-input v-model="value" placeholder="请输入内容" />
10
+ </template>
11
+
12
+ <script setup>
13
+ import { ref } from 'vue';
14
+ const value = ref('');
15
+ </script>
9
16
  ```
10
17
 
11
18
  ## 属性 (Props)
12
19
 
13
- | 属性名 | 类型 | 默认值 | 说明 |
14
- | modelValue | String/Number | - | 绑定值 |
15
- | autoFocus | Boolean | false | 组件挂载后是否自动获取焦点 |
16
- | disabled | Boolean | false | 是否禁用 |
17
- | readonly | Boolean | false | 是否只读 |
20
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 |
21
+ | :--- | :--- | :--- | :--- | :--- |
22
+ | modelValue | String / Number | - | | 绑定值(支持 v-model) |
23
+ | autoFocus | Boolean | `false` | | 组件挂载后是否自动获取焦点 |
24
+ | placeholder | String | `''` | | 占位文本,disabled/readonly 时自动置空 |
25
+
26
+ > 支持通过 `v-bind="$attrs"` 透传所有 `el-input` 原生属性(如 `disabled`、`readonly`、`maxlength`、`size` 等)。
27
+
28
+ ## 插槽 (Slots)
18
29
 
19
- ## 事件 (Events)
30
+ | 插槽名 | 说明 |
31
+ | :--- | :--- |
32
+ | prefix | 输入框头部内容 |
33
+ | suffix | 输入框尾部内容 |
34
+ | prepend | 输入框前置内容 |
35
+ | append | 输入框后置内容 |
20
36
 
21
- 支持 `el-input` 的所有事件。
37
+ > 动态透传所有 `el-input` 支持的插槽。
@@ -4,7 +4,8 @@
4
4
  v-model="modelValue"
5
5
  clearable
6
6
  ref="inputRef"
7
- :disabled="$attrs?.disabled || $attrs?.readonly"
7
+ :disabled="attrs?.disabled || attrs?.readonly"
8
+ :placeholder="computedPlaceholder"
8
9
  >
9
10
  <template v-for="(_, slot) in $slots" #[slot]="slotProps">
10
11
  <slot :name="slot" v-bind="slotProps" />
@@ -12,7 +13,7 @@
12
13
  </el-input>
13
14
  </template>
14
15
  <script setup>
15
- import { nextTick, onMounted, ref } from 'vue';
16
+ import { nextTick, onMounted, ref, computed, useAttrs } from 'vue';
16
17
 
17
18
  const emit = defineEmits(['update:modelValue']);
18
19
  const modelValue = defineModel('modelValue');
@@ -20,10 +21,22 @@
20
21
  autoFocus: {
21
22
  type: Boolean,
22
23
  default: false
24
+ },
25
+ placeholder: {
26
+ type: String,
27
+ default: ''
23
28
  }
24
29
  });
25
30
 
26
31
  const inputRef = ref(null);
32
+ const attrs = useAttrs();
33
+
34
+ // 计算属性:如果 disabled 或 readonly 为 true,则 placeholder 为空
35
+ const computedPlaceholder = computed(() => {
36
+ const isDisabled = attrs?.disabled || attrs?.readonly;
37
+ return isDisabled ? '' : props.placeholder;
38
+ });
39
+
27
40
  onMounted(() => {
28
41
  nextTick(() => {
29
42
  if (props.autoFocus) {