mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-03 13:44:47 +08:00
chore: update debounce demo
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { ElMessage } from "element-plus";
|
||||
import { debounce } from "@pureadmin/utils";
|
||||
import { useDebounceFn, useThrottleFn } from "@vueuse/core";
|
||||
import { debounce, throttle } from "@pureadmin/utils";
|
||||
|
||||
defineOptions({
|
||||
name: "Debounce"
|
||||
@@ -16,9 +15,9 @@ const handle = () => {
|
||||
|
||||
const immediateDebounce = debounce(handle, 1000, true);
|
||||
|
||||
const debounceClick = useDebounceFn(handle, 1000);
|
||||
const debounceClick = debounce(handle, 1000);
|
||||
|
||||
const throttleClick = useThrottleFn(handle, 1000, false);
|
||||
const throttleClick = throttle(handle);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -52,5 +51,3 @@ const throttleClick = useThrottleFn(handle, 1000, false);
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user