Trigger event on Panel opening (vue)

Hi guys!

I got a problem with executing code with right panel opening.

So I have right panel:
<f7-link icon-if-ios="f7:menu" icon-if-md="ios:menu" panel-open="right"></f7-link>

And at right-panel.vue in export default:
on: { panelOpened(panel) { console.log('panel is open now!'); } }

Nothing happened in console after opening the panel.

I tried
on: { pageAfterIn(event, pageData) { console.log('panel is open now!'); } }

But the console message appears just after opening ‘/’, and nothing happens then I open right panel.

So why this console message appears on opening index page, not right-panel.vue?

Thank you!

This “on” object in vue conponents is only for router page events. Panel events must be added on panel component, e.g.

<f7-panel @panel:opened=“someMethod”>
1 Like