After elementUI el-time-picker is reassigned, the selected date does not update.

Get the v-model that edits data and assigns it to time-picker

async handleEdit(index, row) {
    
    
        this.editType = row.itemType
        const data = await fetchDomainItemQueryById ({
    
    clusterId: this.treeNode.id,itemType: row.itemType,itemId: row.itemId})
        this.form = data.data
        this.form.alarmTime=[data.data.alarmTimeBegin,data.data.alarmTimeEnd]
  }

The data in the box does not change with the selection time
Insert image description here

Solution

this.$set( this.form, 'alarmTime', [data.data.alarmTimeBegin,data.data.alarmTimeEnd])

Guess you like

Origin blog.csdn.net/qq_37617413/article/details/120289807