|
|
@@ -5,7 +5,7 @@ import { getRules } from '@/services/bus/rules';
|
|
|
import { Goods } from "@/services/go/ermcp/goodsInfo/interface";
|
|
|
import { WrHoldLB } from "@/services/go/wrtrade/interface";
|
|
|
import { RuleObject } from 'ant-design-vue/lib/form/interface';
|
|
|
-import { reactive, ref, UnwrapRef } from "vue";
|
|
|
+import { onBeforeUnmount, reactive, ref, UnwrapRef } from "vue";
|
|
|
import { ListingForm } from "./interface";
|
|
|
|
|
|
const formState: UnwrapRef<ListingForm> = reactive({
|
|
|
@@ -47,6 +47,9 @@ export function handleForm(data: WrHoldLB) {
|
|
|
PriceMove: [{ required: true, message: '请输入升贴水', trigger: 'blur', type: 'number', }],
|
|
|
goodsid: [{ required: true, validator: v_group, }],
|
|
|
}
|
|
|
+ onBeforeUnmount(() => {
|
|
|
+ formRef.value.resetFields();
|
|
|
+ });
|
|
|
return { rules, formState, formRef }
|
|
|
}
|
|
|
|