foreword
When using vue + ElementUI to develop a project, the e-date-picker component is used to select the date range dateRange. When the default dateRange is directly assigned, the value echoed in the component cannot be deleted or modified.
solution
setTemp(){
// 直接使用下列方式直接赋值,会导致回显无法更改与删除问题
this.formData.dataRange = ['2022-10-10', '2022-10-12']
// 改为下面的代码就不会出现上述问题
this.$set(this.formData, 'dataRange', ['2022-10-10', '2022-10-12'])
}