优化
This commit is contained in:
parent
afdece6b4d
commit
440a157027
@ -9,7 +9,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref,nextTick } from 'vue';
|
||||||
import { basicModal, useModal } from '@/components/Modal';
|
import { basicModal, useModal } from '@/components/Modal';
|
||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
import { BasicForm, FormSchema, useForm } from '@/components/Form/index';
|
import { BasicForm, FormSchema, useForm } from '@/components/Form/index';
|
||||||
@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
const modalRef: any = ref(null);
|
const modalRef: any = ref(null);
|
||||||
|
|
||||||
const [register, { submit, getFieldsValue }] = useForm({
|
const [register, { submit,resetFields,getFieldsValue }] = useForm({
|
||||||
collapsedRows: 3,
|
collapsedRows: 3,
|
||||||
labelWidth: 80,
|
labelWidth: 80,
|
||||||
layout: 'horizontal',
|
layout: 'horizontal',
|
||||||
@ -80,8 +80,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showModal() {
|
async function showModal() {
|
||||||
openModal();
|
openModal();
|
||||||
|
await nextTick()
|
||||||
|
resetFields()
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleReset(values: Recordable) {
|
function handleReset(values: Recordable) {
|
||||||
|
Loading…
Reference in New Issue
Block a user