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.
- package/components.js +1 -0
- package/icons/flag/README.md +2 -2
- package/icons/flag/index.js +0 -1
- package/package.json +1 -1
- package/sohelp-ace-editor/README.md +32 -42
- package/sohelp-ace-editor/index.vue +166 -156
- package/sohelp-api-doc/README.md +36 -0
- package/sohelp-api-doc/index.vue +160 -0
- package/sohelp-application-select/README.md +9 -7
- package/sohelp-application-select/index.vue +10 -13
- package/sohelp-autocode/README.md +14 -26
- package/sohelp-calendar-view/README.md +9 -7
- package/sohelp-calendar-view/index.vue +10 -9
- package/sohelp-card/README.md +15 -17
- package/sohelp-card/index.vue +1 -1
- package/sohelp-card-view/README.md +9 -7
- package/sohelp-card-view/index.vue +10 -9
- package/sohelp-condition/README.md +29 -49
- package/sohelp-condition/index.vue +2 -1
- package/sohelp-country-select/README.md +15 -123
- package/sohelp-country-select/index.vue +1 -1
- package/sohelp-cry-input/README.md +19 -195
- package/sohelp-cry-input/index.vue +6 -2
- package/sohelp-date/README.md +12 -15
- package/sohelp-datetime/README.md +15 -17
- package/sohelp-datetime-picker/README.md +18 -18
- package/sohelp-datetime-picker/index.vue +11 -4
- package/sohelp-datetime-range/README.md +20 -23
- package/sohelp-demo-block/README.md +43 -0
- package/sohelp-demo-block/index.vue +229 -0
- package/sohelp-dict/README.md +28 -23
- package/sohelp-dict/index.vue +17 -17
- package/sohelp-drawer/README.md +28 -26
- package/sohelp-drop-card/README.md +29 -28
- package/sohelp-drop-card/index.vue +0 -1
- package/sohelp-dyn-select/README.md +31 -16
- package/sohelp-dyn-select/index.vue +65 -67
- package/sohelp-dyn-tree/README.md +26 -20
- package/sohelp-dyn-tree/index.vue +2 -2
- package/sohelp-dyn-tree-select/README.md +28 -19
- package/sohelp-dyn-tree-select/index.vue +23 -7
- package/sohelp-entity-form/README.md +65 -30
- package/sohelp-entity-form/index.vue +3 -2
- package/sohelp-entity-grid/README.md +13 -11
- package/sohelp-entity-grid/index.vue +1 -1
- package/sohelp-file-upload/README.md +25 -27
- package/sohelp-file-upload/index.vue +1 -1
- package/sohelp-filter-scheme/README.md +34 -30
- package/sohelp-filter-scheme/index.vue +2 -2
- package/sohelp-grid/README.md +52 -33
- package/sohelp-grid/index.vue +41 -39
- package/sohelp-grid/js/SohelpGridConfig.js +3 -3
- package/sohelp-grid/js/useSohelpGridConfig.js +4 -6
- package/sohelp-grid-select/README.md +32 -27
- package/sohelp-grid-select/index.vue +6 -5
- package/sohelp-grid-view/README.md +51 -22
- package/sohelp-grid-view-select/README.md +33 -25
- package/sohelp-grid-view-select/index.vue +2 -1
- package/sohelp-group-view/README.md +14 -4
- package/sohelp-group-view/index.vue +10 -9
- package/sohelp-icon-select/README.md +14 -12
- package/sohelp-image-upload/README.md +27 -27
- package/sohelp-image-upload/index.vue +2 -2
- package/sohelp-import/README.md +25 -24
- package/sohelp-input/README.md +27 -11
- package/sohelp-input/index.vue +15 -2
- package/sohelp-input-tag/README.md +53 -0
- package/sohelp-input-tag/index.vue +337 -0
- package/sohelp-modal/README.md +42 -16
- package/sohelp-modal/index.vue +21 -4
- package/sohelp-modal-select/README.md +745 -0
- package/sohelp-modal-select/index.vue +705 -0
- package/sohelp-module/README.md +24 -13
- package/sohelp-number-input/README.md +15 -8
- package/sohelp-number-input/index.vue +3 -0
- package/sohelp-number-range/README.md +22 -12
- package/sohelp-number-range/index.vue +3 -11
- package/sohelp-org-modal-select/README.md +47 -0
- package/sohelp-org-modal-select/index.vue +411 -0
- package/sohelp-org-select/README.md +23 -10
- package/sohelp-org-select/index.vue +41 -24
- package/sohelp-org-tree/README.md +19 -7
- package/sohelp-org-tree/index.vue +1 -2
- package/sohelp-org-tree-select/README.md +22 -11
- package/sohelp-org-tree-select/index.vue +1 -2
- package/sohelp-org-user-tree/README.md +19 -7
- package/sohelp-org-user-tree/index.vue +1 -2
- package/sohelp-org-user-tree-select/README.md +8 -3
- package/sohelp-org-user-tree-select/index.vue +8 -7
- package/sohelp-page/README.md +20 -11
- package/sohelp-page/index.vue +1 -1
- package/sohelp-pagination/README.md +14 -6
- package/sohelp-pagination/index.vue +1 -1
- package/sohelp-power/README.md +34 -19
- package/sohelp-power/index.vue +2 -2
- package/sohelp-pro-form/README.md +64 -21
- package/sohelp-pro-layout/README.md +10 -4
- package/sohelp-pro-layout/index.vue +8 -7
- package/sohelp-pro-table/README.md +30 -6
- package/sohelp-process/README.md +26 -13
- package/sohelp-process/index.vue +6 -6
- package/sohelp-rate/README.md +24 -12
- package/sohelp-rate/index.vue +5 -1
- package/sohelp-relation/README.md +10 -4
- package/sohelp-relation/index.vue +8 -7
- package/sohelp-relation-modal-select/README.md +41 -0
- package/sohelp-relation-modal-select/index.vue +70 -0
- package/sohelp-rich-text/README.md +29 -11
- package/sohelp-rich-text/index.vue +21 -20
- package/sohelp-richtext/README.md +12 -2
- package/sohelp-richtext/index.vue +8 -6
- package/sohelp-role-modal-select/README.md +45 -0
- package/sohelp-role-modal-select/index.vue +111 -0
- package/sohelp-role-select/README.md +18 -10
- package/sohelp-role-select/index.vue +36 -27
- package/sohelp-search/README.md +12 -4
- package/sohelp-search/index.vue +2 -2
- package/sohelp-search-pro-form/README.md +15 -1
- package/sohelp-search-pro-form/index.vue +2 -1
- package/sohelp-select/README.md +31 -30
- package/sohelp-select/index.vue +79 -84
- package/sohelp-split-panel/README.md +17 -18
- package/sohelp-switch/README.md +21 -19
- package/sohelp-switch/index.vue +34 -33
- package/sohelp-table/README.md +35 -27
- package/sohelp-table/index.vue +110 -109
- package/sohelp-table-select/README.md +55 -0
- package/sohelp-tenant-select/README.md +19 -18
- package/sohelp-tenant-select/index.vue +105 -109
- package/sohelp-text/README.md +16 -10
- package/sohelp-text/index.vue +5 -5
- package/sohelp-textarea-input/README.md +19 -12
- package/sohelp-time/README.md +11 -10
- package/sohelp-tree/README.md +24 -19
- package/sohelp-tree/index.vue +21 -23
- package/sohelp-tree-select/README.md +23 -10
- package/sohelp-user-modal-select/README.md +739 -0
- package/sohelp-user-modal-select/index.vue +87 -0
- package/sohelp-user-select/README.md +26 -15
- package/sohelp-user-select/index.vue +6 -2
- package/sohelp-user-tag/README.md +5 -7
- package/sohelp-user-tag/index.vue +8 -8
- package/sohelp-user-tree/README.md +5 -8
- package/sohelp-user-tree/index.vue +8 -7
- package/sohelp-vform-drawer/README.md +36 -18
- package/sohelp-vform-drawer/index.vue +2 -2
- package/sohelp-vform-eleplus/README.md +33 -31
- package/sohelp-vform-eleplus/index.vue +2 -2
- package/sohelp-vform-eleplus/tinymce/langs/zh_CN.js +461 -461
- package/sohelp-vform-eleplus/tinymce/langs/zh_TW.js +418 -418
- package/sohelp-vform-eleplus/tinymce/skins/content/dark/content.css +72 -72
- package/sohelp-vform-eleplus/tinymce/skins/content/dark/content.min.css +7 -7
- package/sohelp-vform-eleplus/tinymce/skins/content/default/content.css +67 -67
- package/sohelp-vform-eleplus/tinymce/skins/content/default/content.min.css +7 -7
- package/sohelp-vform-eleplus/tinymce/skins/content/document/content.css +72 -72
- package/sohelp-vform-eleplus/tinymce/skins/content/document/content.min.css +7 -7
- package/sohelp-vform-eleplus/tinymce/skins/content/writer/content.css +68 -68
- package/sohelp-vform-eleplus/tinymce/skins/content/writer/content.min.css +7 -7
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.css +732 -732
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.inline.css +726 -726
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.inline.min.css +7 -7
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.min.css +7 -7
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.mobile.css +29 -29
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.mobile.min.css +7 -7
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.css +3047 -3047
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.min.css +7 -7
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.mobile.css +673 -673
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.mobile.min.css +7 -7
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.shadowdom.css +37 -37
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.shadowdom.min.css +7 -7
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.css +714 -714
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.inline.css +726 -726
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.inline.min.css +7 -7
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.min.css +7 -7
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.mobile.css +29 -29
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.mobile.min.css +7 -7
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.css +3047 -3047
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.min.css +7 -7
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.mobile.css +673 -673
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +7 -7
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +37 -37
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +7 -7
- package/sohelp-vform-modal/README.md +36 -18
- package/sohelp-vform-modal/index.vue +2 -2
- package/sohelp-vform-select/README.md +9 -7
- package/sohelp-vform-select/index.vue +8 -7
- package/sohelp-vxe-grid/DefaultGridOptions.js +5 -3
- package/sohelp-vxe-grid/DefaultProps.js +0 -1
- package/sohelp-vxe-grid/README.md +540 -35
- package/sohelp-vxe-grid/SohelpGridConfig.js +8 -6
- package/sohelp-vxe-grid/index.vue +141 -94
- package/sohelp-vxe-grid-select/README.md +41 -26
- package/sohelp-vxe-table/README.md +23 -20
- package/sohelp-vxe-table/index.vue +5 -4
- package/sohelp-workflow/README.md +21 -17
- package/sohelp-workflow/index.vue +25 -22
- package/sohelp-workflow-drawer/README.md +41 -28
- package/sohelp-workflow-drawer/components/table.vue +7 -1
- package/sohelp-workflow-drawer/index.vue +86 -71
- package/sohelp-workflow-drawer/js/index.js +15 -13
- package/style/index.scss +0 -0
- package/utils/safe-eval.js +89 -0
- package/sohelp-dyn-select/props.js +0 -67
- package/sohelp-user-select/index.vue~ +0 -53
- package/sohelp-user-select/props.js +0 -71
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
#
|
|
1
|
+
# SohelpApplicationSelect 应用选择器
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
应用列表选择组件,用于选择系统中的应用。当前为占位状态,功能待实现。
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
该组件目前主要作为展示用途,暂无特定配置属性。
|
|
8
|
-
|
|
9
|
-
## 使用示例
|
|
5
|
+
## 基础用法
|
|
10
6
|
|
|
11
7
|
```vue
|
|
12
8
|
<template>
|
|
13
9
|
<sohelp-application-select />
|
|
14
10
|
</template>
|
|
15
11
|
```
|
|
12
|
+
|
|
13
|
+
## 属性 (Props)
|
|
14
|
+
|
|
15
|
+
| 属性名 | 类型 | 默认值 | 必填 | 说明 |
|
|
16
|
+
| :--- | :--- | :--- | :--- | :--- |
|
|
17
|
+
| - | - | - | - | 当前暂无属性,待功能实现后补充 |
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
name: "SohelpApplicationSelect"
|
|
4
|
-
}
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
1
|
<template>
|
|
8
|
-
<div>
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
<div class="sohelp-application-select">
|
|
3
|
+
<!-- TODO: 待实现 - 应用列表选择器 -->
|
|
4
|
+
<el-empty description="应用列表选择器 - 待实现" />
|
|
5
|
+
</div>
|
|
11
6
|
</template>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
<script setup>
|
|
8
|
+
// TODO: 待实现
|
|
9
|
+
</script>
|
|
10
|
+
<script>
|
|
11
|
+
export default { name: 'SohelpApplicationSelect' };
|
|
12
|
+
</script>
|
|
@@ -1,38 +1,26 @@
|
|
|
1
|
-
#
|
|
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
|
-
# 日历视图
|
|
1
|
+
# SohelpCalendarView 日历视图
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
基于 `el-empty` 的日历视图占位组件,当前功能待实现。
|
|
4
4
|
|
|
5
|
-
##
|
|
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
|
|
2
|
+
<div class="sohelp-calendar-view">
|
|
3
|
+
<!-- TODO: 待实现 - 日历视图 -->
|
|
4
|
+
<el-empty description="日历视图 - 待实现" />
|
|
5
|
+
</div>
|
|
7
6
|
</template>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
<script setup>
|
|
8
|
+
// TODO: 待实现
|
|
9
|
+
</script>
|
|
10
|
+
<script>
|
|
11
|
+
export default { name: 'SohelpCalendarView' };
|
|
12
|
+
</script>
|
package/sohelp-card/README.md
CHANGED
|
@@ -1,22 +1,8 @@
|
|
|
1
|
-
# 卡片容器
|
|
1
|
+
# SohelpCard 卡片容器
|
|
2
2
|
|
|
3
|
-
基于 `ele-card`
|
|
3
|
+
基于 `ele-card` 封装的卡片容器组件,默认启用 `flex-table` 布局,通过 `v-bind="$attrs"` 透传所有属性至 `ele-card`。
|
|
4
4
|
|
|
5
|
-
##
|
|
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 | 卡片内容区域 |
|
package/sohelp-card/index.vue
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
# 卡片视图
|
|
1
|
+
# SohelpCardView 卡片视图
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
当前版本仅为占位组件,卡片视图展示功能待实现。
|
|
4
4
|
|
|
5
|
-
##
|
|
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
|
|
2
|
+
<div class="sohelp-card-view">
|
|
3
|
+
<!-- TODO: 待实现 - 卡片视图 -->
|
|
4
|
+
<el-empty description="卡片视图 - 待实现" />
|
|
5
|
+
</div>
|
|
7
6
|
</template>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
<script setup>
|
|
8
|
+
// TODO: 待实现
|
|
9
|
+
</script>
|
|
10
|
+
<script>
|
|
11
|
+
export default { name: 'SohelpCardView' };
|
|
12
|
+
</script>
|
|
@@ -1,61 +1,41 @@
|
|
|
1
|
-
#
|
|
1
|
+
# SohelpCondition 条件构造器
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
52
|
-
{ label: '
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
#
|
|
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
|
-
|
|
13
|
+
import { ref } from 'vue';
|
|
75
14
|
|
|
76
|
-
|
|
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
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
21
|
+
| 属性名 | 类型 | 默认值 | 必填 | 说明 |
|
|
22
|
+
| :--- | :--- | :--- | :--- | :--- |
|
|
23
|
+
| modelValue | String | `''` | 否 | 绑定值,国家代码(如 `'CN'`、`'US'`)(v-model) |
|
|
24
|
+
| showFlag | Boolean | `true` | 否 | 是否显示国旗图标 |
|
|
130
25
|
|
|
131
|
-
|
|
132
|
-
import { ref } from 'vue';
|
|
26
|
+
> 同时支持所有 `el-select` 原生属性(如 `placeholder`、`disabled`、`size`),通过 `v-bind="$attrs"` 透传。
|
|
133
27
|
|
|
134
|
-
|
|
28
|
+
## 事件 (Events)
|
|
135
29
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
</script>
|
|
140
|
-
```
|
|
30
|
+
| 事件名 | 回调参数 | 说明 |
|
|
31
|
+
| :--- | :--- | :--- |
|
|
32
|
+
| update:modelValue | `(value: string)` | 选中国家变化时触发 |
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
<script setup>
|
|
22
22
|
import { ref, defineAsyncComponent, watch, computed } from 'vue';
|
|
23
|
-
import { FlagMap, CountryCodeToCurrency, CountryNameMap } from '
|
|
23
|
+
import { FlagMap, CountryCodeToCurrency, CountryNameMap } from '../icons/flag';
|
|
24
24
|
|
|
25
25
|
// Props 定义
|
|
26
26
|
const props = defineProps({
|