tanxue hai 6 días
pai
achega
704aac7c6c
Modificáronse 1 ficheiros con 5 adicións e 4 borrados
  1. 5 4
      components/ezyActive/ezyActive.vue

+ 5 - 4
components/ezyActive/ezyActive.vue

@@ -1,4 +1,5 @@
 <template>
+	<!-- 按钮点击动画 暂时去掉了时间 -->
 	<view @click="handleClick">
 		<slot />
 	</view>
@@ -11,16 +12,16 @@
 const props = defineProps({
 	delay: {
 		type: Number,
-		default: 300
+		default: 0
 	}
 })
 
 const emits = defineEmits(['aclick'])
 
 function handleClick() {
-			emits('aclick')
-	/* setTimeout(() => {
-	}, props.delay); // 使用props.delay作为延迟时间 */
+	setTimeout(() => {
+		emits('aclick')
+	}, props.delay); // 使用props.delay作为延迟时间
 }
 </script>