我有以下包含v-for
循环的代码:
<template>
<div>
<b-container>
<h1>Categories</h1>
<b-form>
<b-input-group v-for="cat in category" :key="cat.id" class="mb-3">
<b-input-group-prepend>
<b-form-input type="text" :value="cat.name" :ref="cat.id" :disabled="disabled"/>
</b-input-group-prepend>
<b-input-group-append>
<b-btn @click="onEdit(cat.id)" variant="primary" v-show="editShow">Edit</b-btn>
<b-btn text="Button" @click="change" variant="success" v-show="changeShow">Change</b-btn>
</b-input-group-append>
<b-input-group-append>
<b-btn text="Button" variant="danger">Delete</b-btn>
</b-input-group-append>
</b-input-group>
</b-form>
</b-container>
</div>
如何仅禁用v-for
循环上的单击按钮?我只想简单地更改选定的按钮以禁用false。