@eturnity/eturnity_reusable_components 6.48.0-EPDM-8891.3 → 6.48.0-EPDM-8891.4
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/package.json
CHANGED
@@ -83,6 +83,7 @@
|
|
83
83
|
// inputWidth="150px" //by default, this is 100%
|
84
84
|
// minWidth="100px"
|
85
85
|
// :numberPrecision="3"
|
86
|
+
// minDecimals="2"
|
86
87
|
// unitName="pc"
|
87
88
|
// :value="inputValue" //required -- String
|
88
89
|
// @input-change="onInputChange($event)" //required
|
@@ -357,6 +358,10 @@ export default {
|
|
357
358
|
required: false,
|
358
359
|
default: 0
|
359
360
|
},
|
361
|
+
minDecimals: {
|
362
|
+
required: false,
|
363
|
+
default: 0
|
364
|
+
},
|
360
365
|
unitName: {
|
361
366
|
required: false,
|
362
367
|
default: ''
|
@@ -497,7 +502,8 @@ export default {
|
|
497
502
|
} else {
|
498
503
|
let num = stringToNumber({
|
499
504
|
value: item,
|
500
|
-
numberPrecision: false
|
505
|
+
numberPrecision: false,
|
506
|
+
minDecimals: this.minDecimals
|
501
507
|
})
|
502
508
|
return num
|
503
509
|
}
|
@@ -508,7 +514,8 @@ export default {
|
|
508
514
|
if (typeof evaluated === 'string') {
|
509
515
|
evaluated = stringToNumber({
|
510
516
|
value: evaluated,
|
511
|
-
numberPrecision: this.numberPrecision
|
517
|
+
numberPrecision: this.numberPrecision,
|
518
|
+
minDecimals: this.minDecimals
|
512
519
|
})
|
513
520
|
} else if (typeof evaluated === 'number') {
|
514
521
|
evaluated = evaluated.toFixed(this.numberPrecision)
|
@@ -568,7 +575,8 @@ export default {
|
|
568
575
|
: this.defaultNumber
|
569
576
|
? this.defaultNumber
|
570
577
|
: this.minNumber,
|
571
|
-
numberPrecision: this.numberPrecision
|
578
|
+
numberPrecision: this.numberPrecision,
|
579
|
+
minDecimals: this.minDecimals
|
572
580
|
})
|
573
581
|
}
|
574
582
|
let adjustedMinValue =
|
@@ -613,7 +621,8 @@ export default {
|
|
613
621
|
let input = this.numberToStringEnabled
|
614
622
|
? numberToString({
|
615
623
|
value: adjustedMinValue,
|
616
|
-
numberPrecision: this.numberPrecision
|
624
|
+
numberPrecision: this.numberPrecision,
|
625
|
+
minDecimals: this.minDecimals
|
617
626
|
})
|
618
627
|
: adjustedMinValue
|
619
628
|
let unit = this.showLinearUnitName ? '' : this.unitName
|
@@ -625,7 +634,8 @@ export default {
|
|
625
634
|
return this.numberToStringEnabled
|
626
635
|
? numberToString({
|
627
636
|
value: adjustedMinValue,
|
628
|
-
numberPrecision: this.numberPrecision
|
637
|
+
numberPrecision: this.numberPrecision,
|
638
|
+
minDecimals: this.minDecimals
|
629
639
|
})
|
630
640
|
: adjustedMinValue
|
631
641
|
}
|
@@ -644,7 +654,8 @@ export default {
|
|
644
654
|
|
645
655
|
this.textInput = numberToString({
|
646
656
|
value: value && value.length ? value : this.minNumber,
|
647
|
-
numberPrecision: this.numberPrecision
|
657
|
+
numberPrecision: this.numberPrecision,
|
658
|
+
minDecimals: this.minDecimals
|
648
659
|
})
|
649
660
|
//this.value=value
|
650
661
|
},
|
@@ -659,17 +670,20 @@ export default {
|
|
659
670
|
if (this.value) {
|
660
671
|
this.textInput = numberToString({
|
661
672
|
value: this.value,
|
662
|
-
numberPrecision: this.numberPrecision
|
673
|
+
numberPrecision: this.numberPrecision,
|
674
|
+
minDecimals: this.minDecimals
|
663
675
|
})
|
664
676
|
} else if (this.defaultNumber !== null) {
|
665
677
|
this.textInput = numberToString({
|
666
678
|
value: this.defaultNumber,
|
667
|
-
numberPrecision: this.numberPrecision
|
679
|
+
numberPrecision: this.numberPrecision,
|
680
|
+
minDecimals: this.minDecimals
|
668
681
|
})
|
669
682
|
} else if (this.minNumber !== null) {
|
670
683
|
this.textInput = numberToString({
|
671
684
|
value: this.minNumber,
|
672
|
-
numberPrecision: this.numberPrecision
|
685
|
+
numberPrecision: this.numberPrecision,
|
686
|
+
minDecimals: this.minDecimals
|
673
687
|
})
|
674
688
|
}
|
675
689
|
},
|