import { reactive, ref, UnwrapRef } from "vue";
/**
 * 表单
 * @returns 
 */
export function handleForm() {
    interface FormState {
        PricedPrice: number | null
        PricedQty: number | null
    }
    const formRef = ref();
    const formState: UnwrapRef<FormState> = reactive({
        PricedPrice: null,
        PricedQty: null,
    })
    const rules = {
        PricedPrice: [{ required: true, message: '请输入点价价格', trigger: 'blur', type: 'number' }],
        PricedQty: [{ required: true, message: '请输入点价数量', trigger: 'blur', type: 'number' }],
    }
    return { rules, formState, formRef }
}