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,15 +1,12 @@
1
- <script>
2
- export default {
3
- name: "SohelpApplicationSelect"
4
- }
5
- </script>
6
-
7
1
  <template>
8
- <div>
9
- 应用列表
10
- </div>
2
+ <div class="sohelp-application-select">
3
+ <!-- TODO: 待实现 - 应用列表选择器 -->
4
+ <el-empty description="应用列表选择器 - 待实现" />
5
+ </div>
11
6
  </template>
12
-
13
- <style scoped>
14
-
15
- </style>
7
+ <script setup>
8
+ // TODO: 待实现
9
+ </script>
10
+ <script>
11
+ export default { name: 'SohelpApplicationSelect' };
12
+ </script>
@@ -1,38 +1,26 @@
1
- # 自动编码组件 (Autocode)
1
+ # SohelpAutocode 自动编码
2
2
 
3
- 用于生成和显示自动编码的输入组件,支持从后端自动获取编码。
3
+ 基于 `sohelp-input` 封装的自动编码输入框组件,支持通过接口自动生成编码值。
4
4
 
5
- ## 功能特性
6
-
7
- - **自动加载**:支持挂载时自动获取编码。
8
- - **手动刷新**:提供刷新按钮重新获取编码。
9
- - **后端集成**:通过 `field` 和 `refid` 调用后端接口生成编码。
10
-
11
- ## 属性 (Props)
12
-
13
- | 属性名 | 类型 | 默认值 | 说明 |
14
- | :--- | :--- | :--- | :--- |
15
- | modelValue | String | - | 绑定的编码值 (v-model)。 |
16
- | field | String | '' | 对应后端的字段名,用于生成编码。 |
17
- | refid | String | '' | 对应后端的引用ID。 |
18
- | autoLoad | Boolean | false | 是否在组件挂载时自动加载编码 (通过 `$attrs` 传递)。 |
19
- | readonly | Boolean | false | 是否只读,只读状态下无法刷新编码 (通过 `$attrs` 传递)。 |
20
-
21
- ## 使用示例
5
+ ## 基础用法
22
6
 
23
7
  ```vue
24
8
  <template>
25
- <sohelp-autocode
26
- v-model="code"
27
- field="order_no"
28
- refid="order_module"
29
- autoLoad
30
- />
9
+ <sohelp-autocode v-model="code" field="order_no" refid="myRefId" />
31
10
  </template>
32
11
 
33
12
  <script setup>
34
13
  import { ref } from 'vue';
35
-
36
14
  const code = ref('');
37
15
  </script>
38
16
  ```
17
+
18
+ ## 属性 (Props)
19
+
20
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 |
21
+ | --- | --- | --- | --- | --- |
22
+ | modelValue (v-model) | String | - | 否 | 编码值 |
23
+ | field | String | `''` | 否 | 字段名称,用于接口查询 |
24
+ | refid | String | `''` | 否 | 业务关联ID,用于接口查询 |
25
+
26
+ > 通过 `$attrs` 还支持 `readonly`(只读时隐藏刷新按钮)和 `autoLoad`(挂载后自动获取编码)等属性。
@@ -1,15 +1,17 @@
1
- # 日历视图 (Calendar View)
1
+ # SohelpCalendarView 日历视图
2
2
 
3
- 日历视图展示组件。
3
+ 基于 `el-empty` 的日历视图占位组件,当前功能待实现。
4
4
 
5
- ## 属性 (Props)
6
-
7
- 该组件目前主要作为展示用途,暂无特定配置属性。
8
-
9
- ## 使用示例
5
+ ## 基础用法
10
6
 
11
7
  ```vue
12
8
  <template>
13
9
  <sohelp-calendar-view />
14
10
  </template>
15
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-calendar-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: 'SohelpCalendarView' };
12
+ </script>
@@ -1,22 +1,8 @@
1
- # 卡片容器 (Card)
1
+ # SohelpCard 卡片容器
2
2
 
3
- 基于 `ele-card` 封装的卡片容器组件,支持 Flex 布局。
3
+ 基于 `ele-card` 封装的卡片容器组件,默认启用 `flex-table` 布局,通过 `v-bind="$attrs"` 透传所有属性至 `ele-card`。
4
4
 
5
- ## 属性 (Props)
6
-
7
- | 属性名 | 类型 | 默认值 | 说明 |
8
- | :--- | :--- | :--- | :--- |
9
- | flex-table | Boolean | - | 是否启用 Flex 表格布局样式 (通过 `$attrs` 传递)。 |
10
-
11
- 此组件继承了 `ele-card` 的所有属性和事件。
12
-
13
- ## 插槽 (Slots)
14
-
15
- | 插槽名 | 说明 |
16
- | :--- | :--- |
17
- | default | 卡片内容区域。 |
18
-
19
- ## 使用示例
5
+ ## 基础用法
20
6
 
21
7
  ```vue
22
8
  <template>
@@ -25,3 +11,15 @@
25
11
  </sohelp-card>
26
12
  </template>
27
13
  ```
14
+
15
+ ## 属性 (Props)
16
+
17
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 |
18
+ | --- | --- | --- | --- | --- |
19
+ | - | - | - | - | 继承 ele-card 的所有属性,通过 $attrs 透传 |
20
+
21
+ ## 插槽 (Slots)
22
+
23
+ | 插槽名 | 说明 |
24
+ | --- | --- |
25
+ | default | 卡片内容区域 |
@@ -3,7 +3,7 @@
3
3
  </script>
4
4
 
5
5
  <template>
6
- <ele-card flex-table v-bind="$attrs" v-on="$attrs">
6
+ <ele-card flex-table v-bind="$attrs">
7
7
  <slot></slot>
8
8
  </ele-card>
9
9
  </template>
@@ -1,15 +1,17 @@
1
- # 卡片视图 (Card View)
1
+ # SohelpCardView 卡片视图
2
2
 
3
- 卡片视图展示组件。
3
+ 当前版本仅为占位组件,卡片视图展示功能待实现。
4
4
 
5
- ## 属性 (Props)
6
-
7
- 该组件目前主要作为展示用途,暂无特定配置属性。
8
-
9
- ## 使用示例
5
+ ## 基础用法
10
6
 
11
7
  ```vue
12
8
  <template>
13
9
  <sohelp-card-view />
14
10
  </template>
15
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-card-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: 'SohelpCardView' };
12
+ </script>
@@ -1,61 +1,41 @@
1
- # 条件构建器 (Condition)
1
+ # SohelpCondition 条件构造器
2
2
 
3
- 用于构建复杂查询条件的组件,支持嵌套的“且(AND)”/“或(OR)”逻辑分组。
3
+ 递归嵌套的条件构造器组件,支持"满足所有条件"(AND)和"满足任一条件"(OR)逻辑组合,可添加子条件组和多种比较操作符。
4
4
 
5
- ## 功能特性
6
-
7
- - **多级嵌套**:支持无限层级的条件组嵌套。
8
- - **逻辑运算**:支持 AND 和 OR 逻辑切换。
9
- - **丰富操作符**:支持等于、包含、大于、小于、为空等多种比较操作符。
10
- - **动态字段**:根据传入的 `fields` 动态生成可选条件字段。
11
-
12
- ## 属性 (Props)
13
-
14
- | 属性名 | 类型 | 默认值 | 说明 |
15
- | :--- | :--- | :--- | :--- |
16
- | modelValue | Object | - | 绑定的条件数据对象 (v-model)。 |
17
- | value | Object | - | 同 `modelValue`,条件数据对象。 |
18
- | fields | Array | - | 可选字段列表,每项包含 `label` 和 `value` (或字段名)。 |
19
- | currentIndex | Number | -1 | 当前条件索引 (内部使用)。 |
20
-
21
- ## 数据结构示例
22
-
23
- ```javascript
24
- // modelValue 结构示例
25
- {
26
- and: [
27
- { label: '姓名', value: '张三', comparison: 'EQ' },
28
- {
29
- or: [
30
- { label: '年龄', value: '18', comparison: 'GT' },
31
- { label: '状态', value: '1', comparison: 'EQ' }
32
- ]
33
- }
34
- ]
35
- }
36
- ```
37
-
38
- ## 使用示例
5
+ ## 基础用法
39
6
 
40
7
  ```vue
41
8
  <template>
42
- <sohelp-condition
43
- v-model="conditions"
44
- :fields="fieldList"
45
- />
9
+ <sohelp-condition v-model="condition" :value="condition" :fields="fields" />
46
10
  </template>
47
11
 
48
12
  <script setup>
49
13
  import { ref } from 'vue';
50
-
51
- const fieldList = [
52
- { label: '用户名', value: 'username' },
53
- { label: '邮箱', value: 'email' },
54
- { label: '年龄', value: 'age' }
55
- ];
56
-
57
- const conditions = ref({
58
- and: []
14
+ const fields = ref([
15
+ { label: '姓名', name: 'name' },
16
+ { label: '年龄', name: 'age' }
17
+ ]);
18
+ const condition = ref({
19
+ type: 'and',
20
+ children: []
59
21
  });
60
22
  </script>
61
23
  ```
24
+
25
+ ## 属性 (Props)
26
+
27
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 |
28
+ | --- | --- | --- | --- | --- |
29
+ | modelValue (v-model) | Object | - | 是 | 条件数据对象 |
30
+ | value | Object | - | 是 | 当前条件节点数据(含 `type` 和 `children`) |
31
+ | fields | Array | - | 是 | 可选字段列表,每项含 `label` 和 `name` |
32
+ | currentIndex | Number | `-1` | 否 | 当前条件在父级中的索引,用于删除操作 |
33
+
34
+ 支持的比较操作符:`LIKE`(包含)、`NOT_LIKE`(不包含)、`EQ`(等于)、`NE`(不等于)、`GT`(大于)、`LT`(小于)、`GTE`(大于等于)、`LTE`(小于等于)、`LEFT_LIKE`(左包含)、`RIGHT_LIKE`(右包含)、`EMPTY`(为空)、`NOT_EMPTY`(不为空)。
35
+
36
+ ## 事件 (Events)
37
+
38
+ | 事件名 | 回调参数 | 说明 |
39
+ | --- | --- | --- |
40
+ | update:modelValue | `value: Object` | 条件变更时触发 |
41
+ | removeCondition | `index: Number` | 请求父级移除当前条件组 |
@@ -64,10 +64,11 @@
64
64
  </template>
65
65
 
66
66
  <script>
67
+ import { defineAsyncComponent } from 'vue';
67
68
  export default {
68
69
  name: 'SohelpCondition',
69
70
  components: {
70
- SohelpCondition: import('./index.vue')
71
+ SohelpCondition: defineAsyncComponent(() => import('./index.vue'))
71
72
  },
72
73
  props: {
73
74
  fields: {
@@ -1,69 +1,8 @@
1
- # 国家选择组件 (SohelpCountrySelect)
1
+ # SohelpCountrySelect 国家选择器
2
2
 
3
- 支持国旗、中英文名称的国家选择组件,具备丝滑的动画过渡效果。
3
+ 基于 `el-select` 封装的国家选择组件,内置国旗图标和中英文国家名称,支持搜索过滤和 v-model 双向绑定。
4
4
 
5
- ## 特性
6
-
7
- - ✅ 支持 25 个主流国家/地区
8
- - ✅ 显示国旗图标 + 中文 + 英文名称
9
- - ✅ 支持搜索过滤
10
- - ✅ 可自定义显示/隐藏国旗
11
- - ✅ 丝滑的动画过渡效果
12
- - ✅ 选中状态高亮显示
13
- - ✅ 支持 v-model 双向绑定
14
- - ✅ 支持所有 el-select 原生属性和事件
15
-
16
- ## 属性 (Props)
17
-
18
- | 属性名 | 类型 | 默认值 | 说明 |
19
- | :--------- | :------ | :----- | :-------------------------------- |
20
- | modelValue | String | '' | 绑定值(国家代码,如 'CN', 'US') |
21
- | showFlag | Boolean | true | 是否显示国旗 |
22
-
23
- **其他属性**:支持通过 `v-bind` 传递所有 el-select 的原生属性,如 `placeholder`、`disabled`、`size`、`multiple` 等
24
-
25
- ## 事件 (Events)
26
-
27
- | 事件名 | 说明 | 回调参数 |
28
- | :---------------- | :----------- | :-------------- |
29
- | update:modelValue | 值变化时触发 | (value: string) |
30
-
31
- **其他事件**:支持通过 `v-on` 绑定所有 el-select 的原生事件
32
-
33
- ## 支持的国家
34
-
35
- | 代码 | 中文 | 英文 |
36
- | :--- | :--------- | :------------- |
37
- | US | 美国 | United States |
38
- | CN | 中国 | China |
39
- | GB | 英国 | United Kingdom |
40
- | JP | 日本 | Japan |
41
- | KR | 韩国 | South Korea |
42
- | HK | 香港 | Hong Kong |
43
- | SG | 新加坡 | Singapore |
44
- | AU | 澳大利亚 | Australia |
45
- | CA | 加拿大 | Canada |
46
- | CH | 瑞士 | Switzerland |
47
- | MY | 马来西亚 | Malaysia |
48
- | TH | 泰国 | Thailand |
49
- | IN | 印度 | India |
50
- | RU | 俄罗斯 | Russia |
51
- | BR | 巴西 | Brazil |
52
- | ZA | 南非 | South Africa |
53
- | MX | 墨西哥 | Mexico |
54
- | PH | 菲律宾 | Philippines |
55
- | ID | 印度尼西亚 | Indonesia |
56
- | VN | 越南 | Vietnam |
57
- | NZ | 新西兰 | New Zealand |
58
- | TR | 土耳其 | Turkey |
59
- | PL | 波兰 | Poland |
60
- | SE | 瑞典 | Sweden |
61
- | NO | 挪威 | Norway |
62
- | DK | 丹麦 | Denmark |
63
-
64
- ## 使用示例
65
-
66
- ### 基础用法
5
+ ## 基础用法
67
6
 
68
7
  ```vue
69
8
  <template>
@@ -71,70 +10,23 @@
71
10
  </template>
72
11
 
73
12
  <script setup>
74
- import { ref } from 'vue';
13
+ import { ref } from 'vue';
75
14
 
76
- const country = ref('CN');
15
+ const country = ref('CN');
77
16
  </script>
78
17
  ```
79
18
 
80
- ### 不显示国旗
81
-
82
- ```vue
83
- <template>
84
- <sohelp-country-select v-model="country" :show-flag="false" />
85
- </template>
86
- ```
87
-
88
- ### 自定义占位符
89
-
90
- ```vue
91
- <template>
92
- <sohelp-country-select v-model="country" placeholder="请选择国家" />
93
- </template>
94
- ```
95
-
96
- ### 禁用状态
97
-
98
- ```vue
99
- <template>
100
- <sohelp-country-select v-model="country" disabled placeholder="禁用状态" />
101
- </template>
102
- ```
103
-
104
- ### 不同尺寸
105
-
106
- ```vue
107
- <template>
108
- <div>
109
- <sohelp-country-select v-model="country1" size="large" />
110
- <sohelp-country-select v-model="country2" />
111
- <sohelp-country-select v-model="country3" size="small" />
112
- </div>
113
- </template>
114
-
115
- <script setup>
116
- import { ref } from 'vue';
117
-
118
- const country1 = ref('CN');
119
- const country2 = ref('US');
120
- const country3 = ref('GB');
121
- </script>
122
- ```
123
-
124
- ### 事件监听
19
+ ## 属性 (Props)
125
20
 
126
- ```vue
127
- <template>
128
- <sohelp-country-select v-model="country" @change="handleChange" />
129
- </template>
21
+ | 属性名 | 类型 | 默认值 | 必填 | 说明 |
22
+ | :--- | :--- | :--- | :--- | :--- |
23
+ | modelValue | String | `''` | 否 | 绑定值,国家代码(如 `'CN'`、`'US'`)(v-model |
24
+ | showFlag | Boolean | `true` | 否 | 是否显示国旗图标 |
130
25
 
131
- <script setup>
132
- import { ref } from 'vue';
26
+ > 同时支持所有 `el-select` 原生属性(如 `placeholder`、`disabled`、`size`),通过 `v-bind="$attrs"` 透传。
133
27
 
134
- const country = ref('CN');
28
+ ## 事件 (Events)
135
29
 
136
- const handleChange = (value) => {
137
- console.log('选择的国家:', value);
138
- };
139
- </script>
140
- ```
30
+ | 事件名 | 回调参数 | 说明 |
31
+ | :--- | :--- | :--- |
32
+ | update:modelValue | `(value: string)` | 选中国家变化时触发 |