cb-biz-ui 1.1.5 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -79,7 +79,19 @@
|
|
|
79
79
|
<ui-icon name="add" :size="19" color="red"></ui-icon>
|
|
80
80
|
</view>
|
|
81
81
|
<view v-else class="number-box" @tap.stop="() => {}">
|
|
82
|
-
<
|
|
82
|
+
<uni-number-box
|
|
83
|
+
:value="goodsCount"
|
|
84
|
+
:min="0"
|
|
85
|
+
:max="
|
|
86
|
+
entity.unlimitedInventory
|
|
87
|
+
? 99999
|
|
88
|
+
: entity.inventoryCapacity || 100
|
|
89
|
+
"
|
|
90
|
+
:step="1"
|
|
91
|
+
@change="change"
|
|
92
|
+
></uni-number-box>
|
|
93
|
+
|
|
94
|
+
<!-- <ui-numberbox
|
|
83
95
|
:value="goodsCount"
|
|
84
96
|
:min="0"
|
|
85
97
|
:max="
|
|
@@ -96,7 +108,7 @@
|
|
|
96
108
|
:step="1"
|
|
97
109
|
:backgroundColor="textFontSize.numberBoxBg"
|
|
98
110
|
iconColor="#C7C7CC"
|
|
99
|
-
></ui-numberbox>
|
|
111
|
+
></ui-numberbox> -->
|
|
100
112
|
</view>
|
|
101
113
|
<ui-cubic-bezier
|
|
102
114
|
v-if="bezier"
|
|
@@ -205,14 +217,11 @@ const getDiscount = (discount: number | string) => {
|
|
|
205
217
|
return `${discount} 折`;
|
|
206
218
|
};
|
|
207
219
|
|
|
208
|
-
const change = (val:
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
// })
|
|
214
|
-
// }
|
|
215
|
-
emit('countChange', val, props.entity);
|
|
220
|
+
const change = (val: number) => {
|
|
221
|
+
if (val > props.entity.inventoryCapacity) {
|
|
222
|
+
triggerMax();
|
|
223
|
+
}
|
|
224
|
+
emit('countChange', { value: val, type: 'reduce', index: 0 }, props.entity);
|
|
216
225
|
};
|
|
217
226
|
|
|
218
227
|
const triggerMax = () => {
|