I do not understand the question very well, but I believe the problem is in the way you are using interpolation.
The interpolation "{{}}" is used only between tags, not inside tags, referencing their variables that are within computed
or its data ()
.
In the case of a tag within a attribute the interpolation is not used, but the v-bind: or the colon": ", which is exactly the same as v-bind, but in a shorter way to use it.
Your code in case I think it would look like this:
<template v-for="d in data" >
<a :key="d.id" class="zone" :class="d.value" :href="d.code" >{{ d.name }}</a>
</template>
I just do not quite understand what you wanted to do exactly in the case of the class
attribute, so I assumed that the zone
class is static, and d.value
will be another dynamic class, using the variable value.
In this case it is okay to have two class attributes in a tag, Vuejs will merge all classes automatically, from dynamic to static.