請教一下開源V5.4.0版,商品詳情頁,選擇商品規(guī)格,規(guī)格列表中,如何判斷當前規(guī)格庫存為0?
想加個判斷,讓此規(guī)格顯示灰色或者不可點擊呢?
<view class="itemn" :class="item.index === itemn.attr ? 'on' : ''"
v-for="(itemn, indexn) in item.attr_value" @click="tapAttr(indexw, indexn)"
:key="indexn">
{{ $t(itemn.attr) }}
</view>
相關文件:template\uni-app\components\productWindow\index.vue