Skip to content

Commit

Permalink
fix: 网格、蜂窝图层配置
Browse files Browse the repository at this point in the history
  • Loading branch information
yxh01132861 committed Sep 20, 2023
1 parent b9f06e4 commit 8100853
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ export default (fieldList: FieldSelectOptionType[]) => {
aggregateField: {
type: 'string',
title: '聚合字段',
required: true,
'x-decorator': 'FormItem',
'x-component': 'FieldSelect',
'x-component-props': {
Expand All @@ -110,11 +109,11 @@ export default (fieldList: FieldSelectOptionType[]) => {
aggregateMethod: {
type: 'string',
title: '聚合方法',
required: true,
default: 'sum',
'x-decorator': 'FormItem',
'x-component': 'Select',
'x-component-props': {
allowClear: true,
placeholder: '请选择字段',
},
enum: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ export default (fieldList: FieldSelectOptionType[]) => {
aggregateField: {
type: 'string',
title: '聚合字段',
required: true,
'x-decorator': 'FormItem',
'x-component': 'FieldSelect',
'x-component-props': {
Expand All @@ -114,11 +113,11 @@ export default (fieldList: FieldSelectOptionType[]) => {
aggregateMethod: {
type: 'string',
title: '聚合方法',
required: true,
default: 'sum',
'x-decorator': 'FormItem',
'x-component': 'Select',
'x-component-props': {
allowClear: true,
placeholder: '请选择字段',
},
enum: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ export default (options: AttributeSchemaOptions) => {
placeholder: '请选择字段',
},
enum: [{ value: 'count', label: 'count' }],
'x-reactions': [
{
dependencies: ['aggregateMethod'],
fulfill: {
run:
"$form.setFieldState('fillColorField',state=>{ state.dataSource = $form.getFieldState( 'aggregateMethod' ,state => { return [{value:'count',label:'count'},{label:state.value,value:state.value}] } ) })",
},
},
],
},

fillColorScale: {
Expand Down

0 comments on commit 8100853

Please sign in to comment.