正文vue :没有全局变量的计数器IP云V管理员/2022-08-16/7 阅读 08/16提示:扫一扫查出行【扫一扫了解最新限行尾号】复制提示 created:created () { let num = null this.mFun(num)},methods:methods:{ mFun(m){ if (m === null) { m = 0 } else { m++ } setTimeout(()=>{ console.log(m) this.mFun(m) },1000) },}