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) {