<> one , Original code
<el-form-item class="form_bigt_p" label=" Project start and end time :" prop="time"> <el-date-picker
unlink-panels class="bigWidth" :disabled="isDisabled" v-model.trim="
ruleForm.time" type="daterange" value-format="timestamp" range-separator=" to "
start-placeholder=" Start date " end-placeholder=" End date " ></el-date-picker> </
el-form-item>
<> Because the data returned by the background is two yyyy-mm-dd Date of format (startTime,endTime), So we started with
this.ruleForm.time = [ this.baseDateTemp(res.data.startTime), this.baseDateTemp
(res.data.endTime), ]; //this.baseDateTemp It is a global method of converting date to time stamp
<> two , Problem finding and handling

<> problem

The date can be rendered in the el-date-picker upper , But it will not be echoed when it is modified
After testing, it was found that , This can be triggered input method , But it doesn't trigger change method

<> Treatment method

stay input It can be seen from the method , On modification ,el-date-picker Bound v-model The value of has changed , But there is no real-time update in the control
The final choice is to adopt this.$set Method to update the data , And successfully solve this problem
The revised code is as follows
<el-form-item class="form_bigt_p" label=" Project start and end time :" prop="time"> <el-date-picker
unlink-panels class="bigWidth" :disabled="isDisabled" v-model.trim="
ruleForm.time" type="daterange" value-format="timestamp" range-separator=" to "
start-placeholder=" Start date " end-placeholder=" End date " @input="testClick" ></
el-date-picker> </el-form-item> testClick(e) { this.$nextTick(() => { this.
ruleForm.time = null; this.$set(this.ruleForm, "time", [e[0], e[1]]); }); }, //
Convert the two dates obtained in the background to time The method is changed to this.$set(self.ruleForm, "time", [ this.baseDateTemp(res
.data.startTime), this.baseDateTemp(res.data.endTime) ]);

Technology
©2020 ioDraw All rights reserved
Java exercises 1: Simply define a car class New photo album app launched by Microsoft : Using cross platform framework React Native to write Chapter two Fundamentals of programming Programming exercises pandas Time order of webpack Code segmentation import()Vue slot slot: Default slot , Named slot , Scope slot Fundamentals of data analysis ——R language ( Processing missing values )C++ Implementation of matrix meteor shower effect PostMan Advanced Usage , Interface MD5+Secret autograph Sign The 12th Blue Bridge Cup B group C/C++ Provincial competition