fix: 优化部分setTime 0 的写法
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { defineComponent, ref, reactive } from 'vue';
|
import { defineComponent, ref, reactive, nextTick } from 'vue';
|
||||||
import { useEffect } from '@/hooks';
|
import { useEffect } from '@/hooks';
|
||||||
import { Modal, Form, Input, Button, message } from 'ant-design-vue';
|
import { Modal, Form, Input, Button, message } from 'ant-design-vue';
|
||||||
import { TIPS_TEXT, newPasswordRules, confirmNewPasswordRules } from './controller';
|
import { TIPS_TEXT, newPasswordRules, confirmNewPasswordRules } from './controller';
|
||||||
@@ -34,7 +34,7 @@ export default defineComponent({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (props.visible) {
|
if (props.visible) {
|
||||||
Object.assign(formData, getDefaultForm());
|
Object.assign(formData, getDefaultForm());
|
||||||
setTimeout(() => formRef.value?.clearValidate(), 0);
|
nextTick().then(() => formRef.value?.clearValidate());
|
||||||
}
|
}
|
||||||
}, [() => props.visible]);
|
}, [() => props.visible]);
|
||||||
|
|
||||||
|
|||||||
@@ -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 { useEffect, useState } from '@/hooks';
|
||||||
import {
|
import {
|
||||||
Modal,
|
Modal,
|
||||||
@@ -305,7 +305,7 @@ export default defineComponent({
|
|||||||
initFormFromRecord(props.record);
|
initFormFromRecord(props.record);
|
||||||
setCropperVisible(false);
|
setCropperVisible(false);
|
||||||
setUploadImageUrl('');
|
setUploadImageUrl('');
|
||||||
setTimeout(() => formRef.value?.clearValidate(), 0);
|
nextTick().then(() => formRef.value?.clearValidate());
|
||||||
}
|
}
|
||||||
}, [() => props.visible]);
|
}, [() => 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 { Modal, message } from 'ant-design-vue';
|
||||||
import { useState, useDebounce } from '@/hooks';
|
import { useState, useDebounce } from '@/hooks';
|
||||||
import { useRequest } from '@/hooks/useRequest';
|
import { useRequest } from '@/hooks/useRequest';
|
||||||
@@ -109,7 +109,7 @@ export function useEventListModel() {
|
|||||||
if (pageSize !== (pagination as any).pageSize.value) {
|
if (pageSize !== (pagination as any).pageSize.value) {
|
||||||
pagination.setPageSize(pageSize);
|
pagination.setPageSize(pageSize);
|
||||||
}
|
}
|
||||||
setTimeout(fetchList, 0);
|
nextTick().then(() => fetchList());
|
||||||
};
|
};
|
||||||
|
|
||||||
const openDetailModal = (record: any) => {
|
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 { StatusTag, type StatusTagTone } from '@/components';
|
||||||
import { useDebounce } from '@/hooks';
|
import { useDebounce } from '@/hooks';
|
||||||
import { useRequest } from '@/hooks/useRequest';
|
import { useRequest } from '@/hooks/useRequest';
|
||||||
@@ -212,7 +212,7 @@ export function useOrderModel() {
|
|||||||
if (pageSize !== (pagination as any).pageSize.value) {
|
if (pageSize !== (pagination as any).pageSize.value) {
|
||||||
pagination.setPageSize(pageSize);
|
pagination.setPageSize(pageSize);
|
||||||
}
|
}
|
||||||
setTimeout(fetchList, 0);
|
nextTick().then(() => fetchList());
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { computed, reactive, toRef, Ref } from 'vue';
|
import { computed, reactive, toRef, Ref, nextTick } from 'vue';
|
||||||
import {
|
import {
|
||||||
useDebounce,
|
useDebounce,
|
||||||
useThrottleFn,
|
useThrottleFn,
|
||||||
@@ -142,7 +142,7 @@ export function usePaymentsModel() {
|
|||||||
if (pageSize !== (pagination as any).pageSize.value) {
|
if (pageSize !== (pagination as any).pageSize.value) {
|
||||||
pagination.setPageSize(pageSize);
|
pagination.setPageSize(pageSize);
|
||||||
}
|
}
|
||||||
setTimeout(fetchList, 0);
|
nextTick().then(() => fetchList());
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { computed, reactive, toRef, Ref } from 'vue';
|
import { computed, reactive, toRef, Ref, nextTick } from 'vue';
|
||||||
import {
|
import {
|
||||||
useState,
|
useState,
|
||||||
useDebounce,
|
useDebounce,
|
||||||
@@ -175,7 +175,7 @@ export function useWalletModel() {
|
|||||||
if (pageSize !== (pagination as any).pageSize.value) {
|
if (pageSize !== (pagination as any).pageSize.value) {
|
||||||
pagination.setPageSize(pageSize);
|
pagination.setPageSize(pageSize);
|
||||||
}
|
}
|
||||||
setTimeout(fetchList, 0);
|
nextTick().then(() => fetchList());
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleViewDetail = (record: any) => {
|
const handleViewDetail = (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 { StatusTag, type StatusTagTone } from '@/components';
|
||||||
import {
|
import {
|
||||||
useState,
|
useState,
|
||||||
@@ -197,7 +197,7 @@ export function useWithdrawModel() {
|
|||||||
if (pageSize !== (pagination as any).pageSize.value) {
|
if (pageSize !== (pagination as any).pageSize.value) {
|
||||||
pagination.setPageSize(pageSize);
|
pagination.setPageSize(pageSize);
|
||||||
}
|
}
|
||||||
setTimeout(fetchList, 0);
|
nextTick().then(() => fetchList());
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 打开审核弹窗 */
|
/** 打开审核弹窗 */
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { computed, reactive, toRef, Ref } from 'vue';
|
import { computed, reactive, toRef, Ref, nextTick } from 'vue';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { useDebounce, useThrottleFn } from '@/hooks';
|
import { useDebounce, useThrottleFn } from '@/hooks';
|
||||||
import { useRequest } from '@/hooks/useRequest';
|
import { useRequest } from '@/hooks/useRequest';
|
||||||
@@ -138,7 +138,7 @@ export function useLogModel() {
|
|||||||
if (pageSize !== (pagination as any).pageSize.value) {
|
if (pageSize !== (pagination as any).pageSize.value) {
|
||||||
pagination.setPageSize(pageSize);
|
pagination.setPageSize(pageSize);
|
||||||
}
|
}
|
||||||
setTimeout(fetchList, 0);
|
nextTick().then(() => fetchList());
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { defineComponent, ref, reactive } from 'vue';
|
import { defineComponent, ref, reactive, nextTick } from 'vue';
|
||||||
import { useEffect } from '@/hooks';
|
import { useEffect } from '@/hooks';
|
||||||
import { Modal, Form, Input, Tree, Button, Spin, message } from 'ant-design-vue';
|
import { Modal, Form, Input, Tree, Button, Spin, message } from 'ant-design-vue';
|
||||||
import type { TreeProps } from 'ant-design-vue';
|
import type { TreeProps } from 'ant-design-vue';
|
||||||
@@ -82,7 +82,7 @@ export default defineComponent({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (props.visible) {
|
if (props.visible) {
|
||||||
initFormFromRecord(props.record);
|
initFormFromRecord(props.record);
|
||||||
setTimeout(() => formRef.value?.clearValidate(), 0);
|
nextTick().then(() => formRef.value?.clearValidate());
|
||||||
}
|
}
|
||||||
}, [() => props.visible]);
|
}, [() => props.visible]);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { computed, reactive, toRef, Ref } from 'vue';
|
import { computed, reactive, toRef, Ref, nextTick } from 'vue';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import { useState, useDebounce, useThrottleFn } from '@/hooks';
|
import { useState, useDebounce, useThrottleFn } from '@/hooks';
|
||||||
import { useRequest } from '@/hooks/useRequest';
|
import { useRequest } from '@/hooks/useRequest';
|
||||||
@@ -107,7 +107,7 @@ export function useRoleModel() {
|
|||||||
if (pageSize !== (pagination as any).pageSize.value) {
|
if (pageSize !== (pagination as any).pageSize.value) {
|
||||||
pagination.setPageSize(pageSize);
|
pagination.setPageSize(pageSize);
|
||||||
}
|
}
|
||||||
setTimeout(fetchList, 0);
|
nextTick().then(() => fetchList());
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 新增 */
|
/** 新增 */
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { defineComponent, ref, reactive } from 'vue';
|
import { defineComponent, ref, reactive, nextTick } from 'vue';
|
||||||
import { useEffect, useState } from '@/hooks';
|
import { useEffect, useState } from '@/hooks';
|
||||||
import { Modal, Form, Input, Select, Button } from 'ant-design-vue';
|
import { Modal, Form, Input, Select, Button } from 'ant-design-vue';
|
||||||
import { getRoleList, type TournamentAdminRolePageVO } from '../../roles/model/services';
|
import { getRoleList, type TournamentAdminRolePageVO } from '../../roles/model/services';
|
||||||
@@ -166,7 +166,7 @@ export default defineComponent({
|
|||||||
if (props.visible) {
|
if (props.visible) {
|
||||||
initFormFromRecord(props.record);
|
initFormFromRecord(props.record);
|
||||||
setIsResetting(false);
|
setIsResetting(false);
|
||||||
setTimeout(() => formRef.value?.clearValidate(), 0);
|
nextTick().then(() => formRef.value?.clearValidate());
|
||||||
}
|
}
|
||||||
}, [() => props.visible]);
|
}, [() => props.visible]);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { computed, reactive, toRef, Ref, h, ref } from 'vue';
|
import { computed, reactive, toRef, Ref, h, ref, nextTick } from 'vue';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import { StatusTag, type StatusTagTone } from '@/components';
|
import { StatusTag, type StatusTagTone } from '@/components';
|
||||||
import { useDebounce, useThrottleFn } from '@/hooks';
|
import { useDebounce, useThrottleFn } from '@/hooks';
|
||||||
@@ -150,7 +150,7 @@ export function useUserModel() {
|
|||||||
if (pageSize !== (pagination as any).pageSize.value) {
|
if (pageSize !== (pagination as any).pageSize.value) {
|
||||||
pagination.setPageSize(pageSize);
|
pagination.setPageSize(pageSize);
|
||||||
}
|
}
|
||||||
setTimeout(fetchList, 0);
|
nextTick().then(() => fetchList());
|
||||||
};
|
};
|
||||||
|
|
||||||
// ===== 初始化:加载角色选项 =====
|
// ===== 初始化:加载角色选项 =====
|
||||||
|
|||||||
Reference in New Issue
Block a user