![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
函数封装
snowkei
前路昭然,你我共进。
展开
-
vue-页面添加水印
const warterMark = {}; /** * * @param {要设置的水印的内容} str * @param {需要设置水印的容器} container */ const setWatermark = (str, container) => { const id = '1.23452384164.123412415'; if (container === undefined) { return; } // 查看页面上有没有,原创 2021-11-03 18:05:39 · 333 阅读 · 0 评论 -
防抖debounce/debouceFn
debouce:封装防抖函数 let timeout = null export function debounce(fn, wait) { clearTimeout(timeout) let self = this let args = arguments timeout = setTimeout(() => { console.log('1') fn.apply(self, args) }, wait) } 使用 输入<input @inpu原创 2021-10-21 18:52:15 · 220 阅读 · 0 评论