Vue时间控件赋值后无法重选问题解决方案

加粗斜体的是主要代码:

v-model="time" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围" value-format="HH:mm:ss" @input="timeSelect" ref="timeRef">

data() { return { time: ['08:00:00','12:00:00']beginTime:'',endTime:'',timeStr:''}; }

methods:{timeSelect(timeRange){this.$refs["timeRef"].value=timeRange;this.time=timeRange;},submitForm(){this.beginTime=this.time[0];this.endTime=this.time[1];this.timeStr=this.time.join(',');}}

 

 

你可能感兴趣的:(vue.js,elementui,前端)