No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Q-list on sidebar to display clicked content on main page (body)

    Framework
    2
    2
    342
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      keechan last edited by

      I am using a q-drawer to display a menu list (using q-list and q-items).
      Each item when clicked should render a new vue component on the body part of my page.

      However, this is not the case. Clicking on the menu item renders the new vue component on the sidebar (drawer) as well.

      How can I make it load on the body/main area instead of the sidebar?

      
            <q-list v-for="(menuItem, index) in menuList" :key="index" align="left">
              <q-item clickable v-ripple @click="selected = menuItem.label" active-class="button-highlighted"
            :active="selected === menuItem.label" >
      
                <q-item-section>
                  {{ menuItem.label }}
                </q-item-section>
              </q-item>
      
            </q-list>
      
      <div v-if="selected == 'Some Text'">
           <SomeNewVue />
      </div>
      

      Help!

      1 Reply Last reply Reply Quote 0
      • T
        tof06 last edited by

        Hi @keechan,
        Why not using vue-router and the to property of q-item ?

        1 Reply Last reply Reply Quote 0
        • First post
          Last post