This commit is contained in:
3056762376@qq.com 2022-11-07 11:09:03 +08:00
parent 8887f4937d
commit 1bd62a211b
2 changed files with 6 additions and 2 deletions

View File

@ -60,3 +60,7 @@
[v-cloak] {
display: none;
}
.active{
color:#fff;
background-color: #ccc;
}

View File

@ -22,8 +22,8 @@
<td>{{item.author}}</td>
<td>{{item.num}}</td>
<td>
<button class="buy" @click="buy_item(item.id)">买入</button>
<button class="sale" @click="sale_item(item.id)">卖出</button>
<button class="buy" @click="buy_item(item.id)" :class="item.num>=10?'active':''">买入</button>
<button class="sale" @click="sale_item(item.id)" :class="item.num<=0?'active':''">卖出</button>
<button class="del" @click="remove(index)">删除</button>
</td>
</tr>