if (this.timeData.day < 10) {
this.timeData.day = 0${ this.timeData.day}
}
if (this.timeData.hour < 10) {
this.timeData.hour = 0${ this.timeData.hour}
}
if (this.timeData.minute < 10) {
this.timeData.minute = 0${ this.timeData.minute}
}
if (this.timeData.second < 10) {
this.timeData.second = 0${ this.timeData.second}
}
加上这段,可兼容小程序。
不必调用fillWithZero
0 个回复