调整代码结构
This commit is contained in:
@@ -684,10 +684,19 @@ export default AbstractRenderer.extend(WidgetAdapterMixin, {
|
||||
const stopDate = this.state.stopDate;
|
||||
let day = this.state.startDate;
|
||||
const dates = [];
|
||||
while (day <= stopDate) {
|
||||
dates.push(day);
|
||||
day = day.clone().add(1, token);
|
||||
const shift_time = 8;
|
||||
if (this.state.scale == "day") {
|
||||
while (day <= stopDate) {
|
||||
dates.push(day);
|
||||
day = day.clone().add(shift_time, token);
|
||||
}
|
||||
} else {
|
||||
while (day <= stopDate) {
|
||||
dates.push(day);
|
||||
day = day.clone().add(1, token);
|
||||
}
|
||||
}
|
||||
console.log(dates)
|
||||
return dates;
|
||||
},
|
||||
/**
|
||||
@@ -806,6 +815,7 @@ export default AbstractRenderer.extend(WidgetAdapterMixin, {
|
||||
* @override
|
||||
*/
|
||||
async _renderView() {
|
||||
console.log('this.state', this.state)
|
||||
const oldRowWidgets = Object.keys(this.rowWidgets).map((rowId) => {
|
||||
return this.rowWidgets[rowId];
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user