The methods in the vue component is strange because it does not seem to recalculate in multiple instantiations

1.

generated by the anti-shake function is a method for using methods in component A _

clipboard.png

Anti-shake function

export const debounce=function(delay,fn){
  console.log("debounce")
  var timer;
  return function(){
    var argu=this.arguments;
    clearTimeout(timer);
    timer=setTimeout(()=>{
      fn.apply(this,argu)
    },delay)
  }
}

there is no great god in depth, please explain, I am not very grateful!

Nov.19,2021

your function saves the last instance, no matter how many times it is called, it is the first time

if(ctx===undefined){
      ctx=this
    }
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-1b3e1fd-2c3e0.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-1b3e1fd-2c3e0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?