update README
This commit is contained in:
@@ -51,8 +51,6 @@ export default {
|
||||
for (let i = 0; i < 7; i++) {
|
||||
// 日期
|
||||
let date = new Date();
|
||||
console.log(date.getMonth());
|
||||
console.log(date.getDate());
|
||||
this.cdata.weekCategory.unshift([date.getMonth() + 1, date.getDate()-i].join("/"));
|
||||
|
||||
// 折线图数据
|
||||
|
||||
+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