This commit is contained in:
陈红丽 2024-12-17 14:25:03 +08:00
parent afdece6b4d
commit 440a157027

View File

@ -9,7 +9,7 @@
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { ref,nextTick } from 'vue';
import { basicModal, useModal } from '@/components/Modal';
import { ElMessage } from 'element-plus';
import { BasicForm, FormSchema, useForm } from '@/components/Form/index';
@ -50,7 +50,7 @@
const modalRef: any = ref(null);
const [register, { submit, getFieldsValue }] = useForm({
const [register, { submit,resetFields,getFieldsValue }] = useForm({
collapsedRows: 3,
labelWidth: 80,
layout: 'horizontal',
@ -80,8 +80,10 @@
}
}
function showModal() {
async function showModal() {
openModal();
await nextTick()
resetFields()
}
function handleReset(values: Recordable) {