@aligov/gov-form-render

gov form render

Usage no npm install needed!

<script type="module">
  import aligovGovFormRender from 'https://cdn.skypack.dev/@aligov/gov-form-render';
</script>

README

form render

form-render

gov form render

API

参数名 说明 必填 类型 默认值
url iframe 地址 string 'http://pre-recept.zjzwfw.gov.cn/form'
config iframe 地址参数 object
detail 是否为详情页面 boolean
height 组件初始高度 string
width 组件宽度 string '500px'
initCallback 组件加载回调 func

initCallback 返回接口函数

getFormData

入参 | 参数名 | 说明 | 必填 | 类型 | 默认值 | | ------ | ---- | ---- | ---- | ------ | | disableValid | 是否触发校验 | 否 | boolean | true | | scroll | 校验报错后是否滚动到对应字段 | 否 | boolean | true |

出参 | 参数名 | 说明 | 类型 | 举例 | | ------ | ---- | ---- | ---- | | success | 校验结果 | boolean | | | errorMsg | 错误信息 | array | | | content | 表单内容 | object | |