1👍
✅
You were so close with your try
In order for vue to understand that you want to pass a variable as the attribute value, you need to add a colon in front of it, like so:
<b-td :colspan='fields.length' class='text-center'>
If you do it like this:
<b-td colspan='fields.length' class='text-center'>
colspan would parse the fields.length
as a string “fields.length”, not the javascript computed value for the variable fields.length 7
for example.
Source:stackexchange.com