mirror of
https://github.com/zhigang1992/form-render.git
synced 2026-06-18 04:08:12 +08:00
42 lines
809 B
JavaScript
42 lines
809 B
JavaScript
/**
|
|
* Created by Tw93 on 2018-08-28.
|
|
* fusion 主题入口文件
|
|
*/
|
|
|
|
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import FormRender from './index';
|
|
import { mapping, widgets } from './widgets/fusion';
|
|
|
|
export default class FusionForm extends React.PureComponent {
|
|
static propTypes = {
|
|
mapping: PropTypes.object,
|
|
widgets: PropTypes.object,
|
|
};
|
|
static defaultProps = {
|
|
mapping: {},
|
|
widgets: {},
|
|
};
|
|
|
|
render() {
|
|
const {
|
|
mapping: customizedMapping,
|
|
widgets: customizedWidgets,
|
|
...props
|
|
} = this.props;
|
|
return (
|
|
<FormRender
|
|
{...props}
|
|
mapping={{
|
|
...mapping,
|
|
...customizedMapping,
|
|
}}
|
|
widgets={{
|
|
...widgets,
|
|
...customizedWidgets,
|
|
}}
|
|
/>
|
|
);
|
|
}
|
|
}
|