Skip to content

Instantly share code, notes, and snippets.

@Hypersapien
Created June 26, 2019 19:08
Show Gist options
  • Save Hypersapien/f3c6d80ac3ff9990325234a3a9e1117c to your computer and use it in GitHub Desktop.
Save Hypersapien/f3c6d80ac3ff9990325234a3a9e1117c to your computer and use it in GitHub Desktop.
//in component
created: function () {
var thisRef = { TableObj: this };
this.$emit("created", thisRef);
}
//in component tag
<data-table v-on:created="dataTableCreated"></data-table>
//in parent
methods:{
dataTableCreated: function (e) {
if (e.TableObj == null) return;
this.dataTable = e.TableObj;
this.dataTable.parent = this;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment