kzima/vuestrap-base-components

Navbar links bit confusing

Opened this issue · 1 comments

tvld commented

As per the closed issue #19,

 <vs-navbar fixed="top" type="dark" variant="primary" full>
     <a class="navbar-brand" href="#">&nbsp;</a>
     <vs-nav type="navbar" :vertical="false" class="pull-sm-right">
       <vs-nav-item link="#" active>Active</vs-nav-item>
         <vs-nav-item link="http://www.google.com">Link</vs-nav-item>
         <vs-nav-item link="www.google.com">Another Link</vs-nav-item>
         <vs-nav-item link="href='www.google.com'" >Strange</vs-nav-item>
     </vs-nav>
   </vs-navbar>

Although the click works with the second link, the hover shows all "#"

tvld commented

Except for the undesired hover "tooltip", this works ok:

<template>

  <div class="navbar-wrapper">
   <vs-navbar fixed="top" type="dark" variant="primary" full>
     <a class="navbar-brand" href="#">&nbsp;</a>
     <vs-nav type="navbar" :vertical="false" class="pull-sm-right">
       <vs-nav-item v-for="navitem in navitems" :link="navitem.url">
         {{ navitem.label }}
       </vs-nav-item>
     </vs-nav>
   </vs-navbar>
  </div>

</template>

<script>

  import vuestrapBase from 'vuestrap-base-components'

  export default {
    components: {
      'vs-navbar': vuestrapBase.navbar,
      'vs-nav': vuestrapBase.nav,
      'vs-nav-item': vuestrapBase.navItem
    },
    data () {
      return {
        navitems: [
          { label: 'Home', url: 'http://yahoo.com' },
          { label: 'About us', url: 'http://www.google.com' }
        ]
      }
    }
  }
</script>