3.1 Core <Core />组件经过简单预处理后将schema和表单布局等信息传给<MCore/>,而MCore = React.memo(CoreRender, areEqual),会根据表单值、错误提示和schema等信息是否有变化来决定是否重新渲染<CoreRender />(在form-render@1.8.5中去掉了MCore这一层): constareEqual=(prev,current)=>{if(prev.allTouched!
1: { title: '简单输入框', type: 'string', required: true, }, select1: { title: '单选', type: 'string', props: { options: [ { label: '早', value: 'a' }, { label: '中', value: 'b' }, { label: '晚', value: 'c' } ] } }, }, }; class Demo extends React....
已有帐号?立即登录 master 克隆/下载 git config --global user.name userName git config --global user.email userEmail 分支3 标签20 贡献代码 同步代码 汤威替换原有gif02e5e245年前 315 次提交 提交取消 提示:由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件 ...
在index.js文件中我们可以看到:该文件导出的是一个对FormRender组件的包裹组件,包裹的目的是为了更灵活的传递相关的schema。class FormRender extends React.Component:表明FormRender确实是基于React框架的,这使得采用Vue框架的应用不能很好的使用该库, 大胆猜测ali应该会再开源一份基于Vue框架的FormRender吧,毕竟ant-des...
form-render的简单使用心得(FormRender现已升级到XRende)form-render的简单使⽤⼼得(FormRender现已升级到XRende)偶尔⼀次使⽤了,使⽤⽅便简单,通过简单的Schema就可以⽣成表单,很符合数据驱动这⼀理念,基本需求也都能满⾜。但是作为新兴的react第三⽅包,缺点就是互联⽹上相关资料太少,在...
import React from 'react'; import { Button } from 'antd'; import FormRender, { useForm } from 'form-render'; const schema = { type: 'object', properties: { input1: { title: '简单输入框', type: 'string', required: true,
import Reactfrom'react';import{Button}from'antd';import FormRender,{useForm}from'form-render';const schema={type:'object',properties:{input1:{title:'简单输入框',type:'string',required:true,},select1:{title:'单选',type:'string',enum:['a','b','c'],enumNames:['早','中','晚'],}...
Hi, I've been trying to get FormRender to work in my React Application. Sorry if there is already documentation for this - I've looked through and couldn't find anything. I understand for non-react apps the following guide works, providi...
安利一个markDown编辑器 tnpm install-Sfor-editorimportReactfrom'react'importEditorfrom'for-editor'functionMyContent({value,onChange,name}){// value: 初始值,onChange formrender的函数,name 自定义组件的key值,数据里对应的字段return(<React.Fragment><Editorstyle={{width:'100%',maxWidth:'1024px'}}val...
form-render的简单使⽤⼼得(FormRender现已升级到XRende)偶尔⼀次使⽤了,使⽤⽅便简单,通过简单的Schema就可以⽣成表单,很符合数据驱动这⼀理念,基本需求也都能满⾜。但是作为新兴的react第三⽅包,缺点就是互联⽹上相关资料太少,在使⽤过程中想要熟悉⼀些API的使⽤,相关实例也较少。具体...