@whalecloud/page-builder
2.1.7-beta39 • Public • Published "@whalecloud/page-builder"
表单编辑器以 npm 包的形式发布,输出表单编辑器与表单渲染器两个组件
import { FormBuilder, FormRender } from '@whalecloud/page-builder';
model 注册
import { models } from '@whalecloud/page-builder';
models.forEach(model => {
window.g_app.model(model);
});
表单编辑器
<FormBuilder save={savePage} loadJson={{loadPage:pageJson}}>
/**
表单编辑器界面点击保存按钮的时候的回调
@param pageJson 进行序列化反序列化
@param pageElementListJson 表单元素列表
**/
savePage = (pageJson, pageElementListJson) => {
}
//补充业务侧需要注册一下model
表单渲染器
<FormRender ref="xxx" load={{ loadPage: pageJson, initialData: initialJson }} save="savePage" />
Readme
Keywords
nonePackage Sidebar
Install
npm i @whalecloud/page-builder
Weekly Downloads