elementUI的坑

1.时间控件,当type为week时,不能使用value-format

解决方法:使用周时间前,用moment.js将时间进行"YYYY年 WW周"格式化

self.formOptions.time = self.$moment(self.formOptions.time).format('YYYY年 WW周')

2.时间控件,当type为datetimerange时,添加默认时间,会报错

3.时间控件,当type为datetimerange时,使用value-format="yyyy-MM-dd hh:mm:ss",默认值不能填充,并且选择时分秒会不起作用

解决方法:使用时间前,使用moment.js将日期进行"YYYY-MM-DD HH:mm:ss"格式化

self.formOptions.time[0] = self.$moment(self.formOptions.time[0]).format('YYYY-MM-DD HH:mm:ss')
self.formOptions.time[1] = self.$moment(self.formOptions.time[1]).format('YYYY-MM-DD HH:mm:ss')

3.时间控件,当type为year时,一页只显示10年,但是位置是12年的大小,会有两个空白

评论

暂无评论