diff --git a/components/goods-sku-popup/index.vue b/components/goods-sku-popup/index.vue index be440a5..547b046 100644 --- a/components/goods-sku-popup/index.vue +++ b/components/goods-sku-popup/index.vue @@ -343,10 +343,13 @@ district: '玄武区' } }, + stockValue: { + Type: String, + default: '有货' + }, }, data() { return { - stockValue: '有货', skuItem: '', userInfo: {}, complete: false, // 组件是否加载完成 @@ -477,6 +480,7 @@ title: "该商品暂时无货" }) } + console.log(that.stockValue) } }, // 初始化 diff --git a/pages/goods/components/SkuPopup.vue b/pages/goods/components/SkuPopup.vue index 45fc560..1632e56 100644 --- a/pages/goods/components/SkuPopup.vue +++ b/pages/goods/components/SkuPopup.vue @@ -4,7 +4,7 @@ :addCartColor="appTheme.viceText" :addCartBackgroundColor="appTheme.viceBg" :activedStyle="{ color: appTheme.mainBg, borderColor: appTheme.mainBg, backgroundColor: activedBtnBackgroundColor }" @open="openSkuPopup" @close="closeSkuPopup" @add-cart="addCart" @buy-now="buyNow" @num-change='numChange' - @selected-old='selectedOld' buyNowText="立即购买" :maxBuyNum="maxBuyNum" :addressResult='addressResult' /> + @selected-old='selectedOld' buyNowText="立即购买" :maxBuyNum="maxBuyNum" :addressResult='addressResult' :stockValue='stockValue'/>