@innoways/utils 3.0.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/CHANGELOG.md +184 -0
- package/README.md +11 -0
- package/__tests__/combine.ts +102 -0
- package/__tests__/common.ts +155 -0
- package/__tests__/flowHandle.ts +16 -0
- package/__tests__/parse.ts +109 -0
- package/__testsdata__/array.schema.ts +97 -0
- package/__testsdata__/controlFlow.ts +166 -0
- package/__testsdata__/datePicker.schema.ts +92 -0
- package/__testsdata__/errMsg.schema.ts +138 -0
- package/__testsdata__/errMsg2.schema.ts +74 -0
- package/__testsdata__/errMsg3.schema.ts +79 -0
- package/__testsdata__/errMsg4.schema.ts +152 -0
- package/__testsdata__/multinest.schema.ts +265 -0
- package/__testsdata__/nest.schema.ts +307 -0
- package/__testsdata__/nestObject.schema.ts +360 -0
- package/__testsdata__/repeatField.schema.ts +88 -0
- package/__testsdata__/root.schema.ts +35 -0
- package/__testsdata__/test$fieldKey.schema.ts +1158 -0
- package/__testsdata__/test.schema.ts +1158 -0
- package/build-info/index.stats.html +2648 -0
- package/dist/cjs/index.js +3949 -0
- package/dist/esm/index.js +3907 -0
- package/package.json +44 -0
- package/rollup.config.js +13 -0
- package/tsconfig.dist.json +7 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export const unitedSchema = {
|
|
2
|
+
validateTime: 'change',
|
|
3
|
+
requiredMode: 'default',
|
|
4
|
+
type: 'object',
|
|
5
|
+
theme: 'antd',
|
|
6
|
+
schema: [
|
|
7
|
+
{
|
|
8
|
+
type: 'array',
|
|
9
|
+
title: 'Array Container',
|
|
10
|
+
ui: {
|
|
11
|
+
type: 'array',
|
|
12
|
+
mode: 'add',
|
|
13
|
+
addTitle: 'Add a row of data',
|
|
14
|
+
},
|
|
15
|
+
minItems: 1,
|
|
16
|
+
errMsg: {
|
|
17
|
+
minItems: '最小1',
|
|
18
|
+
},
|
|
19
|
+
items: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
title: 'Input Box',
|
|
22
|
+
minLength: 2,
|
|
23
|
+
errMsg: {
|
|
24
|
+
minLength: '2',
|
|
25
|
+
},
|
|
26
|
+
ui: {
|
|
27
|
+
type: 'text',
|
|
28
|
+
style: {
|
|
29
|
+
width: '100%',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
fieldKey: 'array_g6NF65',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const parsedSchema = {
|
|
39
|
+
dataSchema: {
|
|
40
|
+
validateTime: 'change',
|
|
41
|
+
requiredMode: 'default',
|
|
42
|
+
type: 'object',
|
|
43
|
+
properties: {
|
|
44
|
+
array_g6NF65: {
|
|
45
|
+
type: 'array',
|
|
46
|
+
title: 'Array Container',
|
|
47
|
+
minItems: 1,
|
|
48
|
+
errorMessage: {
|
|
49
|
+
minItems: '最小1',
|
|
50
|
+
},
|
|
51
|
+
items: {
|
|
52
|
+
type: 'string',
|
|
53
|
+
title: 'Input Box',
|
|
54
|
+
minLength: 2,
|
|
55
|
+
errorMessage: {
|
|
56
|
+
minLength: '2',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
uiSchema: {
|
|
63
|
+
theme: 'antd',
|
|
64
|
+
order: ['array_g6NF65'],
|
|
65
|
+
properties: {
|
|
66
|
+
array_g6NF65: {
|
|
67
|
+
type: 'array',
|
|
68
|
+
mode: 'add',
|
|
69
|
+
addTitle: 'Add a row of data',
|
|
70
|
+
order: ['$container'],
|
|
71
|
+
properties: {
|
|
72
|
+
$container: {
|
|
73
|
+
type: 'text',
|
|
74
|
+
style: {
|
|
75
|
+
width: '100%',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
typePath: {
|
|
83
|
+
array_g6NF65: {
|
|
84
|
+
fatherKey: '',
|
|
85
|
+
title: 'Array Container',
|
|
86
|
+
type: 'array',
|
|
87
|
+
unitedSchemaKey: 'schema.0',
|
|
88
|
+
},
|
|
89
|
+
'array_g6NF65.$container': {
|
|
90
|
+
fatherKey: 'array_g6NF65',
|
|
91
|
+
title: 'Input Box',
|
|
92
|
+
type: 'string',
|
|
93
|
+
unitedSchemaKey: 'schema.0.items',
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
customProps: [],
|
|
97
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { Flow } from '../src/flowHandle/type'
|
|
2
|
+
|
|
3
|
+
export const flowCondintion: Flow = {
|
|
4
|
+
trigger: {
|
|
5
|
+
event: 'globalChange',
|
|
6
|
+
},
|
|
7
|
+
actions: [
|
|
8
|
+
{
|
|
9
|
+
type: 'controlFlow',
|
|
10
|
+
condintion: [
|
|
11
|
+
{
|
|
12
|
+
fieldKey1: 'a uiSchema disabled',
|
|
13
|
+
operator: 'true',
|
|
14
|
+
logicOperator: '&&',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
fieldKey1: 'b uiSchema a',
|
|
18
|
+
operator: '!==',
|
|
19
|
+
value2: 'c',
|
|
20
|
+
logicOperator: '&&',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
fieldKey1: 'c dataSchema default',
|
|
24
|
+
operator: '===',
|
|
25
|
+
value2: 'c',
|
|
26
|
+
logicOperator: '||',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
fieldKey1: 'c data d',
|
|
30
|
+
operator: '===',
|
|
31
|
+
value2: 'c',
|
|
32
|
+
logicOperator: '||',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
fieldKey1: 'c dataSchema default',
|
|
36
|
+
operator: '===',
|
|
37
|
+
value2: 'c',
|
|
38
|
+
logicOperator: '&&',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
fieldKey1: 'a.a1 uiSchema disabled',
|
|
42
|
+
operator: 'true',
|
|
43
|
+
logicOperator: '||',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
fieldKey1: 'b.b1 uiSchema a',
|
|
47
|
+
operator: '!==',
|
|
48
|
+
value2: 'c',
|
|
49
|
+
logicOperator: '&&',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
fieldKey1: 'c.c1 dataSchema default',
|
|
53
|
+
operator: '===',
|
|
54
|
+
value2: 'c',
|
|
55
|
+
logicOperator: '&&',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
fieldKey1: 'c.c1 data d',
|
|
59
|
+
operator: '===',
|
|
60
|
+
value2: 'c',
|
|
61
|
+
logicOperator: '||',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
fieldKey1: 'c.c1 dataSchema default',
|
|
65
|
+
operator: '===',
|
|
66
|
+
value2: 'c',
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
effect: [
|
|
70
|
+
{
|
|
71
|
+
type: 'set',
|
|
72
|
+
fieldKey: 'b data',
|
|
73
|
+
value: '',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
type: 'subAction',
|
|
77
|
+
actions: [],
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export const flowEffectTestData: Flow = {
|
|
85
|
+
trigger: {
|
|
86
|
+
event: 'globalChange',
|
|
87
|
+
},
|
|
88
|
+
actions: [
|
|
89
|
+
{
|
|
90
|
+
type: 'controlFlow',
|
|
91
|
+
condintion: [{ fieldKey1: 'b', operator: '!==', value2: 'c' }],
|
|
92
|
+
effect: [
|
|
93
|
+
{
|
|
94
|
+
type: 'set',
|
|
95
|
+
fieldKey: 'a data',
|
|
96
|
+
value: 'b',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
type: 'set',
|
|
100
|
+
fieldKey: 'a uiSchema vcontrol',
|
|
101
|
+
value: 'return false',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
type: 'set',
|
|
105
|
+
fieldKey: 'b dataSchema default',
|
|
106
|
+
value: '1',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
type: 'set',
|
|
110
|
+
fieldKey: 'c data property',
|
|
111
|
+
value: '1',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
type: 'merge',
|
|
115
|
+
fieldKey: 'd uiSchema vcontrol',
|
|
116
|
+
value: 'return false',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
type: 'merge',
|
|
120
|
+
fieldKey: 'e dataSchema default',
|
|
121
|
+
value: '1',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
type: 'merge',
|
|
125
|
+
fieldKey: 'f data property',
|
|
126
|
+
value: '1',
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
{
|
|
130
|
+
type: 'set',
|
|
131
|
+
fieldKey: 'a1.a2 uiSchema vcontrol',
|
|
132
|
+
value: 'return false',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
type: 'set',
|
|
136
|
+
fieldKey: 'b1.b2 dataSchema default',
|
|
137
|
+
value: '1',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
type: 'set',
|
|
141
|
+
fieldKey: 'c1.c2 data property',
|
|
142
|
+
value: '1',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
type: 'merge',
|
|
146
|
+
fieldKey: 'd1.d2 uiSchema vcontrol',
|
|
147
|
+
value: 'return false',
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
type: 'merge',
|
|
151
|
+
fieldKey: 'e1.e2 dataSchema default',
|
|
152
|
+
value: '1',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
type: 'merge',
|
|
156
|
+
fieldKey: 'f1.f2 data property',
|
|
157
|
+
value: '1',
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
type: 'subAction',
|
|
161
|
+
actions: [],
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export const unitedSchema = {
|
|
2
|
+
theme: 'antd',
|
|
3
|
+
requiredMode: 'empty',
|
|
4
|
+
validateTime: 'submit',
|
|
5
|
+
type: 'object',
|
|
6
|
+
'$:customSchema': '位于顶层的自定义属性',
|
|
7
|
+
ui: {
|
|
8
|
+
mode: 'edit',
|
|
9
|
+
'$:customUi': '位于ui顶层的自定义属性',
|
|
10
|
+
},
|
|
11
|
+
schema: [
|
|
12
|
+
{
|
|
13
|
+
type: 'array',
|
|
14
|
+
title: 'Time Selection Box',
|
|
15
|
+
'$:customData': '666',
|
|
16
|
+
items: [
|
|
17
|
+
{
|
|
18
|
+
type: 'string',
|
|
19
|
+
format: 'time',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
type: 'string',
|
|
23
|
+
format: 'time',
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
ui: {
|
|
27
|
+
type: 'timePicker',
|
|
28
|
+
'$:customUi': 'xxx',
|
|
29
|
+
},
|
|
30
|
+
fieldKey: 'hahaha',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const parsedSchema = {
|
|
36
|
+
dataSchema: {
|
|
37
|
+
properties: {
|
|
38
|
+
hahaha: {
|
|
39
|
+
'$:customData': '666',
|
|
40
|
+
items: [
|
|
41
|
+
{
|
|
42
|
+
format: 'time',
|
|
43
|
+
type: 'string',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
format: 'time',
|
|
47
|
+
type: 'string',
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
title: 'Time Selection Box',
|
|
51
|
+
type: 'array',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
type: 'object',
|
|
55
|
+
'$:customSchema': '位于顶层的自定义属性',
|
|
56
|
+
validateTime: 'submit',
|
|
57
|
+
requiredMode: 'empty',
|
|
58
|
+
},
|
|
59
|
+
uiSchema: {
|
|
60
|
+
mode: 'edit',
|
|
61
|
+
order: ['hahaha'],
|
|
62
|
+
'$:customUi': '位于ui顶层的自定义属性',
|
|
63
|
+
properties: {
|
|
64
|
+
hahaha: {
|
|
65
|
+
type: 'timePicker',
|
|
66
|
+
'$:customUi': 'xxx',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
theme: 'antd',
|
|
70
|
+
},
|
|
71
|
+
typePath: {
|
|
72
|
+
hahaha: {
|
|
73
|
+
fatherKey: '',
|
|
74
|
+
title: 'Time Selection Box',
|
|
75
|
+
type: 'array',
|
|
76
|
+
unitedSchemaKey: 'schema.0',
|
|
77
|
+
},
|
|
78
|
+
'hahaha.0': {
|
|
79
|
+
fatherKey: 'hahaha',
|
|
80
|
+
title: '',
|
|
81
|
+
type: 'string',
|
|
82
|
+
unitedSchemaKey: 'schema.0.items.0',
|
|
83
|
+
},
|
|
84
|
+
'hahaha.1': {
|
|
85
|
+
fatherKey: 'hahaha',
|
|
86
|
+
title: '',
|
|
87
|
+
type: 'string',
|
|
88
|
+
unitedSchemaKey: 'schema.0.items.1',
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
customProps: ['$:customSchema', '$:customData'],
|
|
92
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
export const unitedSchema = {
|
|
2
|
+
theme: 'antd',
|
|
3
|
+
validateTime: 'submit',
|
|
4
|
+
requiredMode: 'default',
|
|
5
|
+
type: 'object',
|
|
6
|
+
ui: {
|
|
7
|
+
mode: 'edit',
|
|
8
|
+
'$:type': 'drip',
|
|
9
|
+
},
|
|
10
|
+
schema: [
|
|
11
|
+
{
|
|
12
|
+
fieldKey: 'name',
|
|
13
|
+
title: '名字',
|
|
14
|
+
type: 'string',
|
|
15
|
+
requiredMsg: '该项必填',
|
|
16
|
+
ui: {
|
|
17
|
+
type: 'text',
|
|
18
|
+
placeholder: '请输入name,当name1有值时,该表单隐藏',
|
|
19
|
+
description: {
|
|
20
|
+
type: 'icon',
|
|
21
|
+
title: 'hover触发提示',
|
|
22
|
+
trigger: 'hover',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
title: '下拉输入',
|
|
28
|
+
type: 'object',
|
|
29
|
+
fieldKey: 'babelRadio',
|
|
30
|
+
ui: {
|
|
31
|
+
type: 'selectText',
|
|
32
|
+
placeholder: '请选择',
|
|
33
|
+
allowClear: true,
|
|
34
|
+
multiple: true,
|
|
35
|
+
requestCache: true,
|
|
36
|
+
options: [
|
|
37
|
+
{
|
|
38
|
+
label: '北京',
|
|
39
|
+
value: '0',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
label: '上海',
|
|
43
|
+
value: '1',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
label: '成都',
|
|
47
|
+
value: '2',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
label: '武汉',
|
|
51
|
+
value: '3',
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const parsedSchema = {
|
|
60
|
+
dataSchema: {
|
|
61
|
+
validateTime: 'submit',
|
|
62
|
+
requiredMode: 'default',
|
|
63
|
+
type: 'object',
|
|
64
|
+
properties: {
|
|
65
|
+
name: {
|
|
66
|
+
title: '名字',
|
|
67
|
+
type: 'string',
|
|
68
|
+
},
|
|
69
|
+
babelRadio: {
|
|
70
|
+
title: '下拉输入',
|
|
71
|
+
type: 'object',
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
required: ['name'],
|
|
75
|
+
errorMessage: {
|
|
76
|
+
required: {
|
|
77
|
+
name: '该项必填',
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
uiSchema: {
|
|
82
|
+
theme: 'antd',
|
|
83
|
+
mode: 'edit',
|
|
84
|
+
order: ['name', 'babelRadio'],
|
|
85
|
+
'$:type': 'drip',
|
|
86
|
+
properties: {
|
|
87
|
+
name: {
|
|
88
|
+
type: 'text',
|
|
89
|
+
placeholder: '请输入name,当name1有值时,该表单隐藏',
|
|
90
|
+
description: {
|
|
91
|
+
type: 'icon',
|
|
92
|
+
title: 'hover触发提示',
|
|
93
|
+
trigger: 'hover',
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
babelRadio: {
|
|
97
|
+
type: 'selectText',
|
|
98
|
+
placeholder: '请选择',
|
|
99
|
+
allowClear: true,
|
|
100
|
+
multiple: true,
|
|
101
|
+
requestCache: true,
|
|
102
|
+
options: [
|
|
103
|
+
{
|
|
104
|
+
label: '北京',
|
|
105
|
+
value: '0',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
label: '上海',
|
|
109
|
+
value: '1',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
label: '成都',
|
|
113
|
+
value: '2',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
label: '武汉',
|
|
117
|
+
value: '3',
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
typePath: {
|
|
124
|
+
babelRadio: {
|
|
125
|
+
fatherKey: '',
|
|
126
|
+
title: '下拉输入',
|
|
127
|
+
type: 'object',
|
|
128
|
+
unitedSchemaKey: 'schema.1',
|
|
129
|
+
},
|
|
130
|
+
name: {
|
|
131
|
+
fatherKey: '',
|
|
132
|
+
title: '名字',
|
|
133
|
+
type: 'string',
|
|
134
|
+
unitedSchemaKey: 'schema.0',
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
customProps: [],
|
|
138
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export const unitedSchema = {
|
|
2
|
+
validateTime: 'submit',
|
|
3
|
+
requiredMode: 'default',
|
|
4
|
+
type: 'object',
|
|
5
|
+
theme: 'antd',
|
|
6
|
+
ui: {
|
|
7
|
+
mode: 'edit',
|
|
8
|
+
},
|
|
9
|
+
schema: [
|
|
10
|
+
{
|
|
11
|
+
title: '名字',
|
|
12
|
+
type: 'string',
|
|
13
|
+
minLength: 2,
|
|
14
|
+
maxLength: 3,
|
|
15
|
+
ui: {
|
|
16
|
+
type: 'text',
|
|
17
|
+
placeholder: '请输入name,当name1有值时,该表单隐藏',
|
|
18
|
+
description: {
|
|
19
|
+
type: 'icon',
|
|
20
|
+
title: 'hover触发提示',
|
|
21
|
+
trigger: 'hover',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
requiredMsg: 'require',
|
|
25
|
+
fieldKey: 'name',
|
|
26
|
+
errMsg: { _: '兜底', minLength: '2', $required: '1', maxLength: '3' },
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const parsedSchema = {
|
|
32
|
+
dataSchema: {
|
|
33
|
+
validateTime: 'submit',
|
|
34
|
+
requiredMode: 'default',
|
|
35
|
+
type: 'object',
|
|
36
|
+
properties: {
|
|
37
|
+
name: {
|
|
38
|
+
title: '名字',
|
|
39
|
+
type: 'string',
|
|
40
|
+
minLength: 2,
|
|
41
|
+
errorMessage: {
|
|
42
|
+
_: '兜底',
|
|
43
|
+
minLength: '2',
|
|
44
|
+
$required: '1',
|
|
45
|
+
maxLength: '3',
|
|
46
|
+
},
|
|
47
|
+
maxLength: 3,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
errorMessage: { required: { name: 'require' } },
|
|
51
|
+
required: ['name'],
|
|
52
|
+
},
|
|
53
|
+
uiSchema: {
|
|
54
|
+
mode: 'edit',
|
|
55
|
+
theme: 'antd',
|
|
56
|
+
order: ['name'],
|
|
57
|
+
properties: {
|
|
58
|
+
name: {
|
|
59
|
+
type: 'text',
|
|
60
|
+
placeholder: '请输入name,当name1有值时,该表单隐藏',
|
|
61
|
+
description: { type: 'icon', title: 'hover触发提示', trigger: 'hover' },
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
typePath: {
|
|
66
|
+
name: {
|
|
67
|
+
fatherKey: '',
|
|
68
|
+
type: 'string',
|
|
69
|
+
title: '名字',
|
|
70
|
+
unitedSchemaKey: 'schema.0',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
customProps: [],
|
|
74
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export const unitedSchema = {
|
|
2
|
+
validateTime: 'submit',
|
|
3
|
+
requiredMode: 'default',
|
|
4
|
+
type: 'object',
|
|
5
|
+
theme: 'antd',
|
|
6
|
+
ui: {
|
|
7
|
+
mode: 'edit',
|
|
8
|
+
},
|
|
9
|
+
schema: [
|
|
10
|
+
{
|
|
11
|
+
title: '名字',
|
|
12
|
+
type: 'string',
|
|
13
|
+
minLength: 1,
|
|
14
|
+
errMsg: {
|
|
15
|
+
_: '1',
|
|
16
|
+
},
|
|
17
|
+
ui: {
|
|
18
|
+
type: 'text',
|
|
19
|
+
placeholder: '请输入name,当name1有值时,该表单隐藏',
|
|
20
|
+
description: {
|
|
21
|
+
type: 'icon',
|
|
22
|
+
title: 'hover触发提示',
|
|
23
|
+
trigger: 'hover',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
requiredMsg: true,
|
|
27
|
+
fieldKey: 'name',
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const parsedSchema = {
|
|
33
|
+
dataSchema: {
|
|
34
|
+
errorMessage: {
|
|
35
|
+
required: {
|
|
36
|
+
name: true,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
properties: {
|
|
40
|
+
name: {
|
|
41
|
+
errorMessage: {
|
|
42
|
+
_: '1',
|
|
43
|
+
},
|
|
44
|
+
minLength: 1,
|
|
45
|
+
title: '名字',
|
|
46
|
+
type: 'string',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
required: ['name'],
|
|
50
|
+
type: 'object',
|
|
51
|
+
validateTime: 'submit',
|
|
52
|
+
requiredMode: 'default',
|
|
53
|
+
},
|
|
54
|
+
typePath: {
|
|
55
|
+
name: {
|
|
56
|
+
fatherKey: '',
|
|
57
|
+
title: '名字',
|
|
58
|
+
type: 'string',
|
|
59
|
+
unitedSchemaKey: 'schema.0',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
uiSchema: {
|
|
63
|
+
mode: 'edit',
|
|
64
|
+
order: ['name'],
|
|
65
|
+
properties: {
|
|
66
|
+
name: {
|
|
67
|
+
description: {
|
|
68
|
+
title: 'hover触发提示',
|
|
69
|
+
trigger: 'hover',
|
|
70
|
+
type: 'icon',
|
|
71
|
+
},
|
|
72
|
+
placeholder: '请输入name,当name1有值时,该表单隐藏',
|
|
73
|
+
type: 'text',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
theme: 'antd',
|
|
77
|
+
},
|
|
78
|
+
customProps: [],
|
|
79
|
+
}
|