From b935e7243068c25ae24413986979affe41e45a5b Mon Sep 17 00:00:00 2001 From: hongxilin <17663930442@163.com> Date: Thu, 2 Jan 2025 13:21:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B1=87=E7=8E=87=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E5=A4=9A=E6=AC=A1=E7=82=B9=E5=87=BB=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue/gold-system/src/views/managerecharge/rate.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vue/gold-system/src/views/managerecharge/rate.vue b/vue/gold-system/src/views/managerecharge/rate.vue index b774fc1..fcbdd10 100644 --- a/vue/gold-system/src/views/managerecharge/rate.vue +++ b/vue/gold-system/src/views/managerecharge/rate.vue @@ -5,6 +5,7 @@ import axios from "axios"; import { createApp } from "vue"; import moment from "moment"; import API from "../../api/index.js"; +import _ from "lodash"; // 查询用户接口 const adminData = ref({ @@ -159,7 +160,8 @@ const add = () => { } }); }; - +// 使用 _.throttle 并设置 trailing 为 false 实现严格节流,只执行一次 +const throttledAdd = _.throttle(add, 5000, { trailing: false }); // 编辑方法 const rateEdit = ref({}); //查询已有的数据 @@ -663,7 +665,7 @@ function handleInput(value) {