/* eslint no-console:0 */ import BaseMixin from '../../_util/BaseMixin'; import createDOMForm from '../src/createDOMForm'; import { Modal } from 'ant-design-vue'; import { regionStyle, errorStyle } from './styles'; const Form = { mixins: [BaseMixin], props: { form: Object, }, data() { return { visible: false }; }, methods: { onSubmit(e) { e.preventDefault(); this.form.validateFieldsAndScroll((error, values) => { if (!error) { console.log('ok', values); } else { console.log('error', error, values); } }); }, onCancel() { this.setState({ visible: false }); }, open() { this.setState({ visible: true }); }, }, render() { const { getFieldProps, getFieldError } = this.form; return (

modal

{getFieldError('required') ? ( getFieldError('required').join(',') ) : ( 1 )}
); }, }; export default createDOMForm()(Form);