Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 141980

Cant use @click="somefunction()" on a vs-dropdown

$
0
0

As the title says, I'm unable to use the @click function in a vs-dropdown

<vs-dropdown>
  <a href="#" @click="funct('/parameter')">Home</a>
  <vs-dropdown-menu>
    <vs-dropdown-item>
    asdf
    </vs-dropdown-item>
  </vs-dropdown-menu>
</vs-dropdown>

<script>
export default {
  data: () => ({}),
  methods: {
    funct(param) {
      this.$routes.push(param)
    }
  }
}
</script>

As you can see, I should be redirected to '/parameter' but instead whenever I click it nothing happens, is there a way to work around this or force the dropdown to do what I want?


Viewing all articles
Browse latest Browse all 141980

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>