ak-render
v2.2.7
Published
基于 form-render,额外提供了一些自定义组件,比如
Downloads
34
Keywords
Readme
ak-render
基于 form-render,额外提供了一些自定义组件,比如
- image-upload
- video-upload
用法
import AkRender, { useForm } from 'ak-render'
const schema = {
type: 'object',
properties: {
string: {
title: '网址输入自定义组件',
type: 'string',
},
img: {
title: '图片上传',
type: 'string',
widget: 'ImageUpload'
},
video: {
title: '视频上传',
type: 'string',
widget: 'VideoUpload'
}
},
};
export default () => {
const form = useForm();
return (
<div>
<AkRender
form={form}
widgets={{ site: SiteInput }}
schema={schema}
/>
</div>
}
和 form-render api 一致