I want to make tooltips from a dynamically generated array.
https://codepen.io/sneaky666/pen/BXrjOp?&editable=true&editors=101
<div id="app">
<v-app id="inspire">
<v-container fluid class="text-center">
<v-layout
flex
justify-space-between
wrap
>
<v-flex xs12 class="mt-12">
<v-tooltip v-for="item in getData()" v-model="item.show" top>
<template v-slot:activator="{ on }">
<v-btn @click="item.show = !item.show">{{item.data.name}}</v-btn>
</template>
<span>{{item.data.name}}</span>
</v-tooltip>
</v-flex>
</v-layout>
</v-container>
</v-app>
</div>
js
new Vue({
el: '#app',
vuetify: new Vuetify(),
data () {
return {
actions : [{name:"a"},{name:"b"},{name:"c"},{name:"d"}],
show: false,
}
},
methods : {
getData : function() {
return this.actions.concat({name:"e"}).map(function(x) {
return {data : x, show:false};
});
}
}
})
but this doesn't work. How can I fix it?