Element的broadcast功能分析 功能简述 在Element中broadcast(事件广播)方法需要3个参数, componentName 组件名称, eventName 事件名,和 eventName 数据。 broadcast是寻找所有子孙组件中,组件名为 componentName 的组件,若找到在其组件上触发($emit) eventName 的事件方法,数据为params。 …
1.效果图如下 2.组件案例 案例: 组件<addressSelect @currentSelected=”selected” :resetData=”resetData” ></addressSelect> //val,输出的是选中的值components引入组件 selected(val) { console.log(val); }, this.resetData = true; …
Module build failed: Error:Vue packages version mismatch:- vue@2.5.22- vue-template-compiler@2.5.17This may cause things to work incorrectly. Make sure to use the same version for both.If you are usin…