From 86fa0c8423814fe72e47465882429602a537a020 Mon Sep 17 00:00:00 2001 From: Pierre du Plessis Date: Sat, 27 Aug 2022 14:10:43 +0200 Subject: [PATCH] Add Vue app to the vue:mount event --- src/Vue/Resources/assets/src/render_controller.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Vue/Resources/assets/src/render_controller.ts b/src/Vue/Resources/assets/src/render_controller.ts index f78e10df855..910276c8a78 100644 --- a/src/Vue/Resources/assets/src/render_controller.ts +++ b/src/Vue/Resources/assets/src/render_controller.ts @@ -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);