feat: 使用InputNumber组件替换折扣输入框 (master)

在coupon-publish.vue中,将折扣输入框从Input组件更改为
InputNumber组件,以便更好地控制折扣值的输入范围。
This commit is contained in:
Chopper711 2024-12-23 11:51:05 +08:00
parent c5aaa2f3e2
commit 86426b087a
2 changed files with 14 additions and 12 deletions

View File

@ -36,14 +36,15 @@
prop="couponDiscount" prop="couponDiscount"
v-if="form.couponType == 'DISCOUNT'" v-if="form.couponType == 'DISCOUNT'"
> >
<Input <InputNumber
:disabled="disabled" :disabled="disabled"
type="number"
v-model="form.couponDiscount"
placeholder="折扣" placeholder="折扣"
clearable :max="9.9"
style="width: 260px" :min="0.1"
/> :step="0.1"
v-model="form.couponDiscount"
style="width: 260px">
</InputNumber>
<span class="describe">请输入0-10之间数字可以输入一位小数</span> <span class="describe">请输入0-10之间数字可以输入一位小数</span>
</FormItem> </FormItem>
<FormItem label="面额" prop="price" v-if="form.couponType == 'PRICE'"> <FormItem label="面额" prop="price" v-if="form.couponType == 'PRICE'">

View File

@ -32,14 +32,15 @@
</Select> </Select>
</FormItem> </FormItem>
<FormItem label="折扣" prop="discount" v-if="form.couponType == 'DISCOUNT'"> <FormItem label="折扣" prop="discount" v-if="form.couponType == 'DISCOUNT'">
<Input <InputNumber
:disabled="disabled" :disabled="disabled"
type="number"
v-model="form.couponDiscount"
placeholder="折扣" placeholder="折扣"
clearable :max="9.9"
style="width: 260px" :min="0.1"
/> :step="0.1"
v-model="form.couponDiscount"
style="width: 260px">
</InputNumber>
<span class="describe">请输入0-10之间数字可以输入一位小数</span> <span class="describe">请输入0-10之间数字可以输入一位小数</span>
</FormItem> </FormItem>
<FormItem label="面额" prop="price" v-if="form.couponType == 'PRICE'"> <FormItem label="面额" prop="price" v-if="form.couponType == 'PRICE'">