Showing
1 changed file
with
3 additions
and
1 deletions
@@ -107,7 +107,9 @@ | @@ -107,7 +107,9 @@ | ||
107 | const handleSwitch = async (e: any, record: any) => { | 107 | const handleSwitch = async (e: any, record: any) => { |
108 | switchLoading.value = true; | 108 | switchLoading.value = true; |
109 | await deviceProfileCategory({ ...record, status: e }); | 109 | await deviceProfileCategory({ ...record, status: e }); |
110 | - switchLoading.value = false; | 110 | + setTimeout(() => { |
111 | + switchLoading.value = false; | ||
112 | + }, 1500); | ||
111 | createMessage.success( | 113 | createMessage.success( |
112 | `${!e ? t('common.disableText') : t('common.enableText')}${t('common.successText')}` | 114 | `${!e ? t('common.disableText') : t('common.enableText')}${t('common.successText')}` |
113 | ); | 115 | ); |