@epic-designer/antd 1.0.5
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/LICENSE +21 -0
- package/dist/chunks/button.cjs +44 -0
- package/dist/chunks/button.mjs +42 -0
- package/dist/chunks/card.cjs +39 -0
- package/dist/chunks/card.mjs +37 -0
- package/dist/chunks/col.cjs +39 -0
- package/dist/chunks/col.mjs +37 -0
- package/dist/chunks/datePicker.cjs +47 -0
- package/dist/chunks/datePicker.mjs +45 -0
- package/dist/chunks/form.cjs +116 -0
- package/dist/chunks/form.mjs +114 -0
- package/dist/chunks/formItem.cjs +24 -0
- package/dist/chunks/formItem.mjs +22 -0
- package/dist/chunks/modal.cjs +136 -0
- package/dist/chunks/modal.mjs +134 -0
- package/dist/chunks/row.cjs +39 -0
- package/dist/chunks/row.mjs +37 -0
- package/dist/chunks/uploadFile.cjs +138 -0
- package/dist/chunks/uploadFile.mjs +136 -0
- package/dist/chunks/uploadImage.cjs +152 -0
- package/dist/chunks/uploadImage.mjs +150 -0
- package/dist/index.cjs +3047 -0
- package/dist/index.d.cts +5 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.mjs +3045 -0
- package/package.json +38 -0
- package/src/button/button.vue +19 -0
- package/src/button/index.ts +204 -0
- package/src/card/card.ts +38 -0
- package/src/card/index.ts +65 -0
- package/src/cascader/cascader.vue +24 -0
- package/src/cascader/index.ts +201 -0
- package/src/checkbox/index.ts +101 -0
- package/src/col/col.ts +38 -0
- package/src/col/index.ts +22 -0
- package/src/color-picker/index.ts +109 -0
- package/src/date-picker/datePicker.ts +48 -0
- package/src/date-picker/index.ts +301 -0
- package/src/form/form.vue +153 -0
- package/src/form/index.ts +196 -0
- package/src/form-item/formItem.vue +12 -0
- package/src/form-item/index.ts +10 -0
- package/src/index.less +33 -0
- package/src/index.ts +131 -0
- package/src/input/index.ts +171 -0
- package/src/input-number/index.ts +182 -0
- package/src/input-password/index.ts +154 -0
- package/src/modal/index.ts +20 -0
- package/src/modal/modal.vue +98 -0
- package/src/radio/index.ts +107 -0
- package/src/row/index.ts +116 -0
- package/src/row/row.ts +38 -0
- package/src/select/index.ts +231 -0
- package/src/slider/index.ts +145 -0
- package/src/switch/index.ts +143 -0
- package/src/textarea/index.ts +164 -0
- package/src/time-picker/index.ts +192 -0
- package/src/upload-file/index.ts +90 -0
- package/src/upload-file/uploadFile.vue +145 -0
- package/src/upload-image/index.ts +71 -0
- package/src/upload-image/uploadImage.vue +167 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import type { ComponentConfigModel } from '@epic-designer/types';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
bindModel: 'value',
|
|
5
|
+
component: async () => (await import('ant-design-vue')).Select,
|
|
6
|
+
config: {
|
|
7
|
+
action: [
|
|
8
|
+
{
|
|
9
|
+
description: '使 input 获取焦点',
|
|
10
|
+
type: 'focus',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
description: '使 input 失去焦点',
|
|
14
|
+
type: 'blur',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
description: '选中 input 中的文字',
|
|
18
|
+
type: 'select',
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
attribute: [
|
|
22
|
+
{
|
|
23
|
+
field: 'field',
|
|
24
|
+
label: '字段名',
|
|
25
|
+
type: 'input',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
field: 'label',
|
|
29
|
+
label: '标题',
|
|
30
|
+
type: 'input',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
componentProps: {
|
|
34
|
+
placeholder: '请输入',
|
|
35
|
+
},
|
|
36
|
+
field: 'componentProps.placeholder',
|
|
37
|
+
label: '占位内容',
|
|
38
|
+
type: 'input',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
field: 'componentProps.defaultValue',
|
|
42
|
+
label: '默认值',
|
|
43
|
+
type: 'select',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
componentProps: {
|
|
47
|
+
allowClear: true,
|
|
48
|
+
options: [
|
|
49
|
+
{
|
|
50
|
+
label: '大号',
|
|
51
|
+
value: 'large',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
label: '中等',
|
|
55
|
+
value: 'middle',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: '小型',
|
|
59
|
+
value: 'small',
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
placeholder: '请选择',
|
|
63
|
+
},
|
|
64
|
+
field: 'componentProps.size',
|
|
65
|
+
label: '尺寸',
|
|
66
|
+
type: 'select',
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
{
|
|
70
|
+
componentProps: {
|
|
71
|
+
placeholder: '请输入',
|
|
72
|
+
},
|
|
73
|
+
field: 'componentProps.listHeight',
|
|
74
|
+
label: '弹窗高度',
|
|
75
|
+
type: 'number',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
componentProps: {
|
|
79
|
+
allowClear: true,
|
|
80
|
+
options: [
|
|
81
|
+
{
|
|
82
|
+
label: 'multiple',
|
|
83
|
+
value: 'multiple',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
label: 'tags',
|
|
87
|
+
value: 'tags',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
label: 'combobox',
|
|
91
|
+
value: 'combobox',
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
placeholder: '请选择',
|
|
95
|
+
},
|
|
96
|
+
field: 'componentProps.mode',
|
|
97
|
+
label: '模式',
|
|
98
|
+
type: 'select',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
field: 'componentProps.showSearch',
|
|
102
|
+
label: '可搜索',
|
|
103
|
+
type: 'switch',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
field: 'componentProps.autoClearSearchValue',
|
|
107
|
+
label: '选中选项后清空搜索框',
|
|
108
|
+
show: ({ values }) =>
|
|
109
|
+
values.componentProps.mode && values.componentProps.showSearch,
|
|
110
|
+
type: 'switch',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
field: 'componentProps.maxTagTextLength',
|
|
114
|
+
label: '最大tag文本长度',
|
|
115
|
+
show: ({ values }) => values.componentProps.mode,
|
|
116
|
+
type: 'number',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
field: 'componentProps.maxTagCount',
|
|
120
|
+
label: '最大tag显示数',
|
|
121
|
+
show: ({ values }) => values.componentProps.mode,
|
|
122
|
+
type: 'number',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
componentProps: {
|
|
126
|
+
allowClear: true,
|
|
127
|
+
options: [
|
|
128
|
+
{
|
|
129
|
+
label: 'bottomLeft',
|
|
130
|
+
value: 'bottomLeft',
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
label: 'bottomRight',
|
|
134
|
+
value: 'bottomRight',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
label: 'topLeft',
|
|
138
|
+
value: 'topLeft',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
label: 'topRight',
|
|
142
|
+
value: 'topRight',
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
placeholder: '请选择',
|
|
146
|
+
},
|
|
147
|
+
field: 'componentProps.placement',
|
|
148
|
+
label: '弹出框位置',
|
|
149
|
+
type: 'select',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
componentProps: {
|
|
153
|
+
checkedValue: false,
|
|
154
|
+
unCheckedValue: true,
|
|
155
|
+
},
|
|
156
|
+
field: 'componentProps.bordered',
|
|
157
|
+
label: '无边框',
|
|
158
|
+
type: 'switch',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
field: 'componentProps.allowClear',
|
|
162
|
+
label: '可清空',
|
|
163
|
+
type: 'switch',
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
field: 'componentProps.labelInValue',
|
|
167
|
+
label: 'labelInValue',
|
|
168
|
+
type: 'switch',
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
field: 'componentProps.disabled',
|
|
172
|
+
label: '禁用',
|
|
173
|
+
type: 'switch',
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
field: 'componentProps.hidden',
|
|
177
|
+
label: '隐藏',
|
|
178
|
+
type: 'switch',
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
field: 'componentProps.options',
|
|
182
|
+
label: '选项管理',
|
|
183
|
+
layout: 'vertical',
|
|
184
|
+
type: 'EOptionsEditor',
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
description: '校验规则需要配合表单使用',
|
|
188
|
+
field: 'rules',
|
|
189
|
+
label: '表单校验',
|
|
190
|
+
layout: 'vertical',
|
|
191
|
+
type: 'ERuleEditor',
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
event: [
|
|
195
|
+
{
|
|
196
|
+
description: '值修改',
|
|
197
|
+
type: 'change',
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
description: '获取焦点',
|
|
201
|
+
type: 'focus',
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
description: '失去焦点',
|
|
205
|
+
type: 'blur',
|
|
206
|
+
},
|
|
207
|
+
],
|
|
208
|
+
},
|
|
209
|
+
defaultSchema: {
|
|
210
|
+
componentProps: {
|
|
211
|
+
options: [
|
|
212
|
+
{
|
|
213
|
+
label: '选项1',
|
|
214
|
+
value: '选项1',
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
label: '选项2',
|
|
218
|
+
value: '选项2',
|
|
219
|
+
},
|
|
220
|
+
],
|
|
221
|
+
placeholder: '请选择',
|
|
222
|
+
},
|
|
223
|
+
field: 'select',
|
|
224
|
+
input: true,
|
|
225
|
+
label: '选择框',
|
|
226
|
+
type: 'select',
|
|
227
|
+
},
|
|
228
|
+
groupName: '表单',
|
|
229
|
+
icon: 'icon--epic--select',
|
|
230
|
+
sort: 900,
|
|
231
|
+
} as ComponentConfigModel;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import type { ComponentConfigModel } from '@epic-designer/types';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
bindModel: 'value',
|
|
5
|
+
component: async () => (await import('ant-design-vue')).Slider,
|
|
6
|
+
config: {
|
|
7
|
+
attribute: [
|
|
8
|
+
{
|
|
9
|
+
field: 'field',
|
|
10
|
+
label: '字段名',
|
|
11
|
+
type: 'input',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
field: 'label',
|
|
15
|
+
label: '标题',
|
|
16
|
+
type: 'input',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
componentProps: {
|
|
20
|
+
style: {
|
|
21
|
+
width: '100%',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
field: 'componentProps.defaultValue',
|
|
25
|
+
label: '默认值',
|
|
26
|
+
type: 'slider',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
componentProps: {
|
|
30
|
+
allowClear: true,
|
|
31
|
+
options: [
|
|
32
|
+
{
|
|
33
|
+
label: '大号',
|
|
34
|
+
value: 'large',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
label: '中等',
|
|
38
|
+
value: 'middle',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
label: '小型',
|
|
42
|
+
value: 'small',
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
placeholder: '请选择',
|
|
46
|
+
},
|
|
47
|
+
field: 'componentProps.size',
|
|
48
|
+
label: '尺寸',
|
|
49
|
+
type: 'select',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
changeSync: true,
|
|
53
|
+
field: 'componentProps.range',
|
|
54
|
+
label: '范围选择',
|
|
55
|
+
onChange: ({ value, values }) => {
|
|
56
|
+
values.componentProps.defaultValue = value ? [0, 100] : 0;
|
|
57
|
+
},
|
|
58
|
+
type: 'switch',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
field: 'componentProps.reverse',
|
|
62
|
+
label: '倒转轨道',
|
|
63
|
+
type: 'switch',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
componentProps: {
|
|
67
|
+
placeholder: '请输入',
|
|
68
|
+
},
|
|
69
|
+
field: 'componentProps.step',
|
|
70
|
+
label: '步长',
|
|
71
|
+
type: 'number',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
componentProps: {
|
|
75
|
+
placeholder: '请输入',
|
|
76
|
+
},
|
|
77
|
+
field: 'componentProps.min',
|
|
78
|
+
label: '最小值',
|
|
79
|
+
type: 'number',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
componentProps: {
|
|
83
|
+
placeholder: '请输入',
|
|
84
|
+
},
|
|
85
|
+
field: 'componentProps.max',
|
|
86
|
+
label: '最大值',
|
|
87
|
+
type: 'number',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
field: 'componentProps.vertical',
|
|
91
|
+
label: '垂直模式',
|
|
92
|
+
type: 'switch',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
field: 'componentProps.dots',
|
|
96
|
+
label: '显示刻度',
|
|
97
|
+
type: 'switch',
|
|
98
|
+
},
|
|
99
|
+
// {
|
|
100
|
+
// label: "持续显示提示",
|
|
101
|
+
// type: "switch",
|
|
102
|
+
// field: "componentProps.tooltipOpen",
|
|
103
|
+
// },
|
|
104
|
+
{
|
|
105
|
+
field: 'componentProps.disabled',
|
|
106
|
+
label: '禁用',
|
|
107
|
+
type: 'switch',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
field: 'componentProps.hidden',
|
|
111
|
+
label: '隐藏',
|
|
112
|
+
type: 'switch',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
componentProps: {
|
|
116
|
+
ruleType: 'number',
|
|
117
|
+
},
|
|
118
|
+
description: '校验规则需要配合表单使用',
|
|
119
|
+
field: 'rules',
|
|
120
|
+
label: '表单校验',
|
|
121
|
+
layout: 'vertical',
|
|
122
|
+
type: 'ERuleEditor',
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
event: [
|
|
126
|
+
{
|
|
127
|
+
description: '与mouseup触发时机一致',
|
|
128
|
+
type: 'afterChange',
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
description: '拖拽结束改变值时',
|
|
132
|
+
type: 'change',
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
},
|
|
136
|
+
defaultSchema: {
|
|
137
|
+
field: 'slider',
|
|
138
|
+
input: true,
|
|
139
|
+
label: '滑块',
|
|
140
|
+
type: 'slider',
|
|
141
|
+
},
|
|
142
|
+
groupName: '表单',
|
|
143
|
+
icon: 'icon--epic--switches',
|
|
144
|
+
sort: 930,
|
|
145
|
+
} as ComponentConfigModel;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import type { ComponentConfigModel } from '@epic-designer/types';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
bindModel: 'checked',
|
|
5
|
+
component: async () => (await import('ant-design-vue')).Switch,
|
|
6
|
+
config: {
|
|
7
|
+
attribute: [
|
|
8
|
+
{
|
|
9
|
+
field: 'field',
|
|
10
|
+
label: '字段名',
|
|
11
|
+
type: 'input',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
field: 'label',
|
|
15
|
+
label: '标题',
|
|
16
|
+
type: 'input',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
field: 'componentProps.defaultValue',
|
|
20
|
+
label: '默认值',
|
|
21
|
+
type: 'switch',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
componentProps: {
|
|
25
|
+
placeholder: '请输入',
|
|
26
|
+
},
|
|
27
|
+
field: 'componentProps.checkedValue',
|
|
28
|
+
label: 'ON状态值',
|
|
29
|
+
onChange(e) {
|
|
30
|
+
setTimeout(() => setDefaultValue(e));
|
|
31
|
+
},
|
|
32
|
+
type: 'input',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
componentProps: {
|
|
36
|
+
placeholder: '请输入',
|
|
37
|
+
},
|
|
38
|
+
field: 'componentProps.unCheckedValue',
|
|
39
|
+
label: 'OFF状态值',
|
|
40
|
+
onChange(e) {
|
|
41
|
+
setTimeout(() => setDefaultValue(e));
|
|
42
|
+
},
|
|
43
|
+
type: 'input',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
componentProps: {
|
|
47
|
+
placeholder: '请输入',
|
|
48
|
+
},
|
|
49
|
+
field: 'componentProps.checkedChildren',
|
|
50
|
+
label: 'ON状态描述',
|
|
51
|
+
type: 'input',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
componentProps: {
|
|
55
|
+
placeholder: '请输入',
|
|
56
|
+
},
|
|
57
|
+
field: 'componentProps.unCheckedChildren',
|
|
58
|
+
label: 'OFF状态描述',
|
|
59
|
+
type: 'input',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
componentProps: {
|
|
63
|
+
allowClear: true,
|
|
64
|
+
options: [
|
|
65
|
+
{
|
|
66
|
+
label: 'default',
|
|
67
|
+
value: 'default',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
label: 'small',
|
|
71
|
+
value: 'small',
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
placeholder: '请选择',
|
|
75
|
+
},
|
|
76
|
+
field: 'componentProps.size',
|
|
77
|
+
label: '尺寸',
|
|
78
|
+
type: 'select',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
field: 'componentProps.disabled',
|
|
82
|
+
label: '禁用',
|
|
83
|
+
type: 'switch',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
field: 'componentProps.hidden',
|
|
87
|
+
label: '隐藏',
|
|
88
|
+
type: 'switch',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
componentProps: {
|
|
92
|
+
ruleType: 'boolean',
|
|
93
|
+
},
|
|
94
|
+
description: '校验规则需要配合表单使用',
|
|
95
|
+
field: 'rules',
|
|
96
|
+
label: '表单校验',
|
|
97
|
+
layout: 'vertical',
|
|
98
|
+
type: 'ERuleEditor',
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
event: [
|
|
102
|
+
{
|
|
103
|
+
description: '值变化时',
|
|
104
|
+
type: 'change',
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
},
|
|
108
|
+
defaultSchema: {
|
|
109
|
+
componentProps: {
|
|
110
|
+
defaultValue: false,
|
|
111
|
+
},
|
|
112
|
+
field: 'switch',
|
|
113
|
+
input: true,
|
|
114
|
+
label: '开关',
|
|
115
|
+
type: 'switch',
|
|
116
|
+
},
|
|
117
|
+
groupName: '表单',
|
|
118
|
+
icon: 'icon--epic--toggle-off-outline',
|
|
119
|
+
sort: 930,
|
|
120
|
+
} as ComponentConfigModel;
|
|
121
|
+
|
|
122
|
+
function setDefaultValue(e) {
|
|
123
|
+
const defaultValue = e.values.componentProps?.unCheckedValue || false;
|
|
124
|
+
// 如果unCheckedValue === '',则在下一个事件循环中删除 unCheckedValue 属性
|
|
125
|
+
if (e.values.componentProps.unCheckedValue === '') {
|
|
126
|
+
delete e.values.componentProps.unCheckedValue;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// 如果checkedValue === '',则在下一个事件循环中删除 checkedValue 属性
|
|
130
|
+
if (e.values.componentProps.checkedValue === '') {
|
|
131
|
+
delete e.values.componentProps.checkedValue;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// 检查是否已经有了 componentProps 对象,如果有,将默认值赋给 defaultValue 属性
|
|
135
|
+
if (e.values.componentProps) {
|
|
136
|
+
e.values.componentProps.defaultValue = defaultValue;
|
|
137
|
+
} else {
|
|
138
|
+
// 如果没有 componentProps 对象,则创建一个新对象并添加 defaultValue 属性
|
|
139
|
+
e.values.componentProps = {
|
|
140
|
+
defaultValue,
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import type { ComponentConfigModel } from '@epic-designer/types';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
bindModel: 'value',
|
|
5
|
+
component: async () => (await import('ant-design-vue')).Textarea,
|
|
6
|
+
config: {
|
|
7
|
+
action: [
|
|
8
|
+
{
|
|
9
|
+
description: '使 input 获取焦点',
|
|
10
|
+
type: 'focus',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
description: '使 input 失去焦点',
|
|
14
|
+
type: 'blur',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
description: '选中 input 中的文字',
|
|
18
|
+
type: 'select',
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
attribute: [
|
|
22
|
+
{
|
|
23
|
+
field: 'field',
|
|
24
|
+
label: '字段名',
|
|
25
|
+
type: 'input',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
field: 'label',
|
|
29
|
+
label: '标题',
|
|
30
|
+
type: 'input',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
componentProps: {
|
|
34
|
+
placeholder: '请输入',
|
|
35
|
+
},
|
|
36
|
+
field: 'componentProps.defaultValue',
|
|
37
|
+
label: '默认值',
|
|
38
|
+
type: 'textarea',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
field: 'componentProps.placeholder',
|
|
42
|
+
label: '占位内容',
|
|
43
|
+
type: 'input',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
componentProps: {
|
|
47
|
+
placeholder: '请输入',
|
|
48
|
+
},
|
|
49
|
+
field: 'componentProps.autoSize.minRows',
|
|
50
|
+
label: '最小行数',
|
|
51
|
+
type: 'number',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
componentProps: {
|
|
55
|
+
placeholder: '请输入',
|
|
56
|
+
},
|
|
57
|
+
field: 'componentProps.autoSize.maxRows',
|
|
58
|
+
label: '最大行数',
|
|
59
|
+
type: 'number',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
componentProps: {
|
|
63
|
+
allowClear: true,
|
|
64
|
+
options: [
|
|
65
|
+
{
|
|
66
|
+
label: '大号',
|
|
67
|
+
value: 'large',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
label: '中等',
|
|
71
|
+
value: 'middle',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
label: '小型',
|
|
75
|
+
value: 'small',
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
placeholder: '请选择',
|
|
79
|
+
},
|
|
80
|
+
field: 'componentProps.size',
|
|
81
|
+
label: '尺寸',
|
|
82
|
+
type: 'select',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
componentProps: {
|
|
86
|
+
placeholder: '请输入',
|
|
87
|
+
},
|
|
88
|
+
field: 'componentProps.maxLength',
|
|
89
|
+
label: '最大输入长度',
|
|
90
|
+
type: 'number',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
componentProps: {
|
|
94
|
+
checkedValue: false,
|
|
95
|
+
unCheckedValue: true,
|
|
96
|
+
},
|
|
97
|
+
field: 'componentProps.bordered',
|
|
98
|
+
label: '无边框',
|
|
99
|
+
type: 'switch',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
field: 'componentProps.showCount',
|
|
103
|
+
label: '统计字数',
|
|
104
|
+
type: 'switch',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
field: 'componentProps.allowClear',
|
|
108
|
+
label: '可清除',
|
|
109
|
+
type: 'switch',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
field: 'componentProps.disabled',
|
|
113
|
+
label: '禁用',
|
|
114
|
+
type: 'switch',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
field: 'componentProps.hidden',
|
|
118
|
+
label: '隐藏',
|
|
119
|
+
type: 'switch',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
description: '校验规则需要配合表单使用',
|
|
123
|
+
field: 'rules',
|
|
124
|
+
label: '表单校验',
|
|
125
|
+
layout: 'vertical',
|
|
126
|
+
type: 'ERuleEditor',
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
event: [
|
|
130
|
+
{
|
|
131
|
+
description: '输入值',
|
|
132
|
+
type: 'input',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
description: '值修改',
|
|
136
|
+
type: 'change',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
description: '按下回车的回调',
|
|
140
|
+
type: 'pressEnter',
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
description: '获取焦点',
|
|
144
|
+
type: 'focus',
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
description: '失去焦点',
|
|
148
|
+
type: 'blur',
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
},
|
|
152
|
+
defaultSchema: {
|
|
153
|
+
componentProps: {
|
|
154
|
+
placeholder: '请输入',
|
|
155
|
+
},
|
|
156
|
+
field: 'textarea',
|
|
157
|
+
input: true,
|
|
158
|
+
label: '文本域',
|
|
159
|
+
type: 'textarea',
|
|
160
|
+
},
|
|
161
|
+
groupName: '表单',
|
|
162
|
+
icon: 'icon--epic--edit-square-outline-rounded',
|
|
163
|
+
sort: 705,
|
|
164
|
+
} as ComponentConfigModel;
|