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


/**
 * 表单
 */
export function handleForm() {
    const formRef = ref();
    const formState: UnwrapRef<FormState> = reactive({
        expresscompany: '',// string 物流公司
        expressnum: '',// string 物流单号
    })
    const rules = {
        expresscompany: [{ required: true, message: '请输入物流公司', trigger: 'blur' }],
        expressnum: [{ required: true, message: '请输入物流单号', trigger: 'blur' }],
    }
    return { formRef, formState, rules }
}