fix: 优化部分setTime 0 的写法

This commit is contained in:
ZhuRui
2026-08-06 11:56:37 +08:00
parent 15a6d81851
commit 130a253b83
12 changed files with 24 additions and 24 deletions
@@ -1,4 +1,4 @@
import { defineComponent, ref, reactive, computed } from 'vue';
import { defineComponent, ref, reactive, computed, nextTick } from 'vue';
import { useEffect, useState } from '@/hooks';
import {
Modal,
@@ -305,7 +305,7 @@ export default defineComponent({
initFormFromRecord(props.record);
setCropperVisible(false);
setUploadImageUrl('');
setTimeout(() => formRef.value?.clearValidate(), 0);
nextTick().then(() => formRef.value?.clearValidate());
}
}, [() => props.visible]);
@@ -1,4 +1,4 @@
import { computed, reactive, toRef, Ref } from 'vue';
import { computed, reactive, toRef, Ref, nextTick } from 'vue';
import { Modal, message } from 'ant-design-vue';
import { useState, useDebounce } from '@/hooks';
import { useRequest } from '@/hooks/useRequest';
@@ -109,7 +109,7 @@ export function useEventListModel() {
if (pageSize !== (pagination as any).pageSize.value) {
pagination.setPageSize(pageSize);
}
setTimeout(fetchList, 0);
nextTick().then(() => fetchList());
};
const openDetailModal = (record: any) => {
@@ -1,4 +1,4 @@
import { computed, reactive, toRef, Ref, h } from 'vue';
import { computed, reactive, toRef, Ref, h, nextTick } from 'vue';
import { StatusTag, type StatusTagTone } from '@/components';
import { useDebounce } from '@/hooks';
import { useRequest } from '@/hooks/useRequest';
@@ -212,7 +212,7 @@ export function useOrderModel() {
if (pageSize !== (pagination as any).pageSize.value) {
pagination.setPageSize(pageSize);
}
setTimeout(fetchList, 0);
nextTick().then(() => fetchList());
};
return {