-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(utils): parseUnitedSchema supports transparent DataSchema keywords
- Loading branch information
1 parent
a5290f8
commit 8f00445
Showing
16 changed files
with
1,693 additions
and
305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,4 +91,5 @@ export const parsedSchema = { | |
unitedSchemaKey: 'schema.0.items', | ||
}, | ||
}, | ||
customProps: [], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,4 +132,5 @@ export const parsedSchema = { | |
unitedSchemaKey: 'schema.0', | ||
}, | ||
}, | ||
customProps: [], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,4 +69,5 @@ export const parsedSchema = { | |
unitedSchemaKey: 'schema.0', | ||
}, | ||
}, | ||
customProps: [], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,4 +74,5 @@ export const parsedSchema = { | |
}, | ||
theme: 'antd', | ||
}, | ||
customProps: [], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
export const unitedSchema = { | ||
theme: 'antd', | ||
validateTime: 'submit', | ||
requiredMode: 'default', | ||
type: 'object', | ||
footer: {}, | ||
formMode: 'edit', | ||
containerStyle: {}, | ||
'ui:a1': 1, | ||
ui: { | ||
mode: 'edit', | ||
a1: 2, | ||
b: 2, | ||
'$:type': 'drip', | ||
}, | ||
'ui:a': 1, | ||
'ui:b': 1, | ||
schema: [ | ||
{ | ||
fieldKey: 'name', | ||
title: '名字', | ||
type: 'string', | ||
requiredMsg: '该项必填', | ||
ui: { | ||
type: 'text', | ||
placeholder: '请输入name,当name1有值时,该表单隐藏', | ||
description: { | ||
type: 'icon', | ||
title: 'hover触发提示', | ||
trigger: 'hover', | ||
}, | ||
}, | ||
}, | ||
{ | ||
title: '下拉输入', | ||
type: 'object', | ||
fieldKey: 'babelRadio', | ||
ui: { | ||
type: 'selectText', | ||
placeholder: '请选择', | ||
allowClear: true, | ||
multiple: true, | ||
requestCache: true, | ||
options: [ | ||
{ | ||
label: '北京', | ||
value: '0', | ||
}, | ||
{ | ||
label: '上海', | ||
value: '1', | ||
}, | ||
{ | ||
label: '成都', | ||
value: '2', | ||
}, | ||
{ | ||
label: '武汉', | ||
value: '3', | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
} | ||
|
||
export const parsedSchema = { | ||
dataSchema: { | ||
validateTime: 'submit', | ||
requiredMode: 'default', | ||
type: 'object', | ||
properties: { | ||
name: { | ||
title: '名字', | ||
type: 'string', | ||
}, | ||
babelRadio: { | ||
title: '下拉输入', | ||
type: 'object', | ||
}, | ||
}, | ||
required: ['name'], | ||
errorMessage: { | ||
required: { | ||
name: '该项必填', | ||
}, | ||
}, | ||
}, | ||
uiSchema: { | ||
theme: 'antd', | ||
footer: {}, | ||
formMode: 'edit', | ||
containerStyle: {}, | ||
mode: 'edit', | ||
a: 1, | ||
a1: 2, | ||
b: 2, | ||
order: ['name', 'babelRadio'], | ||
'$:type': 'drip', | ||
properties: { | ||
name: { | ||
type: 'text', | ||
placeholder: '请输入name,当name1有值时,该表单隐藏', | ||
description: { | ||
type: 'icon', | ||
title: 'hover触发提示', | ||
trigger: 'hover', | ||
}, | ||
}, | ||
babelRadio: { | ||
type: 'selectText', | ||
placeholder: '请选择', | ||
allowClear: true, | ||
multiple: true, | ||
requestCache: true, | ||
options: [ | ||
{ | ||
label: '北京', | ||
value: '0', | ||
}, | ||
{ | ||
label: '上海', | ||
value: '1', | ||
}, | ||
{ | ||
label: '成都', | ||
value: '2', | ||
}, | ||
{ | ||
label: '武汉', | ||
value: '3', | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
typePath: { | ||
babelRadio: { | ||
fatherKey: '', | ||
type: 'object', | ||
unitedSchemaKey: 'schema.1', | ||
}, | ||
name: { | ||
fatherKey: '', | ||
type: 'string', | ||
unitedSchemaKey: 'schema.0', | ||
}, | ||
}, | ||
customProps: [], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -246,4 +246,5 @@ export const parsedSchema = { | |
unitedSchemaKey: 'schema.1.items.schema.0.items', | ||
}, | ||
}, | ||
customProps: [], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.