Эх сурвалжийг харах

feat: 优化金额自定义选择,支持仅输入一个

zhangyuhan 3 жил өмнө
parent
commit
84a44bad61

+ 2 - 1
src/components/selector/PriceInputGroup.vue

@@ -49,7 +49,8 @@ export default {
   methods: {
     compareMinMax () {
       const { min, max } = this.price
-      if (min > max) {
+      const hasMinAndMax = String(min).length && String(max).length
+      if (hasMinAndMax && min > max) {
         this.price.max = min
         this.price.min = max
       }

+ 1 - 1
src/components/selector/PriceSelectorContent.vue

@@ -2,7 +2,7 @@
   <div class="selector-content s-card" v-if="selectorType === 'card'" key="s-content">暂未提供</div>
   <div class="selector-content s-line" v-else-if="selectorType === 'line'" key="s-content">
     <RadioGroup :sourceList="priceList" v-model="radioActive" @onChange="radioChange" />
-    <PriceInputGroup :active="exact" @onConfirm="onExactConfirm" :allRequired="true" />
+    <PriceInputGroup :active="exact" @onConfirm="onExactConfirm" />
   </div>
 </template>