@@ -406,10 +406,13 @@ const handleSubmit = async (onSubmit) => {
}
};
const byform = ref(null); // 延迟使用,因为还没有返回跟挂载
+const resetFields = () => {
+ nextTick(() => {
+ proxy.$refs.byForm.resetFields();
+ });
+};
onMounted(() => {});
-defineExpose({
- handleSubmit,
-});
+defineExpose({ handleSubmit, resetFields });
formDataInit();
loadInit();
</script>
@@ -145,10 +145,9 @@ const submitForm = () => {
const clickCancel = () => {
formData.data = {
- orderId: "",
- exceedReceiveReason: "",
productionCostList: [],
+ submit.value.resetFields();