Vue+element el-date-picker 时间日期选择器设置默认值,选择框不显示问题(已解决)

时间选择器默认值的问题

显示的时候如果用下面的方式赋值将不会显示出来:

  this.deviceFormData.time[0] = that.$filterArray.formatDatehh(start);
  this.deviceFormData.time[1] = that.$filterArray.formatDateEnd(end);

实际上是有数据的,但是不会显示出来

如果用下面的方式就可以显示出来了

 this.deviceFormData.time = [that.$filterArray.formatDatehh(start), that.$filterArray.formatDateEnd(end)]

页面回显

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/Maxueyingying/article/details/134142139