diff --git a/packages/li-p2/src/LayerAttribute/common-schema/grid-hexbin-color-collapse.ts b/packages/li-p2/src/LayerAttribute/common-schema/grid-hexbin-color-collapse.ts index 2c9dbf7b..18d41823 100644 --- a/packages/li-p2/src/LayerAttribute/common-schema/grid-hexbin-color-collapse.ts +++ b/packages/li-p2/src/LayerAttribute/common-schema/grid-hexbin-color-collapse.ts @@ -37,7 +37,7 @@ export default (options: AttributeSchemaOptions) => { 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}] } ) })", + "$form.setFieldState('fillColorField',state=>{ state.dataSource = $form.getFieldState( 'aggregateMethod' ,state => { return [{value:'count',label:'count'},{label:state.value,value:state.value}] } ),state.value = state.value === 'count' ? 'count' : undefined })", }, }, ],