update README

This commit is contained in:
ldz
2020-10-19 20:29:10 +08:00
parent ec7140ff25
commit b851d0951a
4 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* @param {Function} fn 函数
* @param {Function} fn 防抖函数
* @param {Number} delay 延迟时间
*/
export function debounce(fn, delay) {
+1 -2
View File
@@ -22,10 +22,9 @@ export default {
window.removeEventListener('reisze', this[resizeChartMethod]);
},
methods: {
// 通过 lodash 的防抖函数来控制 resize 的频率
// 防抖函数来控制 resize 的频率
[resizeChartMethod]: debounce(function() {
if (this.chart) {
console.log('修改');
this.chart.resize();
}
}, 300),