修复bug

This commit is contained in:
weipengfei 2024-06-21 16:03:17 +08:00
parent 4220fd42ad
commit c020ba7513
1 changed files with 4 additions and 4 deletions

View File

@ -26,14 +26,14 @@
<view v-if="datas.is_bulk" class="row"> <view v-if="datas.is_bulk" class="row">
<view>购买重量<text style="color: #F55726;">*</text></view> <view>购买重量<text style="color: #F55726;">*</text></view>
<view style="flex: 1;"> <view style="flex: 1;">
<up-input v-model="datas.cart_num" :cursorSpacing='120' type="number" border="none" <up-input v-model="datas.cart_num" :cursorSpacing='120' type="digit" border="none"
placeholder="请输入购买重量" inputAlign="right"></up-input> placeholder="请输入购买重量" inputAlign="right"></up-input>
</view> </view>
</view> </view>
<view v-else class="row"> <view v-else class="row">
<view>购买数量<text style="color: #F55726;">*</text></view> <view>购买数量<text style="color: #F55726;">*</text></view>
<view style="flex: 1;"> <view style="flex: 1;">
<up-input v-model="datas.cart_num" :cursorSpacing='120' type="number" border="none" <up-input v-model="datas.cart_num" :cursorSpacing='120' type="digit" border="none"
placeholder="请输入购买数量" inputAlign="right"> placeholder="请输入购买数量" inputAlign="right">
<template #suffix> <template #suffix>
<span style="color: #20b128;">{{datas.unit_name}}</span> <span style="color: #20b128;">{{datas.unit_name}}</span>
@ -73,10 +73,10 @@
cart_num: '' cart_num: ''
}); });
const setData = (e) => { const setData = (e) => {
console.log(e);
datas.value = e; datas.value = e;
if (e.batch) datas.value.cart_num = e.batch; if (Number(e.batch) > 0) datas.value.cart_num = e.batch;
else datas.value.cart_num = ''; else datas.value.cart_num = '';
} }
const emit = defineEmits(['close', 'change']); const emit = defineEmits(['close', 'change']);