perf: standard code format in the views folder

This commit is contained in:
xiaoxian521
2022-05-14 10:53:06 +08:00
parent 1cf82eb7a4
commit 64326c4fb5
31 changed files with 228 additions and 166 deletions

View File

@@ -27,12 +27,12 @@ const throttleClick = useThrottleFn(handle, 1000, false);
所谓防抖就是指触发事件后在 n 秒内函数只能执行一次如果在 n
秒内又触发了事件则会重新计算函数执行时间
</div>
<el-button @click="immediateDebounce"
>连续点击我只会执行最后一次点击事件立即执行</el-button
>
<el-button @click="debounceClick"
>连续点击我只会执行最后一次点击事件延后执行</el-button
>
<el-button @click="immediateDebounce">
连续点击我只会执行最后一次点击事件立即执行
</el-button>
<el-button @click="debounceClick">
连续点击我只会执行最后一次点击事件延后执行
</el-button>
</el-card>
<el-card>
<template #header>
@@ -42,9 +42,9 @@ const throttleClick = useThrottleFn(handle, 1000, false);
所谓节流就是指连续触发事件但是在 n
秒中只执行一次函数节流会稀释函数的执行频率
</div>
<el-button @click="throttleClick"
>连续点击我每一秒只会执行一次点击事件</el-button
>
<el-button @click="throttleClick">
连续点击我每一秒只会执行一次点击事件
</el-button>
</el-card>
</div>
</template>