feat: add maxLevel and changeOnSelect props for the china region field

This commit is contained in:
chenos 2021-08-16 15:07:02 +08:00
parent 852d3d6f7a
commit 3d023fb3e4

View File

@ -34,8 +34,26 @@ export const chinaRegion: FieldOptions = {
},
properties: {
...defaultProps,
'uiSchema.x-component-props.maxLevel': {
type: 'number',
'x-component': 'Radio.Group',
'x-decorator': 'FormItem',
title: '层级',
default: 3,
enum: [
{ value: 1, label: '省' },
{ value: 2, label: '市' },
{ value: 3, label: '区/县' },
{ value: 4, label: '乡镇/街道' },
{ value: 5, label: '村/居委会' },
],
},
'uiSchema.x-component-props.changeOnSelect': {
type: 'boolean',
'x-component': 'Checkbox',
'x-content': '无需选到最后一级',
'x-decorator': 'FormItem',
},
},
operations: [
{ label: '等于', value: 'code.in' },
],
operations: [{ label: '等于', value: 'code.in' }],
};