### feat: 优化优惠折扣输入组件 (master)

- 将`Input`组件替换为`InputNumber`组件,以确保输入的优惠折扣
  在0.1到9.9之间,并支持一位小数。
- 在`full-discount-add.vue`和`full-discount-detail.vue`文件中,
  更新了`FormItem`组件的`优惠折扣`输入逻辑。
- 在`coupon-publish.vue`文件中,更新了描述文本以强调输入
  范围和格式。
- 在`coupon.vue`文件中,修复了优惠券类型判断逻辑,增加了
  "DISCOUNT"类型和未知类型的处理。
This commit is contained in:
Chopper711
2025-02-21 17:34:58 +08:00
parent 376a3223dc
commit b4a706820e
5 changed files with 24 additions and 16 deletions

View File

@@ -42,10 +42,11 @@
:max="9.9"
:min="0.1"
:step="0.1"
precision="1"
v-model="form.couponDiscount"
style="width: 260px">
</InputNumber>
<span class="describe">请输入0-10之间数字以输入一位小数</span>
<span class="describe">请输入0-10数字,一位小数</span>
</FormItem>
<FormItem label="面额" prop="price" v-if="form.couponType == 'PRICE'">
<Input

View File

@@ -81,14 +81,14 @@
label="优惠折扣"
prop="fullRate"
>
<Input
type="text"
v-model="form.fullRate"
<InputNumber
placeholder="优惠折扣"
disabled
clearable
style="width: 260px"
/>
:max="9.9"
:min="0.1"
:step="0.1"
precision="1"
v-model="form.fullRate"
style="width: 260px"/>
<span class="describe">优惠折扣为0-10之间数字可有一位小数</span>
</FormItem>
<FormItem label="额外赠送">