审核按钮防止快速点击

dianlixunjian
Zhufu 2024-08-19 12:47:23 +08:00
parent 37db6f8263
commit f1ae28d005
1 changed files with 6 additions and 6 deletions

View File

@ -267,7 +267,8 @@
import { settings } from 'nprogress'; import { settings } from 'nprogress';
const MapboxMap = defineAsyncComponent(() => import('@/components/MapboxMaps/MapComponent.vue')); const MapboxMap = defineAsyncComponent(() => import('@/components/MapboxMaps/MapComponent.vue'));
const spinning = ref(false) const spinning = ref(false)
const quickClick = ref<any>(null) let quickClick: any = null
const goClick = ref(true)
const geomsList = ref(); const geomsList = ref();
const mapConfig = ref({ isShowMap: false }); const mapConfig = ref({ isShowMap: false });
const MapboxComponent = ref(); const MapboxComponent = ref();
@ -683,12 +684,11 @@
designerData.taskBtns = btns; designerData.taskBtns = btns;
} }
async function handleBtnClick(btn) { async function handleBtnClick(btn) {
if(quickClick.value !== null){ if(goClick.value){
clearTimeout(quickClick.value) goClick.value = false
quickClick.value = setTimeout(() => {}, 100) quickClick = setTimeout(() => {goClick.value = true}, 1000)
return
}else{ }else{
quickClick.value = setTimeout(() => {}, 100) return
} }
const instanceInfo = designerData.process.instanceInfo; const instanceInfo = designerData.process.instanceInfo;
// //