@epic-designer/antd 1.1.0 → 1.1.2-beta.0
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/dist/chunks/button.cjs +1 -1
- package/dist/chunks/button.mjs +1 -1
- package/dist/chunks/form.cjs +5 -5
- package/dist/chunks/form.mjs +5 -5
- package/dist/chunks/modal.cjs +2 -2
- package/dist/chunks/modal.mjs +2 -2
- package/dist/chunks/tabPane.cjs +42 -0
- package/dist/chunks/tabPane.mjs +40 -0
- package/dist/chunks/tabs.cjs +65 -0
- package/dist/chunks/tabs.mjs +63 -0
- package/dist/chunks/uploadImage.cjs +1 -1
- package/dist/chunks/uploadImage.mjs +1 -1
- package/dist/index.cjs +679 -706
- package/dist/index.mjs +679 -706
- package/package.json +1 -2
- package/src/button/button.vue +1 -1
- package/src/button/index.ts +25 -25
- package/src/card/index.ts +9 -9
- package/src/cascader/cascader.vue +2 -2
- package/src/cascader/index.ts +41 -41
- package/src/checkbox/index.ts +16 -16
- package/src/col/index.ts +6 -3
- package/src/color-picker/index.ts +16 -16
- package/src/date-picker/index.ts +79 -79
- package/src/form/form.vue +5 -5
- package/src/form/index.ts +34 -34
- package/src/index.ts +7 -15
- package/src/input/index.ts +25 -25
- package/src/input-number/index.ts +36 -36
- package/src/modal/modal.vue +2 -2
- package/src/radio/index.ts +16 -16
- package/src/row/index.ts +18 -15
- package/src/select/index.ts +37 -38
- package/src/slider/index.ts +28 -28
- package/src/switch/index.ts +38 -38
- package/src/tab-pane/index.ts +22 -0
- package/src/tab-pane/tabPane.ts +43 -0
- package/src/tabs/index.ts +107 -0
- package/src/tabs/tabs.ts +69 -0
- package/src/textarea/index.ts +28 -28
- package/src/time-picker/index.ts +42 -42
- package/src/upload-file/index.ts +18 -18
- package/src/upload-image/index.ts +15 -15
- package/src/upload-image/uploadImage.vue +1 -1
- package/src/input-password/index.ts +0 -154
package/src/date-picker/index.ts
CHANGED
|
@@ -7,25 +7,56 @@ export default {
|
|
|
7
7
|
attribute: [
|
|
8
8
|
{
|
|
9
9
|
field: 'field',
|
|
10
|
-
label: '
|
|
11
|
-
type: '
|
|
10
|
+
label: '数据字段',
|
|
11
|
+
type: 'EpField',
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
|
-
componentProps: {
|
|
15
|
-
placeholder: '请输入',
|
|
16
|
-
},
|
|
17
14
|
field: 'label',
|
|
18
15
|
label: '标题',
|
|
16
|
+
props: {
|
|
17
|
+
placeholder: '请输入',
|
|
18
|
+
},
|
|
19
19
|
type: 'input',
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
field: '
|
|
22
|
+
field: 'props.defaultValue',
|
|
23
23
|
label: '默认值',
|
|
24
24
|
type: 'date',
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
changeSync: true,
|
|
28
|
-
|
|
28
|
+
field: 'props.type',
|
|
29
|
+
label: '日期类型',
|
|
30
|
+
onChange({ value, values }) {
|
|
31
|
+
values.props.defaultValue = null;
|
|
32
|
+
values.props.placeholder = [
|
|
33
|
+
'daterange',
|
|
34
|
+
'monthrange',
|
|
35
|
+
'quarterrange',
|
|
36
|
+
'weekrange',
|
|
37
|
+
'yearrange',
|
|
38
|
+
].includes(value)
|
|
39
|
+
? ['请输入', '请输入']
|
|
40
|
+
: '请输入';
|
|
41
|
+
|
|
42
|
+
if (['date', 'daterange'].includes(value)) {
|
|
43
|
+
values.props.format = 'YYYY-MM-DD';
|
|
44
|
+
values.props.valueFormat = 'YYYY-MM-DD';
|
|
45
|
+
} else if (['week', 'weekrange'].includes(value)) {
|
|
46
|
+
values.props.format = 'ww [周]';
|
|
47
|
+
values.props.valueFormat = 'YYYY-MM-DD';
|
|
48
|
+
} else if (['month', 'monthrange'].includes(value)) {
|
|
49
|
+
values.props.format = 'YYYY-MM';
|
|
50
|
+
values.props.valueFormat = 'YYYY-MM';
|
|
51
|
+
} else if (['quarter', 'quarterrange'].includes(value)) {
|
|
52
|
+
values.props.format = 'YYYY-Q季度';
|
|
53
|
+
values.props.valueFormat = 'YYYY-Q季度';
|
|
54
|
+
} else if (['"yearrange"', 'year'].includes(value)) {
|
|
55
|
+
values.props.format = 'YYYY';
|
|
56
|
+
values.props.valueFormat = 'YYYY';
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
props: {
|
|
29
60
|
options: [
|
|
30
61
|
{
|
|
31
62
|
label: '日期',
|
|
@@ -69,62 +100,31 @@ export default {
|
|
|
69
100
|
},
|
|
70
101
|
],
|
|
71
102
|
},
|
|
72
|
-
field: 'componentProps.type',
|
|
73
|
-
label: '日期类型',
|
|
74
|
-
onChange({ value, values }) {
|
|
75
|
-
values.componentProps.defaultValue = null;
|
|
76
|
-
values.componentProps.placeholder = [
|
|
77
|
-
'daterange',
|
|
78
|
-
'monthrange',
|
|
79
|
-
'quarterrange',
|
|
80
|
-
'weekrange',
|
|
81
|
-
'yearrange',
|
|
82
|
-
].includes(value)
|
|
83
|
-
? ['请输入', '请输入']
|
|
84
|
-
: '请输入';
|
|
85
|
-
|
|
86
|
-
if (['date', 'daterange'].includes(value)) {
|
|
87
|
-
values.componentProps.format = 'YYYY-MM-DD';
|
|
88
|
-
values.componentProps.valueFormat = 'YYYY-MM-DD';
|
|
89
|
-
} else if (['week', 'weekrange'].includes(value)) {
|
|
90
|
-
values.componentProps.format = 'ww [周]';
|
|
91
|
-
values.componentProps.valueFormat = 'YYYY-MM-DD';
|
|
92
|
-
} else if (['month', 'monthrange'].includes(value)) {
|
|
93
|
-
values.componentProps.format = 'YYYY-MM';
|
|
94
|
-
values.componentProps.valueFormat = 'YYYY-MM';
|
|
95
|
-
} else if (['quarter', 'quarterrange'].includes(value)) {
|
|
96
|
-
values.componentProps.format = 'YYYY-Q季度';
|
|
97
|
-
values.componentProps.valueFormat = 'YYYY-Q季度';
|
|
98
|
-
} else if (['"yearrange"', 'year'].includes(value)) {
|
|
99
|
-
values.componentProps.format = 'YYYY';
|
|
100
|
-
values.componentProps.valueFormat = 'YYYY';
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
103
|
type: 'select',
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
|
-
field: '
|
|
106
|
+
field: 'props.showTime',
|
|
107
107
|
label: '增加时间选择',
|
|
108
108
|
onChange: ({ value, values }) => {
|
|
109
109
|
if (value) {
|
|
110
|
-
values.
|
|
111
|
-
values.
|
|
110
|
+
values.props.valueFormat = 'YYYY-MM-DD HH:mm:ss';
|
|
111
|
+
values.props.format = 'YYYY-MM-DD HH:mm:ss';
|
|
112
112
|
} else {
|
|
113
|
-
values.
|
|
114
|
-
values.
|
|
113
|
+
values.props.valueFormat = 'YYYY-MM-DD';
|
|
114
|
+
values.props.format = 'YYYY-MM-DD';
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
117
|
show({ values }) {
|
|
118
|
-
return ['date', 'daterange'].includes(values.
|
|
118
|
+
return ['date', 'daterange'].includes(values.props.type);
|
|
119
119
|
},
|
|
120
120
|
type: 'switch',
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
|
-
|
|
123
|
+
field: 'props.placeholder',
|
|
124
|
+
label: '占位内容',
|
|
125
|
+
props: {
|
|
124
126
|
placeholder: '请输入',
|
|
125
127
|
},
|
|
126
|
-
field: 'componentProps.placeholder',
|
|
127
|
-
label: '占位内容',
|
|
128
128
|
show: ({ values }) =>
|
|
129
129
|
![
|
|
130
130
|
'daterange',
|
|
@@ -132,15 +132,15 @@ export default {
|
|
|
132
132
|
'quarterrange',
|
|
133
133
|
'weekrange',
|
|
134
134
|
'yearrange',
|
|
135
|
-
].includes(values.
|
|
135
|
+
].includes(values.props.type),
|
|
136
136
|
type: 'input',
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
|
-
|
|
139
|
+
field: 'props.placeholder.0',
|
|
140
|
+
label: '开始占位符',
|
|
141
|
+
props: {
|
|
140
142
|
placeholder: '请输入',
|
|
141
143
|
},
|
|
142
|
-
field: 'componentProps.placeholder.0',
|
|
143
|
-
label: '开始占位符',
|
|
144
144
|
show: ({ values }) =>
|
|
145
145
|
[
|
|
146
146
|
'daterange',
|
|
@@ -148,16 +148,16 @@ export default {
|
|
|
148
148
|
'quarterrange',
|
|
149
149
|
'weekrange',
|
|
150
150
|
'yearrange',
|
|
151
|
-
].includes(values.
|
|
151
|
+
].includes(values.props.type),
|
|
152
152
|
type: 'input',
|
|
153
153
|
},
|
|
154
154
|
|
|
155
155
|
{
|
|
156
|
-
|
|
156
|
+
field: 'props.placeholder.1',
|
|
157
|
+
label: '结束占位符',
|
|
158
|
+
props: {
|
|
157
159
|
placeholder: '请输入',
|
|
158
160
|
},
|
|
159
|
-
field: 'componentProps.placeholder.1',
|
|
160
|
-
label: '结束占位符',
|
|
161
161
|
show: ({ values }) =>
|
|
162
162
|
[
|
|
163
163
|
'daterange',
|
|
@@ -165,27 +165,29 @@ export default {
|
|
|
165
165
|
'quarterrange',
|
|
166
166
|
'weekrange',
|
|
167
167
|
'yearrange',
|
|
168
|
-
].includes(values.
|
|
168
|
+
].includes(values.props.type),
|
|
169
169
|
type: 'input',
|
|
170
170
|
},
|
|
171
171
|
{
|
|
172
|
-
|
|
172
|
+
field: 'props.format',
|
|
173
|
+
label: '显示格式',
|
|
174
|
+
props: {
|
|
173
175
|
placeholder: '请输入',
|
|
174
176
|
},
|
|
175
|
-
field: 'componentProps.format',
|
|
176
|
-
label: '显示格式',
|
|
177
177
|
type: 'input',
|
|
178
178
|
},
|
|
179
179
|
{
|
|
180
|
-
|
|
180
|
+
field: 'props.valueFormat',
|
|
181
|
+
label: '数据格式',
|
|
182
|
+
props: {
|
|
181
183
|
placeholder: '请输入',
|
|
182
184
|
},
|
|
183
|
-
field: 'componentProps.valueFormat',
|
|
184
|
-
label: '数据格式',
|
|
185
185
|
type: 'input',
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
|
-
|
|
188
|
+
field: 'props.size',
|
|
189
|
+
label: '尺寸',
|
|
190
|
+
props: {
|
|
189
191
|
allowClear: true,
|
|
190
192
|
options: [
|
|
191
193
|
{
|
|
@@ -203,13 +205,13 @@ export default {
|
|
|
203
205
|
],
|
|
204
206
|
placeholder: '请选择',
|
|
205
207
|
},
|
|
206
|
-
field: 'componentProps.size',
|
|
207
|
-
label: '尺寸',
|
|
208
208
|
type: 'select',
|
|
209
209
|
},
|
|
210
210
|
|
|
211
211
|
{
|
|
212
|
-
|
|
212
|
+
field: 'props.placement',
|
|
213
|
+
label: '弹出框位置',
|
|
214
|
+
props: {
|
|
213
215
|
allowClear: true,
|
|
214
216
|
options: [
|
|
215
217
|
{
|
|
@@ -231,36 +233,34 @@ export default {
|
|
|
231
233
|
],
|
|
232
234
|
placeholder: '请选择',
|
|
233
235
|
},
|
|
234
|
-
field: 'componentProps.placement',
|
|
235
|
-
label: '弹出框位置',
|
|
236
236
|
type: 'select',
|
|
237
237
|
},
|
|
238
238
|
{
|
|
239
|
-
|
|
239
|
+
field: 'props.bordered',
|
|
240
|
+
label: '无边框',
|
|
241
|
+
props: {
|
|
240
242
|
checkedValue: false,
|
|
241
243
|
unCheckedValue: true,
|
|
242
244
|
},
|
|
243
|
-
field: 'componentProps.bordered',
|
|
244
|
-
label: '无边框',
|
|
245
245
|
type: 'switch',
|
|
246
246
|
},
|
|
247
247
|
{
|
|
248
|
-
field: '
|
|
248
|
+
field: 'props.inputReadOnly',
|
|
249
249
|
label: '禁止键盘输入',
|
|
250
250
|
type: 'switch',
|
|
251
251
|
},
|
|
252
252
|
{
|
|
253
|
-
field: '
|
|
253
|
+
field: 'props.allowClear',
|
|
254
254
|
label: '可清空',
|
|
255
255
|
type: 'switch',
|
|
256
256
|
},
|
|
257
257
|
{
|
|
258
|
-
field: '
|
|
258
|
+
field: 'props.disabled',
|
|
259
259
|
label: '禁用',
|
|
260
260
|
type: 'switch',
|
|
261
261
|
},
|
|
262
262
|
{
|
|
263
|
-
field: '
|
|
263
|
+
field: 'props.hidden',
|
|
264
264
|
label: '隐藏',
|
|
265
265
|
type: 'switch',
|
|
266
266
|
},
|
|
@@ -284,15 +284,15 @@ export default {
|
|
|
284
284
|
],
|
|
285
285
|
},
|
|
286
286
|
defaultSchema: {
|
|
287
|
-
|
|
287
|
+
field: 'date',
|
|
288
|
+
input: true,
|
|
289
|
+
label: '日期选择器',
|
|
290
|
+
props: {
|
|
288
291
|
format: 'YYYY-MM-DD',
|
|
289
292
|
placeholder: '请选择',
|
|
290
293
|
type: 'date',
|
|
291
294
|
valueFormat: 'YYYY-MM-DD',
|
|
292
295
|
},
|
|
293
|
-
field: 'date',
|
|
294
|
-
input: true,
|
|
295
|
-
label: '日期选择器',
|
|
296
296
|
type: 'date',
|
|
297
297
|
},
|
|
298
298
|
groupName: '表单',
|
package/src/form/form.vue
CHANGED
|
@@ -36,7 +36,7 @@ const form = ref<FormInstance | null>(null);
|
|
|
36
36
|
const forms = inject<{ [name: string]: any }>('forms', {});
|
|
37
37
|
const formData = pageManager.setFormData(
|
|
38
38
|
{},
|
|
39
|
-
props.componentSchema?.
|
|
39
|
+
props.componentSchema?.props?.name,
|
|
40
40
|
);
|
|
41
41
|
provide('formData', formData);
|
|
42
42
|
|
|
@@ -76,7 +76,7 @@ const mountedForm = (vNode: VNode) => {
|
|
|
76
76
|
|
|
77
77
|
if (props.componentSchema?.type === 'form' && forms.value && form.value) {
|
|
78
78
|
const name =
|
|
79
|
-
props.componentSchema?.
|
|
79
|
+
props.componentSchema?.props?.name ??
|
|
80
80
|
props.componentSchema?.name ??
|
|
81
81
|
('default' as string);
|
|
82
82
|
|
|
@@ -88,8 +88,8 @@ const mountedForm = (vNode: VNode) => {
|
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
90
|
|
|
91
|
-
const
|
|
92
|
-
const recordProps = props.componentSchema!.
|
|
91
|
+
const formProps = computed(() => {
|
|
92
|
+
const recordProps = props.componentSchema!.props;
|
|
93
93
|
let labelCol = recordProps.labelCol;
|
|
94
94
|
let wrapperCol = recordProps.wrapperCol;
|
|
95
95
|
if (recordProps.layout === 'vertical') {
|
|
@@ -132,7 +132,7 @@ defineExpose({
|
|
|
132
132
|
<template>
|
|
133
133
|
<Form
|
|
134
134
|
:model="formData"
|
|
135
|
-
v-bind="
|
|
135
|
+
v-bind="formProps"
|
|
136
136
|
@finish="onFinish"
|
|
137
137
|
@vue:mounted="mountedForm"
|
|
138
138
|
>
|
package/src/form/index.ts
CHANGED
|
@@ -19,12 +19,14 @@ export default {
|
|
|
19
19
|
],
|
|
20
20
|
attribute: [
|
|
21
21
|
{
|
|
22
|
-
field: '
|
|
22
|
+
field: 'props.name',
|
|
23
23
|
label: 'Name',
|
|
24
24
|
type: 'input',
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
|
|
27
|
+
field: 'props.layout',
|
|
28
|
+
label: '表单布局',
|
|
29
|
+
props: {
|
|
28
30
|
allowClear: true,
|
|
29
31
|
'option-type': 'button',
|
|
30
32
|
options: [
|
|
@@ -43,12 +45,12 @@ export default {
|
|
|
43
45
|
],
|
|
44
46
|
placeholder: '请选择',
|
|
45
47
|
},
|
|
46
|
-
field: 'componentProps.layout',
|
|
47
|
-
label: '表单布局',
|
|
48
48
|
type: 'radio',
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
|
-
|
|
51
|
+
field: 'props.labelLayout',
|
|
52
|
+
label: '标签布局',
|
|
53
|
+
props: {
|
|
52
54
|
'option-type': 'button',
|
|
53
55
|
options: [
|
|
54
56
|
{
|
|
@@ -61,42 +63,42 @@ export default {
|
|
|
61
63
|
},
|
|
62
64
|
],
|
|
63
65
|
},
|
|
64
|
-
field: 'componentProps.labelLayout',
|
|
65
|
-
label: '标签布局',
|
|
66
66
|
type: 'radio',
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
|
-
field: '
|
|
69
|
+
field: 'props.labelWidth',
|
|
70
70
|
label: '标签宽度',
|
|
71
71
|
show: ({ values }) => {
|
|
72
|
-
return values.
|
|
72
|
+
return values.props?.labelLayout === 'fixed';
|
|
73
73
|
},
|
|
74
74
|
type: 'EInputSize',
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
|
-
|
|
77
|
+
field: 'props.labelCol.span',
|
|
78
|
+
label: '标签占比',
|
|
79
|
+
props: {
|
|
78
80
|
placeholder: '请输入',
|
|
79
81
|
},
|
|
80
|
-
field: 'componentProps.labelCol.span',
|
|
81
|
-
label: '标签占比',
|
|
82
82
|
show: ({ values }) => {
|
|
83
|
-
return values.
|
|
83
|
+
return values.props?.labelLayout === 'flex';
|
|
84
84
|
},
|
|
85
85
|
type: 'input',
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
|
-
|
|
88
|
+
field: 'props.wrapperCol.span',
|
|
89
|
+
label: '控件占比',
|
|
90
|
+
props: {
|
|
89
91
|
placeholder: '请输入',
|
|
90
92
|
},
|
|
91
|
-
field: 'componentProps.wrapperCol.span',
|
|
92
|
-
label: '控件占比',
|
|
93
93
|
show: ({ values }) => {
|
|
94
|
-
return values.
|
|
94
|
+
return values.props?.labelLayout === 'flex';
|
|
95
95
|
},
|
|
96
96
|
type: 'input',
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
|
-
|
|
99
|
+
field: 'props.labelAlign',
|
|
100
|
+
label: '标签对齐',
|
|
101
|
+
props: {
|
|
100
102
|
'option-type': 'button',
|
|
101
103
|
options: [
|
|
102
104
|
{
|
|
@@ -109,12 +111,13 @@ export default {
|
|
|
109
111
|
},
|
|
110
112
|
],
|
|
111
113
|
},
|
|
112
|
-
field: 'componentProps.labelAlign',
|
|
113
|
-
label: '标签对齐',
|
|
114
114
|
type: 'radio',
|
|
115
115
|
},
|
|
116
116
|
{
|
|
117
|
-
|
|
117
|
+
defaultValue: 'default',
|
|
118
|
+
field: 'props.size',
|
|
119
|
+
label: '尺寸',
|
|
120
|
+
props: {
|
|
118
121
|
allowClear: true,
|
|
119
122
|
options: [
|
|
120
123
|
{
|
|
@@ -132,50 +135,48 @@ export default {
|
|
|
132
135
|
],
|
|
133
136
|
placeholder: '请选择',
|
|
134
137
|
},
|
|
135
|
-
defaultValue: 'default',
|
|
136
|
-
field: 'componentProps.size',
|
|
137
|
-
label: '尺寸',
|
|
138
138
|
type: 'select',
|
|
139
139
|
},
|
|
140
140
|
{
|
|
141
|
-
|
|
141
|
+
field: 'props.colon',
|
|
142
|
+
label: '隐藏冒号',
|
|
143
|
+
props: {
|
|
142
144
|
checkedValue: false,
|
|
143
145
|
unCheckedValue: true,
|
|
144
146
|
},
|
|
145
|
-
field: 'componentProps.colon',
|
|
146
|
-
label: '隐藏冒号',
|
|
147
147
|
type: 'switch',
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
|
-
field: '
|
|
150
|
+
field: 'props.hideRequiredMark',
|
|
151
151
|
label: '隐藏必须标志',
|
|
152
152
|
type: 'switch',
|
|
153
153
|
},
|
|
154
154
|
|
|
155
155
|
{
|
|
156
|
-
field: '
|
|
156
|
+
field: 'props.labelWrap',
|
|
157
157
|
label: '标签文本换行',
|
|
158
158
|
type: 'switch',
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
|
-
field: '
|
|
161
|
+
field: 'props.scrollToFirstError',
|
|
162
162
|
label: '滚动校验错误处',
|
|
163
163
|
type: 'switch',
|
|
164
164
|
},
|
|
165
165
|
{
|
|
166
|
-
field: '
|
|
166
|
+
field: 'props.disabled',
|
|
167
167
|
label: '禁用',
|
|
168
168
|
type: 'switch',
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
|
-
field: '
|
|
171
|
+
field: 'props.hidden',
|
|
172
172
|
label: '隐藏',
|
|
173
173
|
type: 'switch',
|
|
174
174
|
},
|
|
175
175
|
],
|
|
176
176
|
},
|
|
177
177
|
defaultSchema: {
|
|
178
|
-
|
|
178
|
+
label: '表单',
|
|
179
|
+
props: {
|
|
179
180
|
labelCol: {
|
|
180
181
|
span: 5,
|
|
181
182
|
},
|
|
@@ -186,7 +187,6 @@ export default {
|
|
|
186
187
|
span: 19,
|
|
187
188
|
},
|
|
188
189
|
},
|
|
189
|
-
label: '表单',
|
|
190
190
|
type: 'form',
|
|
191
191
|
children: [],
|
|
192
192
|
},
|
package/src/index.ts
CHANGED
|
@@ -17,13 +17,14 @@ import Form from './form';
|
|
|
17
17
|
import FormItem from './form-item';
|
|
18
18
|
import Input from './input';
|
|
19
19
|
import InputNumber from './input-number';
|
|
20
|
-
import InputPassword from './input-password';
|
|
21
20
|
import Modal from './modal';
|
|
22
21
|
import Radio from './radio';
|
|
23
22
|
import Row from './row';
|
|
24
23
|
import Select from './select';
|
|
25
24
|
import Slider from './slider';
|
|
26
25
|
import Switch from './switch';
|
|
26
|
+
import TabsPane from './tab-pane';
|
|
27
|
+
import Tabs from './tabs';
|
|
27
28
|
import Textarea from './textarea';
|
|
28
29
|
import TimePicker from './time-picker';
|
|
29
30
|
import UploadFile from './upload-file';
|
|
@@ -74,14 +75,6 @@ export function setupAntd(pluginManager: PluginManager = pManager): void {
|
|
|
74
75
|
'CollapseItem',
|
|
75
76
|
async () => (await import('ant-design-vue')).CollapsePanel,
|
|
76
77
|
);
|
|
77
|
-
pluginManager.component.add(
|
|
78
|
-
'Tabs',
|
|
79
|
-
async () => (await import('ant-design-vue')).Tabs,
|
|
80
|
-
);
|
|
81
|
-
pluginManager.component.add(
|
|
82
|
-
'TabPane',
|
|
83
|
-
async () => (await import('ant-design-vue')).TabPane,
|
|
84
|
-
);
|
|
85
78
|
|
|
86
79
|
const componentArray = [
|
|
87
80
|
Form,
|
|
@@ -89,7 +82,6 @@ export function setupAntd(pluginManager: PluginManager = pManager): void {
|
|
|
89
82
|
Input,
|
|
90
83
|
Textarea,
|
|
91
84
|
InputNumber,
|
|
92
|
-
InputPassword,
|
|
93
85
|
Radio,
|
|
94
86
|
Checkbox,
|
|
95
87
|
Select,
|
|
@@ -106,14 +98,14 @@ export function setupAntd(pluginManager: PluginManager = pManager): void {
|
|
|
106
98
|
Row,
|
|
107
99
|
Col,
|
|
108
100
|
Modal,
|
|
101
|
+
Tabs,
|
|
102
|
+
TabsPane,
|
|
109
103
|
];
|
|
110
104
|
|
|
111
105
|
// 更新默认上传地址
|
|
112
106
|
watchEffect(() => {
|
|
113
|
-
UploadImage.defaultSchema.
|
|
114
|
-
|
|
115
|
-
UploadFile.defaultSchema.componentProps.action =
|
|
116
|
-
pluginManager.global.uploadFile;
|
|
107
|
+
UploadImage.defaultSchema.props.action = pluginManager.global.uploadImage;
|
|
108
|
+
UploadFile.defaultSchema.props.action = pluginManager.global.uploadFile;
|
|
117
109
|
});
|
|
118
110
|
|
|
119
111
|
componentArray.forEach((item) => {
|
|
@@ -130,5 +122,5 @@ export function setupAntd(pluginManager: PluginManager = pManager): void {
|
|
|
130
122
|
};
|
|
131
123
|
|
|
132
124
|
// ui初始化完成。
|
|
133
|
-
pluginManager.setInitialized(true);
|
|
125
|
+
pluginManager.designer.setInitialized(true);
|
|
134
126
|
}
|
package/src/input/index.ts
CHANGED
|
@@ -21,8 +21,8 @@ export default {
|
|
|
21
21
|
attribute: [
|
|
22
22
|
{
|
|
23
23
|
field: 'field',
|
|
24
|
-
label: '
|
|
25
|
-
type: '
|
|
24
|
+
label: '数据字段',
|
|
25
|
+
type: 'EpField',
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
field: 'label',
|
|
@@ -30,20 +30,22 @@ export default {
|
|
|
30
30
|
type: 'input',
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
|
-
field: '
|
|
33
|
+
field: 'props.placeholder',
|
|
34
34
|
label: '占位内容',
|
|
35
35
|
type: 'input',
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
|
-
|
|
38
|
+
field: 'props.defaultValue',
|
|
39
|
+
label: '默认值',
|
|
40
|
+
props: {
|
|
39
41
|
placeholder: '请输入',
|
|
40
42
|
},
|
|
41
|
-
field: 'componentProps.defaultValue',
|
|
42
|
-
label: '默认值',
|
|
43
43
|
type: 'input',
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
|
-
|
|
46
|
+
field: 'props.type',
|
|
47
|
+
label: '输入类型',
|
|
48
|
+
props: {
|
|
47
49
|
allowClear: true,
|
|
48
50
|
options: [
|
|
49
51
|
{
|
|
@@ -61,12 +63,12 @@ export default {
|
|
|
61
63
|
],
|
|
62
64
|
placeholder: '请选择',
|
|
63
65
|
},
|
|
64
|
-
field: 'componentProps.type',
|
|
65
|
-
label: '输入类型',
|
|
66
66
|
type: 'select',
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
|
-
|
|
69
|
+
field: 'props.size',
|
|
70
|
+
label: '尺寸',
|
|
71
|
+
props: {
|
|
70
72
|
allowClear: true,
|
|
71
73
|
options: [
|
|
72
74
|
{
|
|
@@ -84,44 +86,42 @@ export default {
|
|
|
84
86
|
],
|
|
85
87
|
placeholder: '请选择',
|
|
86
88
|
},
|
|
87
|
-
field: 'componentProps.size',
|
|
88
|
-
label: '尺寸',
|
|
89
89
|
type: 'select',
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
|
-
|
|
92
|
+
field: 'props.bordered',
|
|
93
|
+
label: '无边框',
|
|
94
|
+
props: {
|
|
93
95
|
checkedValue: false,
|
|
94
96
|
unCheckedValue: true,
|
|
95
97
|
},
|
|
96
|
-
field: 'componentProps.bordered',
|
|
97
|
-
label: '无边框',
|
|
98
98
|
type: 'switch',
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
|
-
|
|
101
|
+
field: 'props.maxlength',
|
|
102
|
+
label: '最大输入长度',
|
|
103
|
+
props: {
|
|
102
104
|
placeholder: '请输入',
|
|
103
105
|
},
|
|
104
|
-
field: 'componentProps.maxlength',
|
|
105
|
-
label: '最大输入长度',
|
|
106
106
|
type: 'number',
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
|
-
field: '
|
|
109
|
+
field: 'props.showCount',
|
|
110
110
|
label: '展示字数',
|
|
111
111
|
type: 'switch',
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
|
-
field: '
|
|
114
|
+
field: 'props.allowClear',
|
|
115
115
|
label: '可清空',
|
|
116
116
|
type: 'switch',
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
|
-
field: '
|
|
119
|
+
field: 'props.disabled',
|
|
120
120
|
label: '禁用',
|
|
121
121
|
type: 'switch',
|
|
122
122
|
},
|
|
123
123
|
{
|
|
124
|
-
field: '
|
|
124
|
+
field: 'props.hidden',
|
|
125
125
|
label: '隐藏',
|
|
126
126
|
type: 'switch',
|
|
127
127
|
},
|
|
@@ -157,12 +157,12 @@ export default {
|
|
|
157
157
|
],
|
|
158
158
|
},
|
|
159
159
|
defaultSchema: {
|
|
160
|
-
componentProps: {
|
|
161
|
-
placeholder: '请输入',
|
|
162
|
-
},
|
|
163
160
|
field: 'input',
|
|
164
161
|
input: true,
|
|
165
162
|
label: '输入框',
|
|
163
|
+
props: {
|
|
164
|
+
placeholder: '请输入',
|
|
165
|
+
},
|
|
166
166
|
type: 'input',
|
|
167
167
|
},
|
|
168
168
|
groupName: '表单',
|