import { reactive, ref, UnwrapRef } from "vue";
import { FormState } from "./interface";

export function handleForm() {
    const formRef = ref();
    const formState: UnwrapRef<FormState> = reactive({
        days: null,
        remark: ''
    })
    const rules = {
        days: [{ required: true, message: '请输入延期天数', trigger: 'blur', type: 'number', min: 1, }],
    }
    return { rules, formState, formRef }
}