sohelp-eleplus 1.1.26 → 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 (205) hide show
  1. package/components.js +1 -0
  2. package/icons/flag/README.md +2 -2
  3. package/icons/flag/index.js +0 -1
  4. package/package.json +1 -1
  5. package/sohelp-ace-editor/README.md +32 -42
  6. package/sohelp-ace-editor/index.vue +166 -156
  7. package/sohelp-api-doc/README.md +36 -0
  8. package/sohelp-api-doc/index.vue +160 -0
  9. package/sohelp-application-select/README.md +9 -7
  10. package/sohelp-application-select/index.vue +10 -13
  11. package/sohelp-autocode/README.md +14 -26
  12. package/sohelp-calendar-view/README.md +9 -7
  13. package/sohelp-calendar-view/index.vue +10 -9
  14. package/sohelp-card/README.md +15 -17
  15. package/sohelp-card/index.vue +1 -1
  16. package/sohelp-card-view/README.md +9 -7
  17. package/sohelp-card-view/index.vue +10 -9
  18. package/sohelp-condition/README.md +29 -49
  19. package/sohelp-condition/index.vue +2 -1
  20. package/sohelp-country-select/README.md +15 -123
  21. package/sohelp-country-select/index.vue +1 -1
  22. package/sohelp-cry-input/README.md +19 -195
  23. package/sohelp-cry-input/index.vue +6 -2
  24. package/sohelp-date/README.md +12 -15
  25. package/sohelp-datetime/README.md +15 -17
  26. package/sohelp-datetime-picker/README.md +18 -18
  27. package/sohelp-datetime-picker/index.vue +11 -4
  28. package/sohelp-datetime-range/README.md +20 -23
  29. package/sohelp-demo-block/README.md +43 -0
  30. package/sohelp-demo-block/index.vue +229 -0
  31. package/sohelp-dict/README.md +28 -23
  32. package/sohelp-dict/index.vue +17 -17
  33. package/sohelp-drawer/README.md +28 -26
  34. package/sohelp-drop-card/README.md +29 -28
  35. package/sohelp-drop-card/index.vue +0 -1
  36. package/sohelp-dyn-select/README.md +31 -16
  37. package/sohelp-dyn-select/index.vue +65 -67
  38. package/sohelp-dyn-tree/README.md +26 -20
  39. package/sohelp-dyn-tree/index.vue +2 -2
  40. package/sohelp-dyn-tree-select/README.md +28 -19
  41. package/sohelp-dyn-tree-select/index.vue +23 -7
  42. package/sohelp-entity-form/README.md +65 -30
  43. package/sohelp-entity-form/index.vue +3 -2
  44. package/sohelp-entity-grid/README.md +13 -11
  45. package/sohelp-entity-grid/index.vue +1 -1
  46. package/sohelp-file-upload/README.md +25 -27
  47. package/sohelp-file-upload/index.vue +1 -1
  48. package/sohelp-filter-scheme/README.md +34 -30
  49. package/sohelp-filter-scheme/index.vue +2 -2
  50. package/sohelp-grid/README.md +52 -33
  51. package/sohelp-grid/index.vue +41 -39
  52. package/sohelp-grid/js/SohelpGridConfig.js +3 -3
  53. package/sohelp-grid/js/useSohelpGridConfig.js +4 -6
  54. package/sohelp-grid-select/README.md +32 -27
  55. package/sohelp-grid-select/index.vue +6 -5
  56. package/sohelp-grid-view/README.md +51 -22
  57. package/sohelp-grid-view-select/README.md +33 -25
  58. package/sohelp-grid-view-select/index.vue +2 -1
  59. package/sohelp-group-view/README.md +14 -4
  60. package/sohelp-group-view/index.vue +10 -9
  61. package/sohelp-icon-select/README.md +14 -12
  62. package/sohelp-image-upload/README.md +27 -27
  63. package/sohelp-image-upload/index.vue +2 -2
  64. package/sohelp-import/README.md +25 -24
  65. package/sohelp-input/README.md +27 -11
  66. package/sohelp-input/index.vue +15 -2
  67. package/sohelp-input-tag/README.md +53 -0
  68. package/sohelp-input-tag/index.vue +337 -0
  69. package/sohelp-modal/README.md +42 -16
  70. package/sohelp-modal/index.vue +21 -4
  71. package/sohelp-modal-select/README.md +745 -0
  72. package/sohelp-modal-select/index.vue +705 -0
  73. package/sohelp-module/README.md +24 -13
  74. package/sohelp-number-input/README.md +15 -8
  75. package/sohelp-number-input/index.vue +3 -0
  76. package/sohelp-number-range/README.md +22 -12
  77. package/sohelp-number-range/index.vue +3 -11
  78. package/sohelp-org-modal-select/README.md +47 -0
  79. package/sohelp-org-modal-select/index.vue +411 -0
  80. package/sohelp-org-select/README.md +23 -10
  81. package/sohelp-org-select/index.vue +41 -24
  82. package/sohelp-org-tree/README.md +19 -7
  83. package/sohelp-org-tree/index.vue +1 -2
  84. package/sohelp-org-tree-select/README.md +22 -11
  85. package/sohelp-org-tree-select/index.vue +1 -2
  86. package/sohelp-org-user-tree/README.md +19 -7
  87. package/sohelp-org-user-tree/index.vue +1 -2
  88. package/sohelp-org-user-tree-select/README.md +8 -3
  89. package/sohelp-org-user-tree-select/index.vue +8 -7
  90. package/sohelp-page/README.md +20 -11
  91. package/sohelp-page/index.vue +1 -1
  92. package/sohelp-pagination/README.md +14 -6
  93. package/sohelp-pagination/index.vue +1 -1
  94. package/sohelp-power/README.md +34 -19
  95. package/sohelp-power/index.vue +2 -2
  96. package/sohelp-pro-form/README.md +64 -21
  97. package/sohelp-pro-layout/README.md +10 -4
  98. package/sohelp-pro-layout/index.vue +8 -7
  99. package/sohelp-pro-table/README.md +30 -6
  100. package/sohelp-process/README.md +26 -13
  101. package/sohelp-process/index.vue +6 -6
  102. package/sohelp-rate/README.md +24 -12
  103. package/sohelp-rate/index.vue +5 -1
  104. package/sohelp-relation/README.md +10 -4
  105. package/sohelp-relation/index.vue +8 -7
  106. package/sohelp-relation-modal-select/README.md +41 -0
  107. package/sohelp-relation-modal-select/index.vue +70 -0
  108. package/sohelp-rich-text/README.md +29 -11
  109. package/sohelp-rich-text/index.vue +21 -20
  110. package/sohelp-richtext/README.md +12 -2
  111. package/sohelp-richtext/index.vue +8 -6
  112. package/sohelp-role-modal-select/README.md +45 -0
  113. package/sohelp-role-modal-select/index.vue +111 -0
  114. package/sohelp-role-select/README.md +18 -10
  115. package/sohelp-role-select/index.vue +36 -27
  116. package/sohelp-search/README.md +12 -4
  117. package/sohelp-search/index.vue +2 -2
  118. package/sohelp-search-pro-form/README.md +15 -1
  119. package/sohelp-search-pro-form/index.vue +2 -1
  120. package/sohelp-select/README.md +31 -30
  121. package/sohelp-select/index.vue +79 -84
  122. package/sohelp-split-panel/README.md +17 -18
  123. package/sohelp-switch/README.md +21 -19
  124. package/sohelp-switch/index.vue +34 -33
  125. package/sohelp-table/README.md +35 -27
  126. package/sohelp-table/index.vue +110 -109
  127. package/sohelp-table-select/README.md +55 -0
  128. package/sohelp-tenant-select/README.md +19 -18
  129. package/sohelp-tenant-select/index.vue +105 -109
  130. package/sohelp-text/README.md +16 -10
  131. package/sohelp-text/index.vue +5 -5
  132. package/sohelp-textarea-input/README.md +19 -12
  133. package/sohelp-time/README.md +11 -10
  134. package/sohelp-tree/README.md +24 -19
  135. package/sohelp-tree/index.vue +21 -23
  136. package/sohelp-tree-select/README.md +23 -10
  137. package/sohelp-user-modal-select/README.md +739 -0
  138. package/sohelp-user-modal-select/index.vue +87 -0
  139. package/sohelp-user-select/README.md +26 -15
  140. package/sohelp-user-select/index.vue +6 -2
  141. package/sohelp-user-tag/README.md +5 -7
  142. package/sohelp-user-tag/index.vue +8 -8
  143. package/sohelp-user-tree/README.md +5 -8
  144. package/sohelp-user-tree/index.vue +8 -7
  145. package/sohelp-vform-drawer/README.md +36 -18
  146. package/sohelp-vform-drawer/index.vue +2 -2
  147. package/sohelp-vform-eleplus/README.md +33 -31
  148. package/sohelp-vform-eleplus/index.vue +2 -2
  149. package/sohelp-vform-eleplus/tinymce/langs/zh_CN.js +461 -461
  150. package/sohelp-vform-eleplus/tinymce/langs/zh_TW.js +418 -418
  151. package/sohelp-vform-eleplus/tinymce/skins/content/dark/content.css +72 -72
  152. package/sohelp-vform-eleplus/tinymce/skins/content/dark/content.min.css +7 -7
  153. package/sohelp-vform-eleplus/tinymce/skins/content/default/content.css +67 -67
  154. package/sohelp-vform-eleplus/tinymce/skins/content/default/content.min.css +7 -7
  155. package/sohelp-vform-eleplus/tinymce/skins/content/document/content.css +72 -72
  156. package/sohelp-vform-eleplus/tinymce/skins/content/document/content.min.css +7 -7
  157. package/sohelp-vform-eleplus/tinymce/skins/content/writer/content.css +68 -68
  158. package/sohelp-vform-eleplus/tinymce/skins/content/writer/content.min.css +7 -7
  159. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.css +732 -732
  160. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.inline.css +726 -726
  161. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.inline.min.css +7 -7
  162. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.min.css +7 -7
  163. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.mobile.css +29 -29
  164. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.mobile.min.css +7 -7
  165. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.css +3047 -3047
  166. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.min.css +7 -7
  167. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.mobile.css +673 -673
  168. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.mobile.min.css +7 -7
  169. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.shadowdom.css +37 -37
  170. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.shadowdom.min.css +7 -7
  171. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.css +714 -714
  172. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.inline.css +726 -726
  173. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.inline.min.css +7 -7
  174. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.min.css +7 -7
  175. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.mobile.css +29 -29
  176. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.mobile.min.css +7 -7
  177. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.css +3047 -3047
  178. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.min.css +7 -7
  179. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.mobile.css +673 -673
  180. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +7 -7
  181. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +37 -37
  182. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +7 -7
  183. package/sohelp-vform-modal/README.md +36 -18
  184. package/sohelp-vform-modal/index.vue +2 -2
  185. package/sohelp-vform-select/README.md +9 -7
  186. package/sohelp-vform-select/index.vue +8 -7
  187. package/sohelp-vxe-grid/DefaultGridOptions.js +5 -3
  188. package/sohelp-vxe-grid/DefaultProps.js +0 -1
  189. package/sohelp-vxe-grid/README.md +540 -35
  190. package/sohelp-vxe-grid/SohelpGridConfig.js +8 -6
  191. package/sohelp-vxe-grid/index.vue +141 -94
  192. package/sohelp-vxe-grid-select/README.md +41 -26
  193. package/sohelp-vxe-table/README.md +23 -20
  194. package/sohelp-vxe-table/index.vue +5 -4
  195. package/sohelp-workflow/README.md +21 -17
  196. package/sohelp-workflow/index.vue +25 -22
  197. package/sohelp-workflow-drawer/README.md +41 -28
  198. package/sohelp-workflow-drawer/components/table.vue +7 -1
  199. package/sohelp-workflow-drawer/index.vue +86 -71
  200. package/sohelp-workflow-drawer/js/index.js +15 -13
  201. package/style/index.scss +0 -0
  202. package/utils/safe-eval.js +89 -0
  203. package/sohelp-dyn-select/props.js +0 -67
  204. package/sohelp-user-select/index.vue~ +0 -53
  205. package/sohelp-user-select/props.js +0 -71
@@ -1,30 +1,47 @@
1
1
  <template>
2
- <sohelp-dyn-select
3
- v-bind="$attrs"
4
- :url="url"
5
- :labelField="labelField"
6
- :valueField="valueField"
7
- ></sohelp-dyn-select>
2
+ <div class="sohelp-org-select">
3
+ <sohelp-dyn-select
4
+ v-bind="$attrs"
5
+ :url="url"
6
+ :labelField="labelField"
7
+ :valueField="valueField"
8
+ :datasource="datasource"
9
+ v-model="modelValue"
10
+ ></sohelp-dyn-select>
11
+ </div>
8
12
  </template>
13
+ <script setup>
14
+ import SohelpDynSelect from '../sohelp-dyn-select/index.vue';
15
+
16
+ const modelValue = defineModel('modelValue', { type: [String, Number, Array], default: '' });
17
+
18
+ const props = defineProps({
19
+ datasource: {
20
+ type: [Array, Function, Promise],
21
+ required: false
22
+ },
23
+ url: {
24
+ type: String,
25
+ default: '/engine/web/org/list'
26
+ },
27
+ labelField: {
28
+ type: String,
29
+ default: 'org_name'
30
+ },
31
+ valueField: {
32
+ type: String,
33
+ default: 'id'
34
+ }
35
+ });
36
+ defineExpose({});
37
+ </script>
9
38
  <script>
10
39
  export default {
11
- name: 'SohelpOrgSelect',
12
- components: {},
13
- props: {
14
- url: {
15
- type: String,
16
- default: '/engine/web/org/list'
17
- },
18
- labelField: {
19
- type: String,
20
- default: 'org_name'
21
- },
22
- valueField: {
23
- type: String,
24
- default: 'id'
25
- }
26
- },
27
- setup(props, { emit, attrs }) {}
40
+ name: 'SohelpOrgSelect'
28
41
  };
29
42
  </script>
30
- <style></style>
43
+ <style>
44
+ .sohelp-org-select{
45
+ width: 100%;
46
+ }
47
+ </style>
@@ -1,18 +1,30 @@
1
1
  # SohelpOrgTree 组织机构树
2
2
 
3
- 基于 `sohelp-dyn-tree` 封装,预设了组织机构列表的接口地址,用于展示组织机构树形结构。
3
+ 基于 `sohelp-dyn-tree` 封装,预设组织机构列表接口地址,用于展示组织机构树形结构。
4
4
 
5
5
  ## 基础用法
6
6
 
7
- ```html
8
- <sohelp-org-tree @node-click="handleNodeClick" />
7
+ ```vue
8
+ <template>
9
+ <sohelp-org-tree @node-click="handleNodeClick" />
10
+ </template>
11
+
12
+ <script setup>
13
+ const handleNodeClick = (data, node, el) => {
14
+ console.log('选中组织:', data);
15
+ };
16
+ </script>
9
17
  ```
10
18
 
11
19
  ## 属性 (Props)
12
20
 
13
- | 属性名 | 类型 | 默认值 | 说明 |
14
- | url | String | '/engine/web/org/list' | 数据接口地址 |
21
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 |
22
+ | :--- | :--- | :--- | :--- | :--- |
23
+ | url | String | `/engine/web/org/list` | 否 | 组织机构数据接口地址 |
24
+ | ...attrs | - | - | 否 | 支持所有 `sohelp-dyn-tree` 属性透传 |
15
25
 
16
- ## 其他
26
+ ## 事件 (Events)
17
27
 
18
- 支持 `sohelp-dyn-tree` 的所有属性和事件。
28
+ | 事件名 | 回调参数 | 说明 |
29
+ | :--- | :--- | :--- |
30
+ | node-click | `(data, node, el)` | 节点被点击时触发(透传自 `sohelp-dyn-tree`) |
@@ -8,8 +8,7 @@
8
8
  props: {
9
9
  url: {
10
10
  type: String,
11
- default: '/engine/web/org/list',
12
- required: true
11
+ default: '/engine/web/org/list'
13
12
  }
14
13
  }
15
14
  };
@@ -1,22 +1,33 @@
1
1
  # SohelpOrgTreeSelect 组织机构树选择器
2
2
 
3
- 用于选择组织机构的树形下拉组件。自动从接口加载平铺数据并转换为树形结构展示。
3
+ 基于 `sohelp-tree-select` 封装的组织机构下拉树选择组件。自动从接口加载扁平数据并转换为树形结构,支持只读模式和自定义数据源。
4
4
 
5
5
  ## 基础用法
6
6
 
7
- ```html
8
- <sohelp-org-tree-select v-model="orgId" />
7
+ ```vue
8
+ <template>
9
+ <sohelp-org-tree-select v-model="orgId" />
10
+ </template>
11
+
12
+ <script setup>
13
+ import { ref } from 'vue';
14
+ const orgId = ref('');
15
+ </script>
9
16
  ```
10
17
 
11
18
  ## 属性 (Props)
12
19
 
13
- | 属性名 | 类型 | 默认值 | 说明 |
14
- | modelValue | String/Number/Array | - | 绑定的值 |
15
- | data | Object | {} | 绑定的完整数据对象 |
16
- | url | String | '/engine/web/org/list' | 数据接口地址 |
17
- | datasource | Array/Function/Promise | - | 数据源,优先级高于 url |
18
- | readonly | Boolean | false | 是否只读 |
20
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 |
21
+ | :--- | :--- | :--- | :--- | :--- |
22
+ | modelValue (v-model) | String / Number / Array | `""` | | 绑定值 |
23
+ | data (v-model:data) | Object | `{}` | | 当前选中项的完整数据对象 |
24
+ | url | String | `/engine/web/org/list` | | 数据接口地址 |
25
+ | datasource | Array / Function / Object | - | | 自定义数据源,优先级高于 url;支持数组、返回数组的函数或 Promise |
26
+ | readonly | Boolean | `false` | 否 | 是否只读模式(只读时显示 `org_name` 文本) |
27
+ | ...attrs | - | - | 否 | 支持所有 `sohelp-tree-select` 属性透传 |
19
28
 
20
- ## 内部逻辑
29
+ ## 公开方法 (Expose)
21
30
 
22
- 组件挂载时会自动请求数据,并根据 `id` `parent_id` 字段将扁平数据转换为树形结构 (`treeProps.data`) 传递给内部的 `sohelp-tree-select`。
31
+ - `treeProps` - 树形配置对象(含 data 数组)
32
+ - `modelValue` - 当前选中值
33
+ - `dataMap` - 以 id 为 key 的扁平数据映射
@@ -21,8 +21,7 @@ const props = defineProps({
21
21
  default: "/engine/web/org/list"
22
22
  },
23
23
  datasource: {
24
- type: [Array, Function, Promise],
25
- required: true
24
+ type: [Array, Function, Object]
26
25
  },
27
26
  readonly: {
28
27
  type: Boolean,
@@ -1,18 +1,30 @@
1
1
  # SohelpOrgUserTree 组织人员树
2
2
 
3
- 用于展示组织机构和人员混合树形结构的组件,基于 `sohelp-dyn-tree` 封装。
3
+ 基于 `sohelp-dyn-tree` 封装,预设组织人员列表接口地址,用于展示组织机构及人员的树形结构。
4
4
 
5
5
  ## 基础用法
6
6
 
7
- ```html
8
- <sohelp-org-user-tree @node-click="handleNodeClick" />
7
+ ```vue
8
+ <template>
9
+ <sohelp-org-user-tree @node-click="handleNodeClick" />
10
+ </template>
11
+
12
+ <script setup>
13
+ const handleNodeClick = (data, node, el) => {
14
+ console.log('选中节点:', data);
15
+ };
16
+ </script>
9
17
  ```
10
18
 
11
19
  ## 属性 (Props)
12
20
 
13
- | 属性名 | 类型 | 默认值 | 说明 |
14
- | url | String | '/engine/web/org/list' | 数据接口地址 |
21
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 |
22
+ | :--- | :--- | :--- | :--- | :--- |
23
+ | url | String | `/engine/web/org/list` | 否 | 数据接口地址 |
24
+ | ...attrs | - | - | 否 | 支持所有 `sohelp-dyn-tree` 属性透传 |
15
25
 
16
- ## 其他
26
+ ## 事件 (Events)
17
27
 
18
- 支持 `sohelp-dyn-tree` 的所有属性和事件。
28
+ | 事件名 | 回调参数 | 说明 |
29
+ | :--- | :--- | :--- |
30
+ | node-click | `(data, node, el)` | 节点被点击时触发(透传自 `sohelp-dyn-tree`) |
@@ -10,8 +10,7 @@ export default {
10
10
  props: {
11
11
  url: {
12
12
  type: String,
13
- default: "/engine/web/org/list",
14
- required: true
13
+ default: "/engine/web/org/list"
15
14
  }
16
15
  },
17
16
  setup(props, {emit}) {
@@ -1,7 +1,12 @@
1
1
  # SohelpOrgUserTreeSelect 组织人员树选择器
2
2
 
3
- *当前版本仅为占位组件。*
3
+ 组织人员树选择器组件,用于在下拉面板中选择组织机构下的用户。当前版本为占位组件,功能待实现。
4
4
 
5
- ## 描述
5
+ ## 基础用法
6
6
 
7
- 用于选择组织机构下的用户,结合了树形展示和选择功能。继承自 `SohelpOrgUserTree` 和 `SohelpSelect` 的逻辑。
7
+ ```vue
8
+ <template>
9
+ <!-- 当前版本为占位组件,功能待实现 -->
10
+ <sohelp-org-user-tree-select />
11
+ </template>
12
+ ```
@@ -1,11 +1,12 @@
1
1
  <template>
2
- <div>SohelpOrgUserTreeModal是继承SohelpOrgUserTree和SohelpSelect</div>
2
+ <div class="sohelp-org-user-tree-select">
3
+ <!-- TODO: 待实现 - 组织用户树选择器(继承SohelpOrgUserTree和SohelpSelect) -->
4
+ <el-empty description="组织用户树选择器 - 待实现" />
5
+ </div>
3
6
  </template>
7
+ <script setup>
8
+ // TODO: 待实现
9
+ </script>
4
10
  <script>
5
- export default {
6
- name: "SohelpOrgUserTreeModal"
7
- }
11
+ export default { name: 'SohelpOrgUserTreeSelect' };
8
12
  </script>
9
- <style scoped>
10
-
11
- </style>
@@ -1,21 +1,30 @@
1
- # SohelpPage 页面布局组件
1
+ # SohelpPage 页面容器
2
2
 
3
- 基于 `ele-page` 的封装,用于构建标准的页面结构,包含头部、内容区域等。
3
+ 基于 `ele-page` 封装的页面容器组件,默认启用弹性表格布局并隐藏页脚。
4
4
 
5
5
  ## 基础用法
6
6
 
7
- ```html
8
- <sohelp-page title="页面标题">
9
- 页面内容
10
- </sohelp-page>
7
+ ```vue
8
+ <template>
9
+ <sohelp-page>
10
+ <div>页面内容</div>
11
+ </sohelp-page>
12
+ </template>
11
13
  ```
12
14
 
13
15
  ## 属性 (Props)
14
16
 
15
- | 属性名 | 类型 | 默认值 | 说明 |
16
- | flex-table | Boolean | true | 是否开启 Flex 布局适配表格高度 |
17
- | hide-footer | Boolean | true | 是否隐藏底部区域 |
17
+ 组件透传所有属性到内部 `ele-page`,并设置以下默认值:
18
18
 
19
- ## 其他
19
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 |
20
+ | --- | --- | --- | --- | --- |
21
+ | flex-table | Boolean | `true` | 否 | 启用弹性表格布局 |
22
+ | hide-footer | Boolean | `true` | 否 | 隐藏页脚区域 |
20
23
 
21
- 支持 `ele-page` 的所有属性和事件。
24
+ > 支持 `ele-page` 的所有属性,通过 `$attrs` 透传。
25
+
26
+ ## 插槽 (Slots)
27
+
28
+ | 插槽名 | 说明 |
29
+ | --- | --- |
30
+ | default | 页面主体内容 |
@@ -3,7 +3,7 @@
3
3
  </script>
4
4
 
5
5
  <template>
6
- <ele-page :flex-table="true" :hide-footer="true" v-bind="$attrs" v-on="$attrs">
6
+ <ele-page :flex-table="true" :hide-footer="true" v-bind="$attrs">
7
7
  <slot></slot>
8
8
  </ele-page>
9
9
  </template>
@@ -1,13 +1,21 @@
1
- # SohelpPagination 分页组件
1
+ # SohelpPagination 分页
2
2
 
3
- 基于 `ElePagination` 的封装组件。
3
+ 继承 `ElePagination` 的分页组件。
4
4
 
5
5
  ## 基础用法
6
6
 
7
- ```html
8
- <sohelp-pagination :total="100" v-model:currentPage="page" v-model:pageSize="limit" />
7
+ ```vue
8
+ <template>
9
+ <sohelp-pagination :total="100" v-model:currentPage="page" v-model:pageSize="limit" />
10
+ </template>
11
+
12
+ <script setup>
13
+ import { ref } from 'vue';
14
+ const page = ref(1);
15
+ const limit = ref(10);
16
+ </script>
9
17
  ```
10
18
 
11
- ## 描述
19
+ ## 属性 (Props)
12
20
 
13
- 继承自 `ElePagination`,提供标准的分页功能。
21
+ 继承 `ElePagination` 的所有属性,请参考 ElePagination 文档。
@@ -3,7 +3,7 @@
3
3
  </template>
4
4
  <script>
5
5
  export default {
6
- name: "SohelpPagination是继承ElePagination"
6
+ name: "SohelpPagination"
7
7
  }
8
8
  </script>
9
9
  <style scoped>
@@ -1,27 +1,42 @@
1
- # SohelpPower 数据权限选择组件
1
+ # SohelpPower 数据查看范围选择器
2
2
 
3
- 用于选择数据查看范围(如“全部数据”、“本部门数据”等),支持自定义选择特定用户。
3
+ 基于 `sohelp-select` 封装的数据权限范围选择组件,支持预设的多种查看范围,包括自定义用户选择。
4
4
 
5
5
  ## 基础用法
6
6
 
7
- ```html
8
- <sohelp-power @change="handlePowerChange" />
7
+ ```vue
8
+ <template>
9
+ <sohelp-power @change="onPowerChange" />
10
+ </template>
11
+
12
+ <script setup>
13
+ const onPowerChange = (val) => {
14
+ console.log('查看范围:', val);
15
+ };
16
+ </script>
9
17
  ```
10
18
 
19
+ ## 属性 (Props)
20
+
21
+ 组件无自定义 props,内部默认选中"全部数据"(值为 `"0"`)。
22
+
23
+ 预设查看范围选项:
24
+
25
+ | 值 | 说明 |
26
+ | --- | --- |
27
+ | 0 | 全部数据 |
28
+ | 1 | 我负责的 |
29
+ | 2 | 下属负责的 |
30
+ | 3 | 仅限本部门 |
31
+ | 4 | 本公司 |
32
+ | 5 | 下属部门 |
33
+ | 6 | 本人及下属 |
34
+ | 7 | 本部门及下属部门 |
35
+ | 8 | 仅限本岗位 |
36
+ | 9 | 自定义(弹出用户选择) |
37
+
11
38
  ## 事件 (Events)
12
39
 
13
- | 事件名 | 说明 | 回调参数 |
14
- | change | 权限范围改变时触发 | (value: String/Object) |
15
-
16
- ## 数据选项
17
-
18
- - 0: 全部数据
19
- - 1: 我负责的
20
- - 2: 下属负责的
21
- - 3: 仅限本部门
22
- - 4: 本公司
23
- - 5: 下属部门
24
- - 6: 本人及下属
25
- - 7: 本部门及下属部门
26
- - 8: 仅限本岗位
27
- - 9: 自定义 (弹出用户选择框)
40
+ | 事件名 | 回调参数 | 说明 |
41
+ | --- | --- | --- |
42
+ | change | `value: string \| { power: 9, powerUsers: Array }` | 选择查看范围后触发;选择"自定义"时返回对象包含用户列表 |
@@ -64,8 +64,8 @@ const PowerList = [{
64
64
  value: "9"
65
65
  }];
66
66
 
67
- const emits = defineEmits("change");
68
- const value = ref(0);
67
+ const emits = defineEmits(["change"]);
68
+ const value = ref("0");
69
69
  //显示用户选择弹窗
70
70
  const powerUserVisible = ref(false);
71
71
  //显示用户
@@ -1,35 +1,78 @@
1
- # SohelpProForm 高级表单组件
1
+ # SohelpProForm 高级表单
2
2
 
3
- 配置化表单组件,支持栅格布局、表单验证、动态表单项等功能。
3
+ 基于 Element Plus `ElForm` 封装的配置化高级表单组件,支持栅格布局、表单验证、动态表单项和底栏操作按钮。
4
4
 
5
5
  ## 基础用法
6
6
 
7
- ```html
8
- <sohelp-pro-form
9
- :model="formData"
10
- :items="formItems"
11
- @submit="handleSubmit"
12
- />
7
+ ```vue
8
+ <template>
9
+ <sohelp-pro-form
10
+ :model="formData"
11
+ :items="formItems"
12
+ :footer="true"
13
+ @submit="handleSubmit"
14
+ @reset="handleReset"
15
+ />
16
+ </template>
17
+
18
+ <script setup>
19
+ import { ref } from 'vue';
20
+ const formData = ref({ name: '', age: '' });
21
+ const formItems = [
22
+ { prop: 'name', type: 'SohelpInput', label: '姓名', required: true },
23
+ { prop: 'age', type: 'SohelpNumberInput', label: '年龄' }
24
+ ];
25
+ const handleSubmit = (model) => { console.log(model); };
26
+ const handleReset = () => {};
27
+ </script>
13
28
  ```
14
29
 
15
30
  ## 属性 (Props)
16
31
 
17
- | 属性名 | 类型 | 默认值 | 说明 |
18
- | model | Object | - | 必填,表单数据对象 |
19
- | items | Array | - | 必填,表单项配置数组 |
20
- | rules | Object | - | 验证规则 |
21
- | labelWidth | String/Number | '80px' | 标签宽度 |
22
- | grid | Boolean/Object | - | 是否开启栅格布局 |
23
- | footer | Boolean | - | 是否显示底部按钮 |
24
- | readonly | Boolean | false | 是否只读 |
32
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 |
33
+ | --- | --- | --- | --- | --- |
34
+ | model | Object | - | | 表单数据对象 |
35
+ | items | Array | - | | 表单项配置数组 |
36
+ | data | Object | - | | 表单关联数据对象 |
37
+ | rules | Object | - | | 表单验证规则 |
38
+ | labelWidth | String / Number | '80px' | | 标签宽度 |
39
+ | statusIcon | Boolean | - | | 是否显示校验结果图标 |
40
+ | size | String | - | 否 | 表单尺寸 |
41
+ | disabled | Boolean | - | 否 | 是否禁用表单 |
42
+ | readonly | Boolean | false | 否 | 是否只读 |
43
+ | grid | Boolean / Object | - | 否 | 栅格布局配置,true 默认 span=12,或传入 ElCol 属性对象 |
44
+ | rowProps | Object | - | 否 | ElRow 属性,仅在 grid 模式下生效 |
45
+ | footer | Boolean | - | 否 | 是否显示底栏提交/重置按钮 |
46
+ | footerProps | Object | - | 否 | 底栏 ElFormItem 属性 |
47
+ | footerSlots | Object | - | 否 | 底栏 ElFormItem 插槽 |
48
+ | footerColProps | Object | { span: 24 } | 否 | 底栏 ElCol 属性 |
49
+ | submitText | String | '提交' | 否 | 提交按钮文本 |
50
+ | resetText | String | '重置' | 否 | 重置按钮文本 |
51
+ | saveParams | Object | {} | 否 | 保存时附加参数 |
25
52
 
26
53
  ## 事件 (Events)
27
54
 
28
- | 事件名 | 说明 | 回调参数 |
29
- | submit | 表单提交且验证通过时触发 | (model) |
30
- | reset | 表单重置时触发 | - |
31
- | updateValue | 表单项值更新时触发 | (prop, value) |
55
+ | 事件名 | 回调参数 | 说明 |
56
+ | --- | --- | --- |
57
+ | updateValue | (prop: string, value: any) | 表单项值更新时触发 |
58
+ | submit | (model: Object) | 表单提交且验证通过时触发 |
59
+ | reset | - | 表单重置时触发 |
60
+
61
+ ## 插槽 (Slots)
62
+
63
+ | 插槽名 | 说明 |
64
+ | --- | --- |
65
+ | topExtra | 表单顶部额外内容 |
66
+ | bottomExtra | 表单底部额外内容 |
67
+ | footer | 自定义底栏内容 |
68
+ | [动态插槽] | 透传至 ProFormItem 的自定义字段插槽 |
32
69
 
33
70
  ## 公开方法 (Expose)
34
71
 
35
- - `getRef(prop)`: 获取指定字段的表单项组件实例。
72
+ - `formRef` - 内部 ElForm 实例引用
73
+ - `validate()` - 验证整个表单,返回 Promise
74
+ - `validateField(props, callback)` - 验证指定字段
75
+ - `resetFields(props?)` - 重置表单字段
76
+ - `scrollToField(prop)` - 滚动到指定字段
77
+ - `clearValidate(props?)` - 清除验证信息
78
+ - `getRef(propName)` - 获取指定字段的 ProFormItem 组件实例
@@ -1,7 +1,13 @@
1
- # SohelpProLayout 高级布局组件
1
+ # SohelpProLayout 界面布局
2
2
 
3
- 基于 `EleProLayout` 的封装。
3
+ 基于 `EleProLayout` 的界面布局组件(待实现)。
4
4
 
5
- ## 描述
5
+ ## 基础用法
6
6
 
7
- 继承自 `EleProLayout`,提供后台管理系统的整体布局框架。
7
+ ```vue
8
+ <template>
9
+ <sohelp-pro-layout />
10
+ </template>
11
+ ```
12
+
13
+ > 该组件当前为占位状态,功能待实现。
@@ -1,11 +1,12 @@
1
1
  <template>
2
- <div>界面布局SohelpProLayout是继承EleProLayout</div>
2
+ <div class="sohelp-pro-layout">
3
+ <!-- TODO: 待实现 - 界面布局(继承EleProLayout) -->
4
+ <el-empty description="界面布局 - 待实现" />
5
+ </div>
3
6
  </template>
7
+ <script setup>
8
+ // TODO: 待实现
9
+ </script>
4
10
  <script>
5
- export default {
6
- name: "SohelpProLayout"
7
- }
11
+ export default { name: 'SohelpProLayout' };
8
12
  </script>
9
- <style scoped>
10
-
11
- </style>
@@ -1,13 +1,37 @@
1
- # SohelpProTable 高级表格组件
1
+ # SohelpProTable 专业表格
2
2
 
3
- 基于 `ele-pro-table` 的封装,透传了所有属性和插槽。
3
+ 基于 ele-pro-table 的透传封装组件。将所有属性(`$attrs`)和插槽(`$slots`)直接透传到 ele-pro-table,提供统一的组件命名入口。
4
4
 
5
5
  ## 基础用法
6
6
 
7
- ```html
8
- <sohelp-pro-table :request="requestApi" :columns="columns" />
7
+ ```vue
8
+ <template>
9
+ <sohelp-pro-table
10
+ :columns="columns"
11
+ :datasource="datasource"
12
+ row-key="id"
13
+ >
14
+ <template #action="{ row }">
15
+ <el-button size="small" @click="handleEdit(row)">编辑</el-button>
16
+ </template>
17
+ </sohelp-pro-table>
18
+ </template>
19
+
20
+ <script setup>
21
+ const columns = [
22
+ { prop: 'name', label: '名称' },
23
+ { prop: 'status', label: '状态' }
24
+ ];
25
+ const datasource = async ({ page, limit, where }) => {
26
+ // 返回 { total, results } 格式数据
27
+ };
28
+ </script>
9
29
  ```
10
30
 
11
- ## 描述
31
+ ## 属性 (Props)
32
+
33
+ 所有属性透传到 ele-pro-table,请参考 ele-pro-table 文档。
34
+
35
+ ## 插槽 (Slots)
12
36
 
13
- 用于快速构建带有搜索、分页、工具栏的复杂表格页面。
37
+ 所有插槽透传到 ele-pro-table,请参考 ele-pro-table 文档。