简体   繁体   English

有人可以向我解释这段代码在 vue 中是如何工作的吗

[英]Can someone explain to me how this code works in vue

mounted(){

this.$root.$on('dataLoaded', (magazineData) => {
    this.LoadData(magazineData);
});

}

From what I've understand it calls when dataLoaded is changed on the parent element and the magazineData is a variable inside the parent is that correct?据我所知,当父元素上的 dataLoaded 发生更改并且 magazineData 是父元素内的变量时,它会调用它是否正确?

magazineData is a parameter emitted when @dataLoaded. MagazineData 是@dataLoaded 时发出的参数。 It depends of what kind of page you're loading.这取决于您加载的页面类型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 有人可以向我解释这个功能是如何工作的吗? - Can someone explain to me how this function works? 有人可以为我解释一下这种递归是如何工作的吗? - Can someone explain for me how this recursion works? 有人可以解释这段代码是如何工作的吗? - Can someone explain how this code even works? 这段代码有问题吗? 有人可以解释这是如何工作的 - Are there problems in this code? Can someone explain how this works 有人可以解释这个 JavaScript 代码是如何工作的吗? - Can someone explain how this JavaScript code works? js Array.prototype.filter.call() - 有人能解释一下这段代码是如何工作的吗? - js Array.prototype.filter.call() - can someone explain me how this piece of code works? 有人可以解释一下 jjencode 是如何工作的,以及在我的代码中使用它是否合适 - Can someone explain me how jjencode works and if is good to use it on my code 有人可以向我解释一下循环是如何在这里工作的吗? - Can someone explain to me how the loop works here? 有人可以向我解释逻辑“OR”运算符的范围在 Javascript 中是如何工作的吗? - Can someone explain to me how the scope of the logical "OR" operator works in Javascript? 有人可以向我解释如何将这种递归函数添加到自身中吗? - Can someone explain to me how adding this recursive function to itself works?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM