Vue clicks to execute one function at a time, and then clicks to execute another function, and it can execute infinitely.

vue clicks to execute one function at a time, and then clicks to execute another function, and it can execute infinitely

.
Mar.20,2021

set a switch, write a function 3, and use the switch to determine whether function 1 or function 2

let one=true

function fn3 () {

if(one){
    fn1()
}else{
    fn2()
}
one=!one

}


I got it. It goes like this:
let flag=0;
export default {

methods: {
  screen:function () {
    if(flag===0){
      this.fullScreen()
      flag=1
    }
    else{
      this.exitFullScreen()
      flag=0
    }
  },
  fullScreen:function(){},
  exitFullScreen:function(){}

}


Boolean conversion, or one function and one condition

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-1b3e329-2c3d8.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-1b3e329-2c3d8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?