useDebounce
防抖
基础用法
<template>
<g-button type="primary" @click="handleClick">点击</g-button>
</template>
<script setup lang="tsx">
import { GButton, useDebounce } from "gao-components-plus";
import { ElMessage } from "element-plus";
const handleClick = useDebounce<any>(() => {
ElMessage.success('点击')
}, 200)
</script>参数
| 名称 | 描述 | 类型 | 默认值 |
|---|---|---|---|
| callback | 回调函数 | Function | - |
| dalay | 延迟时间 | number | - |
