加粗斜体的是主要代码:
<el-time-picker is-range v-model="time" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围" value-format="HH:mm:ss" @input="timeSelect" ref="timeRef"> </el-time-picker>
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(',');}}
文章来源地址https://www.toymoban.com/news/detail-741146.html文章来源:https://www.toymoban.com/news/detail-741146.html
到了这里,关于Vue时间控件赋值后无法重选问题解决方案的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!