Skip to content

Commit

Permalink
Add Vue app to the vue:mount event
Browse files Browse the repository at this point in the history
  • Loading branch information
pierredup authored and weaverryan committed Sep 16, 2022
1 parent dd07ad6 commit 86fa0c8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Vue/Resources/assets/src/render_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ export default class extends Controller {
if (this.element.__vue_app__ !== undefined) {
this.element.__vue_app__.unmount();
}

this._dispatchEvent('vue:before-mount', {
componentName: this.componentValue,
component: component,
props: this.props,
app: this.app,
});

this.app.mount(this.element);

Expand Down

0 comments on commit 86fa0c8

Please sign in to comment.