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,36 +1,44 @@
|
|
|
1
|
-
# SohelpGridViewSelect
|
|
1
|
+
# SohelpGridViewSelect 网格弹窗选择器
|
|
2
2
|
|
|
3
|
-
基于
|
|
3
|
+
基于 el-input 和 ele-modal 弹窗封装的网格数据选择组件。点击输入框右侧按钮弹出模态窗口,内嵌 SohelpGridView 网格列表进行数据选择,支持单选和多选模式,已选项以 Tag 标签形式展示在输入框前缀中。
|
|
4
4
|
|
|
5
5
|
## 基础用法
|
|
6
6
|
|
|
7
|
-
```
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
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
|
-
|
|
|
28
|
-
| update:
|
|
29
|
-
|
|
|
30
|
-
|
|
|
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
|
-
|
|
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
|
|
2
|
+
<div class="sohelp-group-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: 'SohelpGroupView' };
|
|
12
|
+
</script>
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
# SohelpIconSelect 图标选择器
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
基于 `el-select` 封装的图标选择组件,内置 Element Plus、EleAdminPlus 和 VxeUI 三个图标库,支持可视化预览、搜索过滤和选中图标前缀展示。
|
|
4
4
|
|
|
5
5
|
## 基础用法
|
|
6
6
|
|
|
7
|
-
```
|
|
8
|
-
<
|
|
9
|
-
|
|
7
|
+
```vue
|
|
8
|
+
<template>
|
|
9
|
+
<sohelp-icon-select v-model="iconName" />
|
|
10
|
+
</template>
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
<script setup>
|
|
13
|
+
import { ref } from 'vue';
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
const iconName = ref('');
|
|
16
|
+
</script>
|
|
17
|
+
```
|
|
15
18
|
|
|
16
|
-
##
|
|
19
|
+
## 属性 (Props)
|
|
17
20
|
|
|
18
|
-
|
|
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
|
-
```
|
|
8
|
-
<
|
|
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
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
|
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:
|
|
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);
|
package/sohelp-import/README.md
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
# SohelpImport
|
|
1
|
+
# SohelpImport 数据导入
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
基于 `ele-modal` 封装的 Excel 数据导入组件,支持文件上传、数据预览、模板下载、导入历史查看和恢复。
|
|
4
4
|
|
|
5
5
|
## 基础用法
|
|
6
6
|
|
|
7
|
-
```
|
|
8
|
-
<
|
|
9
|
-
v-model="
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
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
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
28
|
-
## 功能特性
|
|
29
|
-
|
|
30
|
-
- **模板下载**: 根据 `refid` 下载对应的 Excel 导入模板。
|
|
31
|
-
- **文件上传**: 支持拖拽上传,限制文件格式 (.xls, .xlsx) 和大小。
|
|
32
|
-
- **数据预览**: 上传后自动解析并展示前 50 条数据供预览。
|
|
33
|
-
- **导入历史**: 查看历史导入记录,支持重新下载原文件、恢复导入或删除记录。
|
|
34
|
-
- **配置映射**: (可选) 支持配置 Excel 列与系统字段的映射关系。
|
|
35
|
-
- **进度反馈**: 上传和解析过程有明确的进度和状态提示。
|
|
33
|
+
| 事件名 | 回调参数 | 说明 |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| update:modelValue | `value: Boolean` | 弹窗显示状态变化 |
|
|
36
|
+
| close | - | 弹窗关闭时触发 |
|
package/sohelp-input/README.md
CHANGED
|
@@ -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
|
-
```
|
|
8
|
-
<
|
|
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
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
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
|
-
|
|
30
|
+
| 插槽名 | 说明 |
|
|
31
|
+
| :--- | :--- |
|
|
32
|
+
| prefix | 输入框头部内容 |
|
|
33
|
+
| suffix | 输入框尾部内容 |
|
|
34
|
+
| prepend | 输入框前置内容 |
|
|
35
|
+
| append | 输入框后置内容 |
|
|
20
36
|
|
|
21
|
-
|
|
37
|
+
> 动态透传所有 `el-input` 支持的插槽。
|
package/sohelp-input/index.vue
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
v-model="modelValue"
|
|
5
5
|
clearable
|
|
6
6
|
ref="inputRef"
|
|
7
|
-
:disabled="
|
|
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) {
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# SohelpInputTag 标签输入框
|
|
2
|
+
|
|
3
|
+
基于 `el-input` + `el-tag` 封装的标签输入组件,支持按键触发添加标签、Backspace 删除末尾标签、标签数量限制、失焦自动保存等功能。
|
|
4
|
+
|
|
5
|
+
## 基础用法
|
|
6
|
+
|
|
7
|
+
```vue
|
|
8
|
+
<template>
|
|
9
|
+
<sohelp-input-tag v-model="tags" placeholder="输入后按回车添加" />
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup>
|
|
13
|
+
import { ref } from 'vue';
|
|
14
|
+
const tags = ref(['标签1', '标签2']);
|
|
15
|
+
</script>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## 属性 (Props)
|
|
19
|
+
|
|
20
|
+
| 属性名 | 类型 | 默认值 | 必填 | 说明 |
|
|
21
|
+
| :--- | :--- | :--- | :--- | :--- |
|
|
22
|
+
| modelValue | Array | `[]` | 否 | 绑定值(标签字符串数组,支持 v-model) |
|
|
23
|
+
| size | String | `''` | 否 | 尺寸,可选 `'large'` / `'default'`,默认跟随全局配置 |
|
|
24
|
+
| trigger | String | `'Enter'` | 否 | 触发添加标签的按键名称 |
|
|
25
|
+
| clearable | Boolean | `true` | 否 | 是否显示一键清空按钮 |
|
|
26
|
+
| closeable | Boolean | `true` | 否 | 标签是否可单独关闭删除 |
|
|
27
|
+
| disabled | Boolean | `false` | 否 | 是否禁用 |
|
|
28
|
+
| readonly | Boolean | `false` | 否 | 是否只读 |
|
|
29
|
+
| saveOnBlur | Boolean | `false` | 否 | 失焦时是否自动将当前输入内容添加为标签 |
|
|
30
|
+
| max | Number | `undefined` | 否 | 最多可添加的标签数量 |
|
|
31
|
+
| autofocus | Boolean | `false` | 否 | 组件挂载后是否自动获取焦点 |
|
|
32
|
+
| id | String | `''` | 否 | 输入框 id |
|
|
33
|
+
| placeholder | String | `''` | 否 | 占位文本,有标签时自动隐藏 |
|
|
34
|
+
|
|
35
|
+
## 事件 (Events)
|
|
36
|
+
|
|
37
|
+
| 事件名 | 回调参数 | 说明 |
|
|
38
|
+
| :--- | :--- | :--- |
|
|
39
|
+
| update:modelValue | `(value: Array)` | 绑定值变化时触发 |
|
|
40
|
+
| change | `(value: Array)` | 绑定值变化时触发 |
|
|
41
|
+
| input | `(value: String)` | 输入框内容变化时触发 |
|
|
42
|
+
| add-tag | `(tag: String)` | 标签被添加时触发 |
|
|
43
|
+
| remove-tag | `(tag: String)` | 标签被移除时触发 |
|
|
44
|
+
| focus | `(event: FocusEvent)` | 输入框获取焦点时触发 |
|
|
45
|
+
| blur | `(event: FocusEvent)` | 输入框失去焦点时触发 |
|
|
46
|
+
| clear | - | 点击清空按钮时触发 |
|
|
47
|
+
|
|
48
|
+
## 公开方法 (Expose)
|
|
49
|
+
|
|
50
|
+
| 方法名 | 说明 |
|
|
51
|
+
| :--- | :--- |
|
|
52
|
+
| `focus()` | 使输入框获取焦点 |
|
|
53
|
+
| `blur()` | 使输入框失去焦点 |
|