使用promise
Promise.all(promises)
.then((res) => {
this.$refs.Drawer.init(1)
})
.catch((res) => {
reject(res);
});
Uncaught (in promise) ReferenceError: reject is not defined
详查this.$refs.Drawer.init(1) 函数里的内容,如果成功调用的函数内有报错或异常 都会报
`Uncaught (in promise) ReferenceError: reject is not defined`
,并执行catch不会报函数内的详细错误。
this.$refs.Drawer.init(1)
无异常 则报错消失。