fus

Results 7 comments of fus

> @startewho 应该是 `-webkit-app: drag` 属性在windows下被忽略 如何解决这个问题呢?

> 我之前也遇到过类似情况,你应该是没加载git子模块 ```sh git submodule init git submodule update --remote --merge $ npm install ```

# 防抖 使函数在规定的时间范围内只调用一次,如果规定时间未到,则重新计时。例如用户频繁点击,只需要响应一次即可 ```js // 思路: 利用计时器,如果计时器时间未到时调用函数则重置计时器 function debouce(fn,wait) { let timer = null return function(...args) { if(timer) { clearTimeout(timer) } timer = setTimeout(()=>{ fn.apply(this,args) },wait) } } ``` #...

发一个不是很成熟的解决方法 : ```js function flat(arr) { let result = []; arr.forEach(a=>{ if(Array.isArray(a)) { result = [...result,...flat(a)] } else { result.push(a); } }) return [...new Set(result)].sort((a,b)=>a-b) } ```

思路:将`add`和`minus`方法挂在到`Number`的原型上面,并且在每个函数中返回`Number`类型的结果 ```js Number.prototype.add = function(num) { return Number(this + num) } Number.prototype.minus = function(num) { return Number(this - num) } ```

强烈建议加入此功能,与 `echarts` 其他图表保持一致