Closed ShravanMweb closed 5 years ago
Hello, your issue has been closed because it does not conform to our issue requirements. In order to ensure every issue provides the necessary information for us to investigate, we require the use of the Issue Helper when creating new issues. Thank you!
你好,你的 issue 不符合我们所要求的格式,因此已被自动关闭。为了确保每个 issue 都提供必需的相关信息,请务必使用我们的 Issue 向导 来创建新 issue,谢谢!
2.6.2
https://stackoverflow.com/users/10901207/shravan-sangishetti
How to catch $emit event with v-on: in JavaScript. while doing import MyGrid from 'MyGridcomponemt.vue' import Vue from 'vue' var myDynamicGrid = Vue.extend(MyGrid) var instance = new myDynamicGrid({ propsData: { columns: this.columns,rowsperpage:this.rowsperpage,etc..} }) instance.$mount() // pass nothing //Will append to required place this.$refs.container.appendChild(instance.$el) Here I am able to pass prosData to MyGrid component but how do I catch those $emit events which will trigger by MyGrid component..
Can we catch $emit event in javascript??
How to catch $emit event with v-on: in JavaScript?? My code.. import MyGrid from 'MyGridcomponemt.vue' import Vue from 'vue' var myDynamicGrid = Vue.extend(MyGrid) var instance = new myDynamicGrid({ propsData: { columns: this.columns,rowsperpage:this.rowsperpage,etc..} }) instance.$mount() // pass nothing //Will append to required place this.$refs.container.appendChild(instance.$el) Here I am able to pass prosData to MyGrid component but how do I catch those $emit events which will trigger by MyGrid component..
How to catch $emit event with v-on: in JavaScript. Dollowing is My code.. import MyGrid from 'MyGridcomponemt.vue' import Vue from 'vue' var myDynamicGrid = Vue.extend(MyGrid) var instance = new myDynamicGrid({ propsData: { columns: this.columns,rowsperpage:this.rowsperpage,etc..} }) instance.$mount() // pass nothing //Will append to required place this.$refs.container.appendChild(instance.$el) Here I am able to pass prosData to MyGrid component but how do I catch those $emit events which will trigger by MyGrid component..
We are appending MyGrid component to its parent grid multiple times(to make subgrid) here parent gridcomponemt also the same component (MyGrid component). That has been done perfectly but while doing that we can pass only propsData but how to receive $emit event.. please see the following code
How to catch $emit event with v-on: in JavaScript. while doing
import MyGrid from 'MyGridcomponemt.vue' import Vue from 'vue' var myDynamicGrid = Vue.extend(MyGrid) var instance = new myDynamicGrid({ propsData: { columns: this.columns,rowsperpage:this.rowsperpage,etc..} }) instance.$mount() // pass nothing //Will append to required place this.$refs.container.appendChild(instance.$el) Here I am able to pass prosData to MyGrid component but how do I catch those $emit events which will trigger by MyGrid component..
@ShravanMweb https://vuejs.org/v2/api/#vm-on