mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 04:39:34 +00:00
feat: chart config compile
This commit is contained in:
parent
467036229b
commit
a44b9e256c
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { FieldOption } from '../hooks';
|
||||
import { QueryProps } from '../renderer';
|
||||
import { parseField } from '../utils';
|
||||
import { ISchema } from '@formily/react';
|
||||
import { ISchema, Schema } from '@formily/react';
|
||||
import configs, { AnySchemaProperties, Config } from './configs';
|
||||
import { Transformer } from '../block/transformers';
|
||||
|
||||
@ -169,9 +169,10 @@ export class Chart implements ChartType {
|
||||
}
|
||||
|
||||
render({ data, general, advanced, fieldProps }: RenderProps) {
|
||||
const config = this.getProps({ data, general, advanced, fieldProps });
|
||||
return () =>
|
||||
React.createElement(this.component, {
|
||||
...this.getProps({ data, general, advanced, fieldProps }),
|
||||
...Schema.compile(config),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user