Giter Site home page Giter Site logo

Comments (3)

amirkian007 avatar amirkian007 commented on May 8, 2024

@AndreyKachanov
Hi, thanks for reporting the issue , I can't understand what you are trying to do, can you give me an clear example of the behavior you are looking for?
Is this the behavior you are looking for?:
1-click on a menu item
2-then push to a route
3-then open children container menu
2-then close the menu

from vue-awesome-sidebar.

AndreyKachanov avatar AndreyKachanov commented on May 8, 2024

Hi. Yes, but,

  1. in addition, I need that when clicking on the parent element, the menu also closes.
  2. by clicking on the parent, the route could also open.

Like in this video for example.
The parent has 2 functions: 1) it shows the child elements 2) it acts as a route to the page.
By clicking on both the parent and the children, the menu should close.
Can this be done with your plugin?

Kazam_screencast_00005.mp4

from vue-awesome-sidebar.

amirkian007 avatar amirkian007 commented on May 8, 2024

@AndreyKachanov
i see...
now the behavior is that when you click on a menu item it toggles the children items container, if you need an option to force close an children items container when clicking on parent or child element when router push happens let me no so i can add it to the package.

plus if i understood your explanation correctly two things can be done:
1- changing route re-renders the components inside <router-view> so in order for the menu to stay active you need to place the menu component out side of <router-view>(this is a common method) check the this code for demo
2- you can do it with the following menu list(by adding collapseOnClick = true to the parent) :

  {
       name: "Styling",
       icon: { class: "material-icons", text: "color_lens" },
        href: { path: "/styles/sass"}, // can also be vue-router object,
        collapseOnClick?: boolean //collapses menu when clicked - this behavior can also be achieved with Events
       children: [
         {
           name: "Sass Vars",
           href: { path: "/styles/sass"},
           icon: { class: "material-icons", text: "colorize" },
         },
         {
           name: "Css",
           href: { path: "/styles/css"},
           icon: { class: "material-icons", text: "css" },
         },
       ],
     },

from vue-awesome-sidebar.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.