This method has a value outside this.tag _ choose_options and undefined? inside

  update(even){
            console.log(even);
            alert(JSON.stringify(this.tag_choose_options));
            even.forEach(function (item) {
                alert(JSON.stringify(this.tag_choose_options));
                // this.tag_choose_options.push({label:item.name});
                // this.tag_choose_options.push({"value":557275,"label":"","count":11}),
                // console.log(item);
                alert(item.name);
            })
        },

this method has a value in this.tag _ choose_options outside of forEach. what"s going on inside undefined?

Apr.03,2021

the this direction has changed, and your console.log (this) will find that it is even

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