update README
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @param {Function} fn 函数
|
||||
* @param {Function} fn 防抖函数
|
||||
* @param {Number} delay 延迟时间
|
||||
*/
|
||||
export function debounce(fn, delay) {
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user