This commit is contained in:
parent
c020ba7513
commit
bbff5152a9
|
@ -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="digit" border="none"
|
||||
<up-input v-model="datas.cart_num" :cursorSpacing='120' type="number" 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="digit" border="none"
|
||||
<up-input v-model="datas.cart_num" :cursorSpacing='120' type="number" border="none"
|
||||
placeholder="请输入购买数量" inputAlign="right">
|
||||
<template #suffix>
|
||||
<span style="color: #20b128;">{{datas.unit_name}}</span>
|
||||
|
@ -74,9 +74,8 @@
|
|||
});
|
||||
const setData = (e) => {
|
||||
datas.value = e;
|
||||
if (Number(e.batch) > 0) datas.value.cart_num = e.batch;
|
||||
if (Number(e.batch) > 0) datas.value.cart_num = Number(e.batch).toFixed(0);
|
||||
else datas.value.cart_num = '';
|
||||
|
||||
}
|
||||
|
||||
const emit = defineEmits(['close', 'change']);
|
||||
|
|
Loading…
Reference in New Issue