TerryZ / v-selectmenu

SelectMenu for Vuejs, A simple, easier and highly customized menu solution
https://terryz.github.io/docs-vue/#/selectmenu
MIT License
187 stars 24 forks source link

use router-links in NESTED menu? #33

Closed riddley closed 4 years ago

riddley commented 4 years ago

You sent me this on reddit:

For custom router-link:

<v-selectmenu :data="list" type="regular" >
  <template #row="{ row }">
    <router-link :to="row.url" >{{row.name}}</router-link>
  </template>
</v-selectmenu>

But that doesn't seem to work if the menu is nested. Is it possible to use router-links for nested items?

TerryZ commented 4 years ago

What version of vuejs are you using? v-selectmenu required 2.6.0+, please check on this.

riddley commented 4 years ago

I'm not able to install version 2.6.0. Has it been released?

TerryZ commented 4 years ago

The vuejs last release is 2.6.11

riddley commented 4 years ago

Oh Sorry, I read that as the version for v-selectmenu. I am using Vue 2.6.11.

TerryZ commented 4 years ago

Try upload your code to somewhere, then i can see what happen.

riddley commented 4 years ago

https://codepen.io/riddley/pen/BaygyBE

TerryZ commented 4 years ago

First of all, your demo does not work, because miss a comma in line 117.

image

And i don't see any router-link in your demo.

riddley commented 4 years ago

I was able to get this working. Thanks for your help!