@eturnity/eturnity_reusable_components 7.51.8 → 7.51.9
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
@@ -119,7 +119,7 @@
|
|
119
119
|
{{
|
120
120
|
numberToString({
|
121
121
|
value: item.pacKw,
|
122
|
-
numberPrecision:
|
122
|
+
numberPrecision: getNumberPrecision(item.pacKw),
|
123
123
|
minDecimals: 0,
|
124
124
|
})
|
125
125
|
}}
|
@@ -135,7 +135,7 @@
|
|
135
135
|
{{
|
136
136
|
numberToString({
|
137
137
|
value: item.inputMaxPowerKw,
|
138
|
-
numberPrecision:
|
138
|
+
numberPrecision: getNumberPrecision(item.inputMaxPowerKw),
|
139
139
|
minDecimals: 0,
|
140
140
|
})
|
141
141
|
}}
|
@@ -148,7 +148,7 @@
|
|
148
148
|
{{
|
149
149
|
numberToString({
|
150
150
|
value: item.chargingAcPowerKva,
|
151
|
-
numberPrecision:
|
151
|
+
numberPrecision: getNumberPrecision(item.chargingAcPowerKva),
|
152
152
|
minDecimals: 0,
|
153
153
|
})
|
154
154
|
}}
|
@@ -416,7 +416,6 @@
|
|
416
416
|
import styled from 'vue3-styled-components'
|
417
417
|
import RCIcon from '../../icon'
|
418
418
|
import ButtonIcon from '../../buttons/buttonIcon'
|
419
|
-
import InfoText from '../../infoText'
|
420
419
|
import { numberToString } from '../../../helpers/numberConverter'
|
421
420
|
|
422
421
|
const PageContainer = styled.div`
|
@@ -706,13 +705,6 @@
|
|
706
705
|
margin-top: 8px;
|
707
706
|
`
|
708
707
|
|
709
|
-
const InfoWrapper = styled.div`
|
710
|
-
display: flex;
|
711
|
-
align-items: center;
|
712
|
-
justify-content: center;
|
713
|
-
width: 32px;
|
714
|
-
`
|
715
|
-
|
716
708
|
export default {
|
717
709
|
name: 'DropdownMenu',
|
718
710
|
components: {
|
@@ -755,8 +747,6 @@
|
|
755
747
|
UnassignedModel,
|
756
748
|
IconPlaceholder,
|
757
749
|
EmptyStringBox,
|
758
|
-
InfoText,
|
759
|
-
InfoWrapper,
|
760
750
|
MarkerText,
|
761
751
|
},
|
762
752
|
props: {
|
@@ -854,6 +844,18 @@
|
|
854
844
|
100 * currentTargetRatio
|
855
845
|
)
|
856
846
|
},
|
847
|
+
getNumberPrecision(value) {
|
848
|
+
if (typeof value === 'string') {
|
849
|
+
value = Number(value)
|
850
|
+
}
|
851
|
+
if (value < 10) {
|
852
|
+
return 2
|
853
|
+
} else if (value >= 10 && value < 100) {
|
854
|
+
return 1
|
855
|
+
} else {
|
856
|
+
return 0
|
857
|
+
}
|
858
|
+
},
|
857
859
|
getNumberOfMpptModules(strings) {
|
858
860
|
return strings.reduce((acc, curr) => acc + curr.modules.length, 0)
|
859
861
|
},
|