Comments (3)
@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.
Hi. Yes, but,
- in addition, I need that when clicking on the parent element, the menu also closes.
- 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.
@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)
- icons not showing HOT 6
- Cannot read properties of null (reading 'isCE') HOT 8
- Providing an options that indicates whether open a non-leaf node. HOT 3
- Icon's not loading HOT 1
- Router mode should use vue-router HOT 6
- Request: can you please share the code for the live demo website? HOT 2
- menu attribute "width" doesn't seem to work HOT 2
- when testing the minified menu on safari + iphone, menu items either don't work or take 2 taps to open HOT 5
- Request: Close all MenuItems that are expanded when clicking a MenuItem with href HOT 3
- How can I handle the event closeOnClickOutSide HOT 4
- [Idea] Prop for for one open menu at a time HOT 2
- how to programmatically decide if a menu item is selected or not
- Probled with closeOpenMenuOnHrefPush HOT 2
- Please add your repository documentation for these urls, where anyone can easily find the icons
- it didn't display with vue 3x pinia HOT 6
- Menu item doesn't change to "selected" style if not an "href" item HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-awesome-sidebar.