index.vue 966 Bytes
<template>
  <BasicForm :showResetButton="false" :showSubmitButton="false" @register="register" />
</template>
<script lang="ts">
  import { defineComponent, ref } from 'vue';
  import { BasicForm, useForm } from '/@/components/Form/index';
  import { alertContactsSchemas } from './config';

  export default defineComponent({
    components: { BasicForm },
    setup() {
      const getValueData: any = ref({});
      const [register, { getFieldsValue, resetFields }] = useForm({
        schemas: alertContactsSchemas,
        actionColOptions: {
          span: 24,
        },
      });
      function getAllFields(getV) {
        const values = getFieldsValue();
        getValueData.value = values;
        getV = getValueData.value;
        return getV;
      }
      const customResetStep4AndFunc = () => {
        resetFields();
      };
      return {
        customResetStep4AndFunc,
        getAllFields,
        register,
      };
    },
  });
</script>