sohelp-eleplus 1.1.21 → 1.1.22
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/cache/DictCache.js +38 -7
- package/cache/ModuleCache.js +18 -1
- package/cache/README.md +53 -0
- package/http/CrudHttp.js +70 -36
- package/http/DictHttp.js +5 -1
- package/http/ModuleHttp.js +26 -11
- package/http/README.md +50 -0
- package/http/SohelpHttp.js +48 -49
- package/package.json +1 -1
- package/sohelp-ace-editor/README.md +53 -0
- package/sohelp-application-select/README.md +15 -0
- package/sohelp-autocode/README.md +38 -0
- package/sohelp-autocode/index.vue +7 -7
- package/sohelp-calendar-view/README.md +15 -0
- package/sohelp-card/README.md +27 -0
- package/sohelp-card-view/README.md +15 -0
- package/sohelp-condition/README.md +61 -0
- package/sohelp-cry-input/README.md +30 -0
- package/sohelp-date/README.md +27 -0
- package/sohelp-datetime/README.md +29 -0
- package/sohelp-datetime-picker/README.md +36 -0
- package/sohelp-datetime-range/README.md +35 -0
- package/sohelp-dict/README.md +43 -0
- package/sohelp-dict/index.vue +42 -25
- package/sohelp-drawer/README.md +42 -0
- package/sohelp-drawer/index.vue +4 -1
- package/sohelp-drop-card/README.md +41 -0
- package/sohelp-dyn-select/README.md +36 -0
- package/sohelp-dyn-tree/README.md +31 -0
- package/sohelp-dyn-tree-select/README.md +28 -0
- package/sohelp-entity-form/README.md +45 -0
- package/sohelp-entity-form/index.vue +9 -4
- package/sohelp-entity-grid/README.md +18 -0
- package/sohelp-file-upload/README.md +35 -0
- package/sohelp-file-upload/index.vue +21 -3
- package/sohelp-filter-scheme/README.md +41 -0
- package/sohelp-grid/README.md +47 -0
- package/sohelp-grid/index.vue +40 -18
- package/sohelp-grid/js/DefaultGridOptions.js +2 -1
- package/sohelp-grid/js/useSohelpGridConfig.js +32 -4
- package/sohelp-grid-select/README.md +38 -0
- package/sohelp-grid-view/README.md +34 -0
- package/sohelp-grid-view/filter/README.md +45 -0
- package/sohelp-grid-view/filter/config/README.md +37 -0
- package/sohelp-grid-view/filter/filter-form.vue +15 -12
- package/sohelp-grid-view-select/README.md +36 -0
- package/sohelp-group-view/README.md +7 -0
- package/sohelp-icon-select/README.md +21 -0
- package/sohelp-image-upload/README.md +35 -0
- package/sohelp-import/README.md +35 -0
- package/sohelp-input/README.md +21 -0
- package/sohelp-modal/README.md +30 -0
- package/sohelp-modal/index.vue +2 -1
- package/sohelp-module/README.md +24 -0
- package/sohelp-number-input/README.md +18 -0
- package/sohelp-number-range/README.md +24 -0
- package/sohelp-org-select/README.md +20 -0
- package/sohelp-org-tree/README.md +18 -0
- package/sohelp-org-tree-select/README.md +22 -0
- package/sohelp-org-user-tree/README.md +18 -0
- package/sohelp-org-user-tree-select/README.md +7 -0
- package/sohelp-page/README.md +21 -0
- package/sohelp-pagination/README.md +13 -0
- package/sohelp-power/README.md +27 -0
- package/sohelp-pro-form/README.md +35 -0
- package/sohelp-pro-form/components/pro-form-item.vue +3 -2
- package/sohelp-pro-form/util.js +6 -13
- package/sohelp-pro-layout/README.md +7 -0
- package/sohelp-pro-table/README.md +13 -0
- package/sohelp-process/README.md +24 -0
- package/sohelp-rate/README.md +23 -0
- package/sohelp-relation/README.md +7 -0
- package/sohelp-rich-text/README.md +23 -0
- package/sohelp-richtext/README.md +3 -0
- package/sohelp-role-select/README.md +20 -0
- package/sohelp-search/README.md +7 -0
- package/sohelp-search-pro-form/README.md +3 -0
- package/sohelp-select/README.md +51 -0
- package/sohelp-split-panel/README.md +31 -0
- package/sohelp-switch/README.md +33 -0
- package/sohelp-table/README.md +36 -0
- package/sohelp-tenant-select/README.md +31 -0
- package/sohelp-text/README.md +17 -0
- package/sohelp-textarea-input/README.md +24 -0
- package/sohelp-textarea-input/index.vue +16 -11
- package/sohelp-time/README.md +22 -0
- package/sohelp-tree/README.md +32 -0
- package/sohelp-tree-select/README.md +18 -0
- package/sohelp-user-select/README.md +22 -0
- package/sohelp-user-tag/README.md +15 -0
- package/sohelp-user-tree/README.md +15 -0
- package/sohelp-vform-drawer/README.md +25 -0
- package/sohelp-vform-eleplus/README.md +39 -0
- package/sohelp-vform-modal/README.md +25 -0
- package/sohelp-vform-select/README.md +15 -0
- package/sohelp-vxe-grid/README.md +50 -0
- package/sohelp-vxe-grid-select/README.md +36 -0
- package/sohelp-vxe-table/README.md +27 -0
- package/sohelp-workflow/README.md +28 -0
- package/sohelp-workflow-drawer/README.md +38 -0
- package/sohelp-grid/SohelpGridConfig.js~ +0 -408
package/sohelp-pro-form/util.js
CHANGED
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 表单数据类型为字符串的组件类型
|
|
3
3
|
*/
|
|
4
|
-
export const stringTypes = [
|
|
5
|
-
'input',
|
|
6
|
-
'textarea',
|
|
7
|
-
'date',
|
|
8
|
-
'datetime',
|
|
9
|
-
'time',
|
|
10
|
-
'timeSelect',
|
|
11
|
-
'autocomplete',
|
|
12
|
-
'editor'
|
|
13
|
-
];
|
|
4
|
+
export const stringTypes = ['input', 'textarea', 'date', 'datetime', 'time', 'timeSelect', 'autocomplete', 'editor'];
|
|
14
5
|
|
|
15
6
|
/**
|
|
16
7
|
* 表单数据类型为数字的组件类型
|
|
@@ -25,7 +16,8 @@ export const numberTypes = [
|
|
|
25
16
|
'inputNumber',
|
|
26
17
|
'rate',
|
|
27
18
|
'slider',
|
|
28
|
-
'tableSelect'
|
|
19
|
+
'tableSelect',
|
|
20
|
+
'SohelpDict'
|
|
29
21
|
];
|
|
30
22
|
|
|
31
23
|
/**
|
|
@@ -53,7 +45,7 @@ export const arrayTypes = [
|
|
|
53
45
|
/**
|
|
54
46
|
* 表单验证规则使用blur触发的组件类型
|
|
55
47
|
*/
|
|
56
|
-
export const blurTypes = ['input', 'textarea'];
|
|
48
|
+
export const blurTypes = ['input', 'textarea', 'SohelpDict'];
|
|
57
49
|
|
|
58
50
|
/**
|
|
59
51
|
* 选择类型的组件类型
|
|
@@ -89,7 +81,8 @@ export const selectTypes = [
|
|
|
89
81
|
'dictSelect',
|
|
90
82
|
'dictCheckbox',
|
|
91
83
|
'dictMultipleSelect',
|
|
92
|
-
'regions'
|
|
84
|
+
'regions',
|
|
85
|
+
'SohelpDict'
|
|
93
86
|
];
|
|
94
87
|
|
|
95
88
|
/**
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# SohelpProcess 进度条组件
|
|
2
|
+
|
|
3
|
+
可拖拽的进度条组件,支持只读模式和动画效果。
|
|
4
|
+
|
|
5
|
+
## 基础用法
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<sohelp-process v-model="percent" :color="'#35b558'" />
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 属性 (Props)
|
|
12
|
+
|
|
13
|
+
| 属性名 | 类型 | 默认值 | 说明 |
|
|
14
|
+
| modelValue | Number | 0 | 进度值 (0-100) |
|
|
15
|
+
| readonly | Boolean | false | 是否只读(不可拖拽) |
|
|
16
|
+
| height | Number | 8 | 进度条高度 |
|
|
17
|
+
| color | String | '#35b558' | 进度条颜色 |
|
|
18
|
+
| animate | Boolean | false | 是否启用动画 |
|
|
19
|
+
| showPercent | Boolean | false | 是否显示百分比文字 |
|
|
20
|
+
|
|
21
|
+
## 事件 (Events)
|
|
22
|
+
|
|
23
|
+
| 事件名 | 说明 | 回调参数 |
|
|
24
|
+
| update:modelValue | 拖拽改变进度时触发 | (value: Number) |
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# SohelpRate 评分组件
|
|
2
|
+
|
|
3
|
+
支持两种模式:星星评分和下拉选择评分。
|
|
4
|
+
|
|
5
|
+
## 基础用法
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<!-- 星星模式 -->
|
|
9
|
+
<sohelp-rate v-model="score" />
|
|
10
|
+
|
|
11
|
+
<!-- 下拉模式 -->
|
|
12
|
+
<sohelp-rate v-model="score" type="select" />
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## 属性 (Props)
|
|
16
|
+
|
|
17
|
+
| 属性名 | 类型 | 默认值 | 说明 |
|
|
18
|
+
| modelValue | Number/String | - | 评分值 |
|
|
19
|
+
| type | String | 'rate' | 显示模式:'rate' (星星) 或 'select' (下拉) |
|
|
20
|
+
|
|
21
|
+
## 其他
|
|
22
|
+
|
|
23
|
+
支持 `el-rate` 或 `sohelp-select` 的相关属性。
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# SohelpRichText 富文本编辑器
|
|
2
|
+
|
|
3
|
+
基于 TinyMCE 封装的富文本编辑器,支持暗黑模式自动切换。
|
|
4
|
+
|
|
5
|
+
## 基础用法
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<sohelp-rich-text v-model="content" />
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 属性 (Props)
|
|
12
|
+
|
|
13
|
+
| 属性名 | 类型 | 默认值 | 说明 |
|
|
14
|
+
| modelValue | String | - | 绑定的 HTML 内容 |
|
|
15
|
+
| disabled | Boolean | false | 是否禁用(只读) |
|
|
16
|
+
| inline | Boolean | false | 是否开启内联模式 |
|
|
17
|
+
| init | Object | - | TinyMCE 初始化配置对象 |
|
|
18
|
+
| autoTheme | Boolean | true | 是否跟随系统主题自动切换 |
|
|
19
|
+
|
|
20
|
+
## 公开方法 (Expose)
|
|
21
|
+
|
|
22
|
+
- `editorIns`: 获取 TinyMCE 编辑器实例。
|
|
23
|
+
- `alert(option)`: 弹出提示框。
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# SohelpRoleSelect 角色选择器
|
|
2
|
+
|
|
3
|
+
基于 `sohelp-dyn-select` 封装,预设了角色列表的接口地址。
|
|
4
|
+
|
|
5
|
+
## 基础用法
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<sohelp-role-select v-model="roleId" />
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 属性 (Props)
|
|
12
|
+
|
|
13
|
+
| 属性名 | 类型 | 默认值 | 说明 |
|
|
14
|
+
| url | String | '/engine/web/role/list' | 数据接口地址 |
|
|
15
|
+
| labelField | String | 'role_name' | 显示文本字段 |
|
|
16
|
+
| valueField | String | 'id' | 值字段 |
|
|
17
|
+
|
|
18
|
+
## 其他
|
|
19
|
+
|
|
20
|
+
支持 `sohelp-dyn-select` 的所有属性。
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# SohelpSelect
|
|
2
|
+
|
|
3
|
+
A flexible select component that supports various data sources (Array, Function, Promise), i18n labeling, and multiple selection.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Name | Type | Default | Description |
|
|
8
|
+
| :--- | :--- | :--- | :--- |
|
|
9
|
+
| `datasource` | `Array`, `Function`, `Promise` | Required | The data source for options. Can be a static array, a function returning data, or a promise. |
|
|
10
|
+
| `labelField` | `String` | `'label'` | The field name to use for the option label. |
|
|
11
|
+
| `valueField` | `String` | `'value'` | The field name to use for the option value. |
|
|
12
|
+
| `multiple` | `Boolean` | `false` | Whether to allow selecting multiple options. |
|
|
13
|
+
| `modelValue` | `String`, `Number`, `Boolean`, `Array` | Required | The value of the select (v-model). |
|
|
14
|
+
| `...` | - | - | Supports all `el-select` props. |
|
|
15
|
+
|
|
16
|
+
## Events
|
|
17
|
+
|
|
18
|
+
| Name | Parameters | Description |
|
|
19
|
+
| :--- | :--- | :--- |
|
|
20
|
+
| `update:modelValue` | `(value: any)` | Triggered when the selected value changes. |
|
|
21
|
+
| `change` | `(value: any)` | Triggered when the selection changes. |
|
|
22
|
+
| `optionClick` | `(value: any)` | Triggered when an option is clicked. |
|
|
23
|
+
|
|
24
|
+
## Slots
|
|
25
|
+
|
|
26
|
+
| Name | Description |
|
|
27
|
+
| :--- | :--- |
|
|
28
|
+
| `footer` | Custom content for the footer of the dropdown menu. |
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
```vue
|
|
33
|
+
<template>
|
|
34
|
+
<sohelp-select
|
|
35
|
+
v-model="value"
|
|
36
|
+
:datasource="options"
|
|
37
|
+
label-field="name"
|
|
38
|
+
value-field="id"
|
|
39
|
+
/>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<script setup>
|
|
43
|
+
import { ref } from 'vue';
|
|
44
|
+
|
|
45
|
+
const value = ref('');
|
|
46
|
+
const options = [
|
|
47
|
+
{ id: 1, name: 'Option 1' },
|
|
48
|
+
{ id: 2, name: 'Option 2' }
|
|
49
|
+
];
|
|
50
|
+
</script>
|
|
51
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# SohelpSplitPanel
|
|
2
|
+
|
|
3
|
+
A wrapper component for `ele-split-panel` that simplifies usage and passes through slots and attributes.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Name | Type | Default | Description |
|
|
8
|
+
| :--- | :--- | :--- | :--- |
|
|
9
|
+
| `...` | - | - | Supports all `ele-split-panel` props. |
|
|
10
|
+
|
|
11
|
+
## Slots
|
|
12
|
+
|
|
13
|
+
| Name | Description |
|
|
14
|
+
| :--- | :--- |
|
|
15
|
+
| `default` | Content to be placed inside the split panel. |
|
|
16
|
+
| `...` | - | Passes through all slots supported by `ele-split-panel`. |
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```vue
|
|
21
|
+
<template>
|
|
22
|
+
<sohelp-split-panel>
|
|
23
|
+
<template #left>
|
|
24
|
+
<div>Left Content</div>
|
|
25
|
+
</template>
|
|
26
|
+
<template #right>
|
|
27
|
+
<div>Right Content</div>
|
|
28
|
+
</template>
|
|
29
|
+
</sohelp-split-panel>
|
|
30
|
+
</template>
|
|
31
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# SohelpSwitch
|
|
2
|
+
|
|
3
|
+
A switch component that supports readonly mode and customizable active/inactive values. In readonly mode, it displays a text label instead of the switch control.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Name | Type | Default | Description |
|
|
8
|
+
| :--- | :--- | :--- | :--- |
|
|
9
|
+
| `readonly` | `Boolean` | `false` | If `true`, displays the value as text instead of a switch. |
|
|
10
|
+
| `modelValue` | `String`, `Number`, `Boolean` | - | The value of the switch (v-model). |
|
|
11
|
+
| `activeValue` | `String`, `Number`, `Boolean` | `true` | Value when the switch is on. |
|
|
12
|
+
| `inactiveValue` | `String`, `Number`, `Boolean` | `false` | Value when the switch is off. |
|
|
13
|
+
| `...` | - | - | Supports all `el-switch` props. |
|
|
14
|
+
|
|
15
|
+
## Events
|
|
16
|
+
|
|
17
|
+
| Name | Parameters | Description |
|
|
18
|
+
| :--- | :--- | :--- |
|
|
19
|
+
| `update:modelValue` | `(value: any)` | Triggered when the switch value changes. |
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```vue
|
|
24
|
+
<template>
|
|
25
|
+
<sohelp-switch v-model="value" />
|
|
26
|
+
<sohelp-switch v-model="value" readonly />
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script setup>
|
|
30
|
+
import { ref } from 'vue';
|
|
31
|
+
const value = ref(true);
|
|
32
|
+
</script>
|
|
33
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# SohelpTable
|
|
2
|
+
|
|
3
|
+
A powerful table component wrapper around `ele-pro-table` that integrates with `moduleCache` for configuration loading and supports remote data fetching.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Name | Type | Default | Description |
|
|
8
|
+
| :--- | :--- | :--- | :--- |
|
|
9
|
+
| `refid` | `String` | Required | The configuration ID for the grid layout. |
|
|
10
|
+
| `url` | `String` | `""` | The data source URL for fetching table data. |
|
|
11
|
+
| `where` | `Object` | `{}` | Additional query parameters for the data request. |
|
|
12
|
+
| `...` | - | - | Supports all `ele-pro-table` props. |
|
|
13
|
+
|
|
14
|
+
## Slots
|
|
15
|
+
|
|
16
|
+
| Name | Description |
|
|
17
|
+
| :--- | :--- |
|
|
18
|
+
| `toolbar` | Custom content for the table toolbar. Scope: `{ row }`. |
|
|
19
|
+
| `action` | Custom content for the action column. Scope: `{ row }`. |
|
|
20
|
+
| `...` | - | Passes through all slots supported by `ele-pro-table`. |
|
|
21
|
+
|
|
22
|
+
## Methods
|
|
23
|
+
|
|
24
|
+
| Name | Description |
|
|
25
|
+
| :--- | :--- |
|
|
26
|
+
| `reload(param)` | Reloads the table data. |
|
|
27
|
+
| `getData()` | Returns the current table data. |
|
|
28
|
+
| `getTableRef()` | Returns the underlying table reference. |
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
```vue
|
|
33
|
+
<template>
|
|
34
|
+
<sohelp-table refid="user_grid_config" url="/api/users" />
|
|
35
|
+
</template>
|
|
36
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# SohelpTenantSelect
|
|
2
|
+
|
|
3
|
+
A component for selecting tenants using a grid view (`sohelp-vxe-grid-select`). Fetches tenant data from the server.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Name | Type | Default | Description |
|
|
8
|
+
| :--- | :--- | :--- | :--- |
|
|
9
|
+
| `url` | `String` | `'/engine/web/tenant/page'` | The API URL to fetch tenant data. |
|
|
10
|
+
| `title` | `String` | `'选择租户'` | The title of the selection dialog. |
|
|
11
|
+
| `...` | - | - | Supports all `sohelp-vxe-grid-select` props. |
|
|
12
|
+
|
|
13
|
+
## Events
|
|
14
|
+
|
|
15
|
+
| Name | Parameters | Description |
|
|
16
|
+
| :--- | :--- | :--- |
|
|
17
|
+
| `confirm` | `(rows: Array)` | Triggered when the user confirms the selection. Returns the selected rows. |
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```vue
|
|
22
|
+
<template>
|
|
23
|
+
<sohelp-tenant-select @confirm="handleConfirm" />
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script setup>
|
|
27
|
+
const handleConfirm = (rows) => {
|
|
28
|
+
console.log('Selected tenants:', rows);
|
|
29
|
+
};
|
|
30
|
+
</script>
|
|
31
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# SohelpText
|
|
2
|
+
|
|
3
|
+
A simple text display component that wraps `ele-text` and enables word limit display.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Name | Type | Default | Description |
|
|
8
|
+
| :--- | :--- | :--- | :--- |
|
|
9
|
+
| `...` | - | - | Supports all `ele-text` props. |
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```vue
|
|
14
|
+
<template>
|
|
15
|
+
<sohelp-text>Some text content</sohelp-text>
|
|
16
|
+
</template>
|
|
17
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# SohelpTextareaInput
|
|
2
|
+
|
|
3
|
+
A textarea input component based on `el-input` with auto-focus capability and character limit.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Name | Type | Default | Description |
|
|
8
|
+
| :--- | :--- | :--- | :--- |
|
|
9
|
+
| `autoFocus` | `Boolean` | `false` | Whether to automatically focus the input on mount. |
|
|
10
|
+
| `maxlength` | `Number` | `250` | The maximum number of characters allowed. |
|
|
11
|
+
| `...` | - | - | Supports all `el-input` props (type is fixed to 'textarea'). |
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```vue
|
|
16
|
+
<template>
|
|
17
|
+
<sohelp-textarea-input v-model="text" :autoFocus="true" />
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script setup>
|
|
21
|
+
import { ref } from 'vue';
|
|
22
|
+
const text = ref('');
|
|
23
|
+
</script>
|
|
24
|
+
```
|
|
@@ -1,25 +1,31 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-input
|
|
2
|
+
<el-input
|
|
3
|
+
v-bind="$attrs"
|
|
4
|
+
v-model="modelValue"
|
|
5
|
+
clearable
|
|
6
|
+
ref="inputRef"
|
|
7
|
+
type="textarea"
|
|
8
|
+
show-word-limit
|
|
9
|
+
:disabled="$attrs?.disabled || $attrs?.readonly"
|
|
10
|
+
>
|
|
11
|
+
<template v-for="(_, slot) in $slots" #[slot]="slotProps">
|
|
12
|
+
<slot :name="slot" v-bind="slotProps" />
|
|
13
|
+
</template>
|
|
14
|
+
</el-input>
|
|
3
15
|
</template>
|
|
4
16
|
<script setup>
|
|
5
17
|
import { nextTick, onMounted, ref } from 'vue';
|
|
6
18
|
|
|
19
|
+
const emit = defineEmits(['update:modelValue']);
|
|
20
|
+
const modelValue = defineModel('modelValue');
|
|
7
21
|
const props = defineProps({
|
|
8
22
|
autoFocus: {
|
|
9
23
|
type: Boolean,
|
|
10
24
|
default: false
|
|
11
|
-
}
|
|
12
|
-
maxlength: {
|
|
13
|
-
type: Number,
|
|
14
|
-
default: 250
|
|
15
|
-
},
|
|
25
|
+
}
|
|
16
26
|
});
|
|
17
27
|
|
|
18
|
-
const modelValue = ref('');
|
|
19
|
-
|
|
20
|
-
|
|
21
28
|
const inputRef = ref(null);
|
|
22
|
-
|
|
23
29
|
onMounted(() => {
|
|
24
30
|
nextTick(() => {
|
|
25
31
|
if (props.autoFocus) {
|
|
@@ -33,4 +39,3 @@
|
|
|
33
39
|
name: 'SohelpTextareaInput'
|
|
34
40
|
};
|
|
35
41
|
</script>
|
|
36
|
-
<style></style>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# SohelpTime
|
|
2
|
+
|
|
3
|
+
A time picker component wrapping `el-time-picker` with a default value format of `HH:mm:ss`.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Name | Type | Default | Description |
|
|
8
|
+
| :--- | :--- | :--- | :--- |
|
|
9
|
+
| `...` | - | - | Supports all `el-time-picker` props. |
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```vue
|
|
14
|
+
<template>
|
|
15
|
+
<sohelp-time v-model="time" />
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script setup>
|
|
19
|
+
import { ref } from 'vue';
|
|
20
|
+
const time = ref('');
|
|
21
|
+
</script>
|
|
22
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# SohelpTree
|
|
2
|
+
|
|
3
|
+
A wrapper component for `el-tree` that includes a loading state by default.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Name | Type | Default | Description |
|
|
8
|
+
| :--- | :--- | :--- | :--- |
|
|
9
|
+
| `data` | `Object` | Required | The data source for the tree. |
|
|
10
|
+
| `...` | - | - | Supports all `el-tree` props. |
|
|
11
|
+
|
|
12
|
+
## Events
|
|
13
|
+
|
|
14
|
+
| Name | Parameters | Description |
|
|
15
|
+
| :--- | :--- | :--- |
|
|
16
|
+
| `node-click` | `(data, node, el)` | Triggered when a tree node is clicked. |
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```vue
|
|
21
|
+
<template>
|
|
22
|
+
<sohelp-tree :data="treeData" @node-click="handleNodeClick" />
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script setup>
|
|
26
|
+
import { ref } from 'vue';
|
|
27
|
+
const treeData = ref([{ label: 'Node 1', children: [] }]);
|
|
28
|
+
const handleNodeClick = (data) => {
|
|
29
|
+
console.log(data);
|
|
30
|
+
};
|
|
31
|
+
</script>
|
|
32
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# SohelpTreeSelect
|
|
2
|
+
|
|
3
|
+
A wrapper component for `ele-tree-select` that integrates with global configuration for size.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Name | Type | Default | Description |
|
|
8
|
+
| :--- | :--- | :--- | :--- |
|
|
9
|
+
| `modelValue` | `String`, `Number`, `Array` | `""` | The selected value (v-model). |
|
|
10
|
+
| `...` | - | - | Supports all `ele-tree-select` props. |
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```vue
|
|
15
|
+
<template>
|
|
16
|
+
<sohelp-tree-select v-model="value" :data="treeData" />
|
|
17
|
+
</template>
|
|
18
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# SohelpUserSelect
|
|
2
|
+
|
|
3
|
+
A specialized selection component for selecting users, built on top of `sohelp-dyn-select`.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Name | Type | Default | Description |
|
|
8
|
+
| :--- | :--- | :--- | :--- |
|
|
9
|
+
| `datasource` | `Array`, `Function`, `Promise` | Required | The data source for user options. |
|
|
10
|
+
| `url` | `String` | `'/engine/web/user/list'` | The default URL for fetching user data. |
|
|
11
|
+
| `labelField` | `String` | `'user_name'` | The field name for the user label. |
|
|
12
|
+
| `valueField` | `String` | `'id'` | The field name for the user value. |
|
|
13
|
+
| `modelValue` | `String`, `Number`, `Array` | `""` | The selected value (v-model). |
|
|
14
|
+
| `...` | - | - | Supports all `sohelp-dyn-select` props. |
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```vue
|
|
19
|
+
<template>
|
|
20
|
+
<sohelp-user-select v-model="userId" :datasource="users" />
|
|
21
|
+
</template>
|
|
22
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# SohelpUserTag
|
|
2
|
+
|
|
3
|
+
A component to display user information (Avatar + Nickname). Falls back to default company LOGO if no info is provided.
|
|
4
|
+
|
|
5
|
+
## Description
|
|
6
|
+
|
|
7
|
+
Displays user avatar and nickname. Currently a placeholder/simple implementation.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```vue
|
|
12
|
+
<template>
|
|
13
|
+
<sohelp-user-tag />
|
|
14
|
+
</template>
|
|
15
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# SohelpUserTree
|
|
2
|
+
|
|
3
|
+
A specialized tree component for displaying users, inheriting from `SohelpTree`.
|
|
4
|
+
|
|
5
|
+
## Description
|
|
6
|
+
|
|
7
|
+
Intended for user selection in a tree structure. Currently a wrapper/placeholder inheriting from `SohelpTree`.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```vue
|
|
12
|
+
<template>
|
|
13
|
+
<sohelp-user-tree :data="userData" />
|
|
14
|
+
</template>
|
|
15
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# SohelpVformDrawer
|
|
2
|
+
|
|
3
|
+
A drawer component that renders a VForm based on configuration, wrapping `sohelp-vform-eleplus`.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Name | Type | Default | Description |
|
|
8
|
+
| :--- | :--- | :--- | :--- |
|
|
9
|
+
| `refid` | `String` | Required | The configuration ID for the form. |
|
|
10
|
+
| `...` | - | - | Supports all `sohelp-drawer` props. |
|
|
11
|
+
|
|
12
|
+
## Methods
|
|
13
|
+
|
|
14
|
+
| Name | Description |
|
|
15
|
+
| :--- | :--- |
|
|
16
|
+
| `getFormJson()` | Returns the form JSON configuration. |
|
|
17
|
+
| `getFormData()` | Returns the current form data. |
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```vue
|
|
22
|
+
<template>
|
|
23
|
+
<sohelp-vform-drawer refid="form_config_id" v-model="visible" />
|
|
24
|
+
</template>
|
|
25
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# SohelpVformEleplus
|
|
2
|
+
|
|
3
|
+
A core component for rendering dynamic forms using VForm and `moduleCache`. Supports toolbars, dynamic loading, and integration with the global configuration.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Name | Type | Default | Description |
|
|
8
|
+
| :--- | :--- | :--- | :--- |
|
|
9
|
+
| `refid` | `String` | `''` | The configuration ID for the form layout. |
|
|
10
|
+
| `moduleType` | `String` | `'tab'` | The display mode/style (e.g., 'tab'). |
|
|
11
|
+
| `title` | `String` | `''` | The title of the form/page. |
|
|
12
|
+
| `modelValue` | `Object` | `{}` | The form data object (v-model). |
|
|
13
|
+
| `data` | `Object` | `{}` | Additional data context. |
|
|
14
|
+
|
|
15
|
+
## Methods
|
|
16
|
+
|
|
17
|
+
| Name | Description |
|
|
18
|
+
| :--- | :--- |
|
|
19
|
+
| `loadConfig(refid)` | Loads the form configuration by ID. |
|
|
20
|
+
| `setFormJson(json)` | Sets the form JSON configuration manually. |
|
|
21
|
+
| `setFormData(data)` | Sets the form data. |
|
|
22
|
+
| `setModelValue(value)` | Sets the model value. |
|
|
23
|
+
| `getFormData(validate)` | Retrieves the form data, optionally validating it. |
|
|
24
|
+
| `toolbarButtonClick(config)` | Handles toolbar button clicks and executes configured handlers. |
|
|
25
|
+
|
|
26
|
+
## Features
|
|
27
|
+
|
|
28
|
+
- **Dynamic Configuration**: Loads form layout and toolbar from `moduleCache`.
|
|
29
|
+
- **Toolbar Support**: Renders a toolbar with customizable buttons and handlers.
|
|
30
|
+
- **VForm Integration**: Wraps `VFormRender` for powerful form capabilities.
|
|
31
|
+
- **Global Config**: Respects global size settings.
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
```vue
|
|
36
|
+
<template>
|
|
37
|
+
<sohelp-vform-eleplus refid="my_form_config" v-model="formData" />
|
|
38
|
+
</template>
|
|
39
|
+
```
|