Execution method after vue list rendering

as shown in figure

  • vue
  • watch,this.$nextTickdom




that is to say, the callback function of this.$nextTick does not execute the method after the end of list rendering. What is the situation?

Feb.27,2021

nextTick is to perform a deferred callback after the end of the next DOM update cycle. Use this method immediately after modifying the data to get the updated DOM. " It is difficult to guarantee that the next Dom update after the imageList change is the one rendered by the picture, which is not necessarily accurate. It is recommended to control the display through rendering, not through Dom operation

. < hr >

comment is not easy to post code

let img = new Image();
img.src = t.employeeItem.employeePic;
img.onload = function(){
    Vue.nextTick(() => {
    // do something
    }
}

1. Make sure that after the imageList change, your watch has executed
2.dom to update the picture and may not have finished loading
3. Add printing to nextTick to see if

has been executed.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35a1c-2bfc3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35a1c-2bfc3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?