修复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>购买重量<text style="color: #F55726;">*</text></view>
<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>
</view>
</view>
<view v-else class="row">
<view>购买数量<text style="color: #F55726;">*</text></view>
<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">
<template #suffix>
<span style="color: #20b128;">{{datas.unit_name}}</span>
@ -73,10 +73,10 @@
cart_num: ''
});
const setData = (e) => {
console.log(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 = '';
}
const emit = defineEmits(['close', 'change']);