If am trying to show the truncate name whose character is less then 15 but in my case it still showing the name of the form who character is less then 15
<router-link
v-for="form in forms"
v-tooltip="{
content: form.name,
show: (form.name && form.name.length > 15 && hoveredIndex === form.id),
trigger: 'hover',
placement: 'left',
}"
@mouseover="showToolTip(form.name, 'formName', form.id)"
@mouseleave="hoveredIndex = null"
{{ truncate(form.name, 20) }}
</router-link>
methods: {
showToolTip(name, property, index = null) {
if (name.length >= 15) {
this[property] = name;
this.hoveredIndex = index;
} else {
this[property] = null;
this.hoveredIndex = index;
}
},
}