methods: {
one(){
return 1
},
// two(){
// // return 2
// setTimeout(()=>{
// return 2
// },2000)
// },
two(){
return new Promise((resolve,reject)=>{
setTimeout(()=>{
resolve(2)
},2000)
})
},
three(){
return 3
},
async run(){
console.log(this.one())
console.log(await this.two())
console.log(this.three())
},
},
mounted() {
this.run();
},