The problem of selecting all the select drop-down boxes in vue and ivew projects

when I first select other options and then select all, there should be only all highlights, which is correct at this time. When I choose all first, when I choose others, there will always be all, and there will be no other. Also, it will be executed twice at this time.
Link description

        onChangeGame(a){
          const length=a.slice(0).length;
          if(length>1){
            if(a[length-1]==="-1"){
              console.log("-1")
              this.game_app_key=["-1"]
              return;
            }else{
              if(a[0]==="-1"){
                 this.game_app_key=a.shift();
              }
            }
          }
          console.log(a)
          console.log("")
        }

Apr.29,2021

shift misused

if(a[0]==='-1'){
    // a.shift()a,   
    this.game_app_key=a.shift();    // this.game_app_key-1
   }

the correct method should be

if(a[0]==='-1'){
    a.shift()
    this.game_app_key=a;    // this.game_app_key
   }
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-1b38309-2b93e.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-1b38309-2b93e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?