[new feature] Sku: add hide-quota-text prop (#2216)

This commit is contained in:
刘建东
2018-12-04 20:01:49 +08:00
committed by neverland
parent a4431ddee5
commit fa4c44b688
5 changed files with 12 additions and 3 deletions
+7 -3
View File
@@ -19,7 +19,7 @@
{{ stockText }}
</div>
<div
v-if="quotaText"
v-if="!hideQuotaText && quotaText"
class="van-sku__quota"
>
{{ quotaText }}
@@ -43,14 +43,15 @@ export default create({
props: {
quota: Number,
hideQuotaText: Boolean,
quotaUsed: Number,
hideStock: Boolean,
skuEventBus: Object,
skuStockNum: Number,
selectedSku: Object,
selectedSkuComb: Object,
selectedNum: Number,
stepperTitle: String,
selectedSkuComb: Object,
disableStepperInput: Boolean,
customStepperConfig: Object
},
@@ -91,7 +92,10 @@ export default create({
},
quotaText() {
const { quotaText } = this.customStepperConfig;
const { quotaText, hideQuotaText } = this.customStepperConfig;
if (hideQuotaText) return '';
let text = '';
if (quotaText) {