如何优雅的手动设置formily/vue 表单的赋值和提交事件

如何优雅的手动设置formily/vue 表单的赋值和提交事件

https://vue.formilyjs.org/api...

<template>

<FormProvider :form="form">

<SchemaField

:schema="{

type: 'object',

properties: {

input: {

type: 'string',

'x-component': 'Input',

},

},

}"

>

</SchemaField>

</FormProvider>

</template>

<script>

import { Input } from 'ant-design-vue'

import { createForm } from '@formily/core'

import { FormProvider, createSchemaField } from '@formily/vue'

import 'ant-design-vue/dist/antd.css'

const { SchemaField } = createSchemaField({

components: {

Input,

},

})

export default {

components: { FormProvider, SchemaField },

data() {

return {

form: createForm(),

}

},

}

</script>

如何优雅的手动获取由schema渲染的表单的值呢,以及重新赋值呢

以上是 如何优雅的手动设置formily/vue 表单的赋值和提交事件 的全部内容, 来源链接: utcz.com/p/937510.html

回到顶部