<!-- 扫码添加 出现多个商品时的选择弹窗 -->
<uni-pop class="pop-max" ref="showScanGoods" :type="'center'" :mask-click="false">
<view class="modal-max">
<view class="title">请选择你需要的商品并确定</view>
<scroll-view scroll-y="true" class="scroll-Y">
<view class="ul">
<view class="li flexbetween" v-for="(item,index) in existProudctList" :key="index">
<view class="chek" @tap="radioChange(index)">
<checkbox :checked="item.checked" />
</view>
<view class="name">
{{ item.itemName}}
</view>
<view class="unit">
{{item.unitName}}
</view>
<view class="price">
{{item.retailPrice}}
</view>
</view>
</view>
</scroll-view>
<view class="max-btn">
<view @tap="modalMaxClose" class="left">取消</view>
<view @tap="modalMaxOk" class="right">确定</view>
</view>
</view>
</uni-pop>
//这里是正常的 打开,关闭
toScan() {
let that = this;
uni.scanCode({
scanType: ['barCode'],
success: function (res) {
console.log('条码类型:' + res.scanType);
console.log('条码内容:' + res.result);
if (res.result) {
//that.getScanGoods(res.result);
that .$refs['showScanGoods'].open();
}
}
});
},
modalMaxClose() {
this.$refs['showScanGoods'].close();
},
modalMaxOk() {
this.$refs['showScanGoods'].close();
},
2 个回复
lvlvlv (作者)
哦哦哦,用的popup插件太久远了,更新一下
或者插件 close、open方法里面修改一下
chenli
使用npm包就是最新版本的@dcloudio/uni-ui