Event assignment for an item in layout from a child page

  • Hello!

    I ask for advice.
    I have a Layout inside of which:

    <q-layout view=“lHh Lpr lFf”>

        <q-btn ref="actBtn" label="actionButton">
      <router-view />


    And there is a q-page that appears when navigating a route, displayed inside a q-page-container Layout.

    Blank Page

    export default {
    name: ‘PageBlank’,
    components: {
    return {
    methods: {

    How can I make sure that when you click on the ref = actBtn button (which is located on the main Layout), the onClick_actBtn method in the sub page is executed. ???

  • @9223000 looks like an edge case, would’ve been easier if it was the child emitting event up. Anyway see vue docs for handling such https://vuejs.org/v2/guide/components-edge-cases.html#Accessing-the-Root-Instance. This can also be done using vuex.

Log in to reply