sprintify-ui 0.0.149 → 0.0.150
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.
- package/dist/sprintify-ui.es.js +945 -941
- package/package.json +1 -1
- package/src/components/BaseNumber.vue +10 -3
package/package.json
CHANGED
|
@@ -233,18 +233,25 @@ function onKeydown(e: KeyboardEvent) {
|
|
|
233
233
|
emit('keydown', e);
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
+
const defaultValue = computed<number>(() => {
|
|
237
|
+
return Math.max(0, props.min ?? 0);
|
|
238
|
+
});
|
|
239
|
+
|
|
236
240
|
function updateInternalValueToRealValue() {
|
|
237
241
|
if (realValueInternal.value === null) {
|
|
238
242
|
valueInternal.value = '';
|
|
239
243
|
return;
|
|
240
244
|
}
|
|
241
|
-
valueInternal.value = round(
|
|
245
|
+
valueInternal.value = round(
|
|
246
|
+
realValueInternal.value ?? defaultValue.value,
|
|
247
|
+
precision.value
|
|
248
|
+
);
|
|
242
249
|
}
|
|
243
250
|
|
|
244
251
|
function increment() {
|
|
245
252
|
if (props.disabled) return;
|
|
246
253
|
if (realValueInternal.value === null) {
|
|
247
|
-
valueInternal.value =
|
|
254
|
+
valueInternal.value = defaultValue.value;
|
|
248
255
|
} else {
|
|
249
256
|
const newValue = round(
|
|
250
257
|
realValueInternal.value + props.step,
|
|
@@ -260,7 +267,7 @@ function increment() {
|
|
|
260
267
|
function decrement() {
|
|
261
268
|
if (props.disabled) return;
|
|
262
269
|
if (realValueInternal.value === null) {
|
|
263
|
-
valueInternal.value =
|
|
270
|
+
valueInternal.value = defaultValue.value;
|
|
264
271
|
} else {
|
|
265
272
|
const newValue = round(
|
|
266
273
|
realValueInternal.value - props.step,
|