![jeecg-boot ui怎么把查看的时候赋值时间控件_第1张图片](http://img.e-com-net.com/image/info8/f08f726c5a414631b3bd88e822b9ad2e.jpg)
这是一个时间控件,我们采用v-model 进行双向绑定
在renturn 里进行声明
![在这里插入图片描述](http://img.e-com-net.com/image/info8/b95b1340c4ed4114864d011619a99527.jpg)
进行添加的时候
![在这里插入图片描述](http://img.e-com-net.com/image/info8/c6540646de2c42ae86bde53f3a44d379.jpg)
时间控件直接得到的值是这种格式的
我们进行转换
formData.acceptDate = this.acceptDate ? this.acceptDate.format('YYYY-MM-DD HH:mm:ss') : null //时间转换
在赋值到控件上去的时候,也需要转换回去
this.acceptDate=moment(this.payModel.acceptDate) //转换赋值到控件上
需要导入这个
import moment from 'moment'