From 779959d34b8d91e4b2c654a9a383da85ec0a2b54 Mon Sep 17 00:00:00 2001 From: fanfan Date: Fri, 17 May 2024 15:04:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/goods-sku-popup/index.vue | 6 +++++- pages/goods/components/SkuPopup.vue | 2 +- pages/goods/detail.vue | 8 ++++---- 3 files changed, 10 insertions(+), 6 deletions(-) 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'/>