|
|
@@ -40,10 +40,15 @@
|
|
|
</text>
|
|
|
<i class="iconfont iconzeng" @click.stop="addEvents(info.variety)"></i>
|
|
|
</view>
|
|
|
- <template v-if="showStock && showStock == '1'">
|
|
|
+ <stock v-if="showStock && showStock == '1'">
|
|
|
<text v-if="Number(info.stock) > Number(info.stockWarning)" style="color:#333;margin-right:65upx;">还剩 {{ parseFloat(info.stock) }}</text>
|
|
|
<text v-else style="color:red;font-weight:bold;margin-right:65upx;">还剩 {{ parseFloat(info.stock) }}</text>
|
|
|
- </template>
|
|
|
+ </stock>
|
|
|
+ <stock v-else>
|
|
|
+ <stock v-if="showSold && showSold == '1'">
|
|
|
+ <text style="color:#333;margin-right:65upx;">已售 {{ info.actualSold ? parseInt(info.actualSold):0 }}</text>
|
|
|
+ </stock>
|
|
|
+ </stock>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -70,6 +75,10 @@ export default {
|
|
|
type: Number,
|
|
|
default: 0
|
|
|
},
|
|
|
+ showSold:{
|
|
|
+ type: String,
|
|
|
+ default: '0'
|
|
|
+ },
|
|
|
showStock:{
|
|
|
type: String,
|
|
|
default: '0'
|