Commit 09c909b0 authored by pengyunqian's avatar pengyunqian

update:更新防抖

parent 5f616444
......@@ -296,8 +296,19 @@ import {
updateMarketingList,
} from "@/service/Goods/goods";
import { ElMessage } from "element-plus";
import debounce from "lodash/debounce";
// import { mapState } from 'vuex';
// 开启关闭防抖
function debounce(callback, delay) {
let timer = null;
return function (...args) {
if (timer) {
clearTimeout(timer);
}
timer = setTimeout(() => {
timer = null;
return callback.call(this, ...args);
}, delay);
};
}
export default {
name: "GoodsRetail",
data() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment