日期格式修改

This commit is contained in:
shijingjing
2022-07-25 11:42:11 +08:00
parent 2b8cf60742
commit f953118489

View File

@@ -43,21 +43,16 @@ export default {
components: {
uniCalendar
},
onLoad() {
created() {
this.getNowDay()
// if(this.month > 9) {
// this.yyyyMM = this.year + '-' + this.month
// } else {
// this.yyyyMM = this.year + '-' + '0' + this.month
// }
this.getData()
},
methods: {
changeMonth(e) {
if(e.month<=9) {
this.yyyyMM = e.year + '-' + '0' + e.month
this.yyyyMM = e.year + '0' + e.month
} else if(e.month > 9) {
this.yyyyMM = e.year + '-' + e.month
this.yyyyMM = e.year + e.month
}
this.getData()
},