vue 获取当前日期的第二天
<span v-text="timeNow"></span>data里面:timeNow:''mounted里面:mounted:function(){var myDate = new Date();myDate.setDate(myDate.getDate() + 1);console.log(myDate.toLo..
·
<span v-text="timeNow"></span>
data里面:
timeNow:''
mounted里面:
mounted:function(){
var myDate = new Date();
myDate.setDate(myDate.getDate() + 1);
console.log(myDate.toLocaleDateString())
this.timeNow = myDate.toLocaleDateString();
},
更多推荐
已为社区贡献16条内容
所有评论(0)