a:orderOrder:function () {
this.GLOBAL.order.$emit("orderList",this.oderList[j]);
this.$router.push({path:"/orders/orderOrders"});
},
b: mounted:function () {
this.GLOBAL.order.$on('orderList',(data)=>{
console.log(data);
});
}
不知道为什么第一张图片上传不了,第一次console是空,然后返回再传就出现了一个值一次空值,再一次就是两个值和一个空值
为什么第一次是空值,之后又每次会多次console?
这个 出现空值是由于 数据没有接收到 但是渲染mounted 挂载时执行一次
第二次 同样执行一次空值 然后$emit 一次值 route路由更新 一次值