promise
methods: {
showNum(num, time) {
return new Promise(function (resolve) {
function _show() {
setTimeout(function () {
console.log(num);
resolve();
}, time);
}
_show();
});
},
isOpne() {
var _this = this;
_this
.showNum(1, 1000)
.then(function () {
return _this.showNum(2, 2000);
})
.then(function () {
return _this.showNum(3, 3000);
});
},
},

浙公网安备 33010602011771号