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

export function handleForm() {
    const formRef = ref();
    const formState: UnwrapRef<FormState> = reactive({
        num: 0,
    })
    const rules = {
        num: [{ required: true, message: '请输入回购数量', trigger: 'blur', type: 'number', min: 1, }],
    }
    return { rules, formState, formRef }
}