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

    Connecting to Vue Router with Menu component?

    Framework
    2
    5
    620
    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.
    • Ben Hayat
      Ben Hayat last edited by Ben Hayat

      Hi;

      Quasar Tab allows to be used with Vue Router via QRouteTab. This allows to use “To” property which page to load.

      Is there such feature with QMenu?
      Or, is there a sample or guideline how to use menu or Sub-menu to load a page in Roure-view section when a menu item is clicked or tapped on mobile?

      Or, can we use Tree component as menu? if yes, how do we connect the nodes to the Vue router with “To” binding?
      I prefer to use Tree.

      Thanks!

      beets 1 Reply Last reply Reply Quote 0
      • beets
        beets @Ben Hayat last edited by

        @Ben-Hayat q-menu doesn’t necessarily require that you put a q-list and q-item components inside, but I assume you’re talking about that case. If so, just put a :to prop on the q-item, as shown here: https://quasar.dev/vue-components/list-and-list-items#Connecting-to-Vue-Router

        You also probably want to make sure to put the auto-close prop on the q-menu, like <q-menu auto-close> or v-close-popup on the q-item.

        Ben Hayat 1 Reply Last reply Reply Quote 0
        • Ben Hayat
          Ben Hayat @beets last edited by

          @beets
          Thanks for the info. After posting I noticed the pattern as you provided. But my first inclination was that, Menu like Tab component would have the direct :to props.

          BTW, I love Beets, juice them with Celery & carrots. 🙂

          beets 1 Reply Last reply Reply Quote 0
          • beets
            beets @Ben Hayat last edited by

            @Ben-Hayat said in Connecting to Vue Router with Menu component?:

            BTW, I love Beets, juice them with Celery & carrots

            Throw a piece of ginger root in there and then you’ve got my attention! 🙂

            Ben Hayat 1 Reply Last reply Reply Quote 0
            • Ben Hayat
              Ben Hayat @beets last edited by

              @beets
              Ah, forgot the ginger and Apple. And I also add one Jalapeno pepper and fresh garlic with the mix. 🙂
              Gets real spicy. That’s actually counts as one meal, and I eat a normal lunch as my second meal.

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