0👍
You can access element index using this syntax: (item, index) in items
.
To dynamically bind a property to a component / element, use the :
syntax: <a :key="i"></a>
.
With your button:
<button
v-for="(name, index) in priz"
:key="index"
@click="judge(name)"
class="pure-button button1">
{{name}}
</button>
Source:stackexchange.com