[Vuejs]-Mix ref links and functions with an @click in a Vuetify Drawer

1👍

Add a condition inside click event like below

<v-list-tile
    v-for="(child, i) in item.children"
    :key="i"
    @click="onClick(child)"
>

And add new onClick method

methods: {
    onClick(child) {
        if (/* condition */) {
           // call function here
        } else {
            this.goPage(child.ref);   
        }
    }
}

Leave a comment