提交 6a466f90 authored 作者: 刘旭's avatar 刘旭

修改数量bug

上级 1404cb95
......@@ -84,9 +84,10 @@
<view class="number-box-view">
<view style="flex: 1;">数量</view>
<view style="flex: 4;text-align: right;">
<vk-data-input-number-box v-model="selectNum" :min="minBuyNum || 1"
:max="maxBuyNumCom" :step="stepBuyNum || 1" :step-strictly="stepStrictly"
:positive-integer="true" @change="numChange"></vk-data-input-number-box>
<vk-data-input-number-box ref="numberRef" v-model="selectNum"
:min="minBuyNum || 1" :max="maxBuyNumCom" :step="stepBuyNum || 1"
:step-strictly="stepStrictly" :positive-integer="true" @change="numChange">
</vk-data-input-number-box>
</view>
</view>
</view>
......@@ -918,6 +919,11 @@ export default {
},
});
},
initnum() {
this.selectNum = 1
this.$refs.numberRef.inputVal = 1
console.log(this.selectNum, 'selectNum');
},
addProduct() {
let that = this;
that.checkSelectComplete({
......
......@@ -11,7 +11,7 @@
</template>
<script setup lang="ts">
import { ref, watch } from 'vue';
import { nextTick, ref, watch } from 'vue';
import { addCart, fastaddCart, readdCart } from '@/api/index';
import { useSpecStore } from '@/store/useStore';
......@@ -161,13 +161,18 @@ let init = (data: any, id: number, partsData?: any) => {
// resultSku()
};
// sku组件 开始-----------------------------------------------------------
let onOpenSkuPopup = () => { };
let onOpenSkuPopup = () => {
};
// 关闭弹窗
let SkuPopup = (e: any) => {
emits('close-sku', e)
};
const initnum = () => {
skuPopupRef.value.initnum()
}
// 选择自定义规格后的逻辑
let custom = (selectShop: any) => {
let flag = false // 判断是否填写了自定义
......@@ -386,7 +391,8 @@ defineExpose({
defaultNotAllSelect,
init,
handleClose,
onPlus
onPlus,
initnum
});
</script>
......
......@@ -227,6 +227,7 @@ let addProduct = (data: any, productId: number, specifications: any, specificati
});
}
goodsSkuRef.value.skuKey = false;
goodsSkuRef.value.initnum()
sheetData.value.delIndex = undefined
} else {
obj['direction'] = 0
......@@ -238,11 +239,11 @@ let addProduct = (data: any, productId: number, specifications: any, specificati
lineData: lineList.value,
});
goodsSkuRef.value.skuKey = false;
goodsSkuRef.value.initnum()
}
})
}
})
console.log(lineList.value, 'lineList.value');
};
// 匹配规格 SDTrack: 单线体/双线体 size: 长度(MM) Segs: 分段数
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论