vue 方法正步执行解决方案
mounted:
this.one().then(res=>{
console.log('one方法执行完成')
this.two()
})
methods:
one(){
return new Promise(function (resolve, reject) {
setTimeout(()=>{
console.log(111)
resolve()
},2000)
})
},
two(){
console.log(222)
}