工作315:uni-修改添加时间的逻辑
生活随笔
收集整理的這篇文章主要介紹了
工作315:uni-修改添加时间的逻辑
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
第一步
<u-form-item label="開始日期" prop="startTime" label-width="150"><u-input type="select" :select-open="start_time_show" v-model="form.startTime" placeholder="請選擇" @click="start_time_show = true"></u-input></u-form-item><u-form-item label="結束日期" prop="endTime" label-width="150"><u-input type="select" :select-open="end_time_show" v-model="form.endTime" placeholder="請選擇" @click="end_time_show = true"></u-input></u-form-item>第二步
<u-picker mode="time" v-model="start_time_show" :params="params" @confirm="startTimeConfirm"></u-picker><u-picker mode="time" v-model="end_time_show" :params="params" @confirm="endTimeConfirm"></u-picker>第三步 調用方法傳入日期
//開始時間startTimeConfirm(e) {this.form.startTime = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' +e.second},//結束時間endTimeConfirm(e) {this.form.endTime = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' +e.second},總結
以上是生活随笔為你收集整理的工作315:uni-修改添加时间的逻辑的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 大二java课程设计题目_java课程设
- 下一篇: 数学建模各种软件对比(MATLAB/Li