0

I'm working with Vuetify and I want to create my own submit,cancel etc. buttons so the website is homogenous.

So I'm going to define my button:

 Vue.component('pt-submit', {
        data: function () {
            return {
            }
        },
        template: '<v-btn color="success">Submit</v-btn>'
    });

But I would like to inherit/user events from v-btn like @click. How can I do that so I can use pt-submit the same way as <v-btn> without having to define color,classes etc?

2
  • Any updates on this question? Does my answer helps you? Commented Jul 9, 2020 at 16:20
  • @Raffobaffo yes, thanks Commented Jul 9, 2020 at 20:30

1 Answer 1

1

Emit them when the v-btn emits them:

template: '<v-btn color="success" @click="$emit('click')">Submit</v-btn>'
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.