Click on tooltip content vuetify

Viewed 3004

everybody ! I have a question, is possible to click on the tooltip content for call any function ? When my tooltip is open i want to click on the span for call test function.

<template>
    <v-tooltip v-model="show" open-on-click :open-on-hover="false" bottom close-delay="2000">
      <template v-slot:activator="{ on }">
        {{on}}
        <v-btn color="primary" dark v-on="on" fab x-small class="btn">
          <v-icon>mdi-pencil</v-icon>
        </v-btn>
      </template>
        <span @click="test">click<span>

    </v-tooltip>
</template>

<script>
export default {
  data() {
    return {
      show: false
    };
  },
  methods: {
    test: function() {
     console.log('helloo')
    }
  }
};
</script>
1 Answers

You need to overide tooltips styling. Add this styles.

.v-tooltip__content {
  pointer-events: initial;
}

here is codepen

Related