设置默认属性
ct_month: null


方法:

//默认显示今天
getdatatime(){
this.ct_month= new Date();

},

//默认显示昨天
getdatatime(){
this.ct_month= new Date();
this.ct_month.setTime(this.ct_month.getTime() - 3600 * 1000 * 24);
},

//默认显示上周
getdatatime(){
this.ct_month= new Date();
this.ct_month.setTime(this.ct_month.getTime() - 3600 * 1000 * 24 * 7);
},


//默认显示上个月
getdatatime(){
this.ct_month= new Date();
this.ct_month.setTime(this.ct_month.getTime() - 3600 * 1000 * 24 * 30);
},

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
  • 2022-12-23
  • 2021-12-30
  • 2022-12-23
  • 2021-12-16
  • 2022-12-23
猜你喜欢
  • 2022-01-04
  • 2022-01-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
相关资源
相似解决方案