# 渲染器示例

# 注册表单

// schema数据请查看完整示例
const epage = new Render({el, widgets, schema, component })

epage
  // 提交按钮
  .on('kzZdhfHic', 'click', function() {
    const formData = epage.store.getFormData()

    epage.validateFields()
      .then(function (result) {
        alert('success! do something')
      }, function (err) {
        alert('error! do something')
      })
  })
  // 重置按钮
  .on('k4g7YHiGd', 'click', function() {
    epage.resetFields()
    console.log(4)
  })
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

# 查询表单

// schema 请查看完整示例
const epage = new Render({el, widgets, schema, component })

epage
  // 查询按钮
  .on('kucsKm4eq', 'click', function() {
    const formData = epage.store.getFormData()
    console.log('formData: ', formData)
    alert(JSON.stringify(formData, null, 2))
  })
  // 重置按钮
  .on('kV9gSdbtG', 'click', function() {
    epage.resetFields()
  })
1
2
3
4
5
6
7
8
9
10
11
12
13
14
更新: 4/6/2021, 11:10:45 PM