1,setTimeout(console.log(_this.$store.state.currentuser.encrypt_key),4000)这样没有效果,改成闭包
setTimeout(function(){
return console.log(_this.$store.state.currentuser.encrypt_key)},4000)
1,setTimeout(console.log(_this.$store.state.currentuser.encrypt_key),4000)这样没有效果,改成闭包
setTimeout(function(){
return console.log(_this.$store.state.currentuser.encrypt_key)},4000)
本文标题:9.1settimeout要用函数闭包/
本文链接:https://www.haomeiwen.com/subject/uwjkjxtx.html
网友评论