@ledvance/ui-biz-bundle 1.1.113 → 1.1.115
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 +1 -1
- package/src/modules/mood/FantasyMoodEditPage.tsx +1 -1
- package/src/modules/mood/MixMood/MixMoodEditPage.tsx +1 -1
- package/src/newModules/energyConsumption/EnergyConsumptionDetail.tsx +2 -2
- package/src/newModules/energyConsumption/EnergyConsumptionPage.tsx +2 -2
- package/src/newModules/energyConsumption/component/EnergyModal.tsx +13 -2
- package/src/newModules/mood/DynamicMoodEditorPage.tsx +1 -1
- package/src/newModules/mood/MixDynamicMoodEditor.tsx +1 -1
package/package.json
CHANGED
|
@@ -176,7 +176,7 @@ const FantasyMoodEditPage = () => {
|
|
|
176
176
|
|
|
177
177
|
const getSelectOther = useCallback((otherData) =>{
|
|
178
178
|
const currentOther = otherData.find(other => other.value === state.mood.expand)
|
|
179
|
-
return currentOther
|
|
179
|
+
return currentOther?.label || ''
|
|
180
180
|
}, [state.mood.expand])
|
|
181
181
|
|
|
182
182
|
const nameRepeat = useMemo(() => {
|
|
@@ -128,7 +128,7 @@ const RgbcMoodEditPage = () => {
|
|
|
128
128
|
|
|
129
129
|
const getSelectOther = useCallback((otherData) => {
|
|
130
130
|
const currentOther = otherData.find(other => other.value === state.secondlyLamp.expand)
|
|
131
|
-
return currentOther
|
|
131
|
+
return currentOther?.label || ''
|
|
132
132
|
}, [state.secondlyLamp.expand])
|
|
133
133
|
|
|
134
134
|
const checkMoodDataChanged = useMemo(() =>{
|
|
@@ -235,7 +235,7 @@ const EnergyConsumptionDetail = (props: {theme?: ThemeType}) => {
|
|
|
235
235
|
<Image
|
|
236
236
|
source={res.co2Icon}
|
|
237
237
|
resizeMode="contain"
|
|
238
|
-
style={{ height: cx(20), width: cx(20), tintColor: props.theme?.button.
|
|
238
|
+
style={{ height: cx(20), width: cx(20), tintColor: props.theme?.button.primary }}
|
|
239
239
|
/>
|
|
240
240
|
</TouchableOpacity>
|
|
241
241
|
</View>
|
|
@@ -317,7 +317,7 @@ const EnergyConsumptionDetail = (props: {theme?: ThemeType}) => {
|
|
|
317
317
|
...energyData,
|
|
318
318
|
price: exchangeNumber(energyData.price)
|
|
319
319
|
})
|
|
320
|
-
state.price = energyData.price
|
|
320
|
+
state.price = energyData.price || '0'
|
|
321
321
|
state.unit = energyData.unit
|
|
322
322
|
}
|
|
323
323
|
}}
|
|
@@ -129,7 +129,7 @@ const EnergyConsumptionPage = (props: {theme?: ThemeType}) => {
|
|
|
129
129
|
const res = await NativeApi.getJson(devId, 'energiepreise')
|
|
130
130
|
if (res.success && res.data) {
|
|
131
131
|
const v = JSON.parse(res.data)
|
|
132
|
-
state.price = v?.price
|
|
132
|
+
state.price = v?.price || '0'
|
|
133
133
|
state.unit = v?.unit
|
|
134
134
|
} else {
|
|
135
135
|
state.price = '0'
|
|
@@ -138,7 +138,7 @@ const EnergyConsumptionPage = (props: {theme?: ThemeType}) => {
|
|
|
138
138
|
|
|
139
139
|
const updateEnergyData = (data: EnergyData) => {
|
|
140
140
|
updatePrice(devId, data).then()
|
|
141
|
-
state.price = data.price
|
|
141
|
+
state.price = data.price || '0'
|
|
142
142
|
state.unit = data.unit
|
|
143
143
|
}
|
|
144
144
|
|
|
@@ -17,7 +17,16 @@ export const UnitList = [
|
|
|
17
17
|
I18n.getLang('consumption_data_price_per_kwh_currency_value1'),
|
|
18
18
|
I18n.getLang('consumption_data_price_per_kwh_currency_value2'),
|
|
19
19
|
I18n.getLang('consumption_data_price_per_kwh_currency_value3'),
|
|
20
|
-
I18n.getLang('consumption_data_price_per_kwh_currency_value4')
|
|
20
|
+
I18n.getLang('consumption_data_price_per_kwh_currency_value4'),
|
|
21
|
+
I18n.getLang('consumption_data_price_per_kwh_currency_value5'),
|
|
22
|
+
I18n.getLang('consumption_data_price_per_kwh_currency_value6'),
|
|
23
|
+
I18n.getLang('consumption_data_price_per_kwh_currency_value7'),
|
|
24
|
+
I18n.getLang('consumption_data_price_per_kwh_currency_value8'),
|
|
25
|
+
I18n.getLang('consumption_data_price_per_kwh_currency_value9'),
|
|
26
|
+
I18n.getLang('consumption_data_price_per_kwh_currency_value10'),
|
|
27
|
+
I18n.getLang('consumption_data_price_per_kwh_currency_value11'),
|
|
28
|
+
I18n.getLang('consumption_data_price_per_kwh_currency_value12'),
|
|
29
|
+
I18n.getLang('consumption_data_price_per_kwh_currency_value13'),
|
|
21
30
|
]
|
|
22
31
|
|
|
23
32
|
export interface EnergyData {
|
|
@@ -69,7 +78,7 @@ const EnergyModal = (props: EnergyModalProps) => {
|
|
|
69
78
|
|
|
70
79
|
useUpdateEffect(() =>{
|
|
71
80
|
state.energyData = cloneDeep(props.energyData)
|
|
72
|
-
}, [props.energyData])
|
|
81
|
+
}, [JSON.stringify(props.energyData)])
|
|
73
82
|
|
|
74
83
|
const styles = StyleSheet.create({
|
|
75
84
|
popupTip: {
|
|
@@ -168,6 +177,7 @@ const EnergyModal = (props: EnergyModalProps) => {
|
|
|
168
177
|
<Card>
|
|
169
178
|
<FlatList
|
|
170
179
|
data={UnitList}
|
|
180
|
+
initialNumToRender={15}
|
|
171
181
|
renderItem={({ item }) => (
|
|
172
182
|
<View style={styles.unitItem}>
|
|
173
183
|
<Text style={{ fontSize: cx(16), color: props.theme?.global.fontColor }}>{item}</Text>
|
|
@@ -227,6 +237,7 @@ const EnergyModal = (props: EnergyModalProps) => {
|
|
|
227
237
|
<Card>
|
|
228
238
|
<FlatList
|
|
229
239
|
data={UnitList}
|
|
240
|
+
initialNumToRender={15}
|
|
230
241
|
renderItem={({ item }) => (
|
|
231
242
|
<TouchableOpacity
|
|
232
243
|
onPress={() => {
|
|
@@ -121,7 +121,7 @@ const DynamicMoodEditorPage = (props: { theme?: ThemeType }) => {
|
|
|
121
121
|
|
|
122
122
|
const getSelectOther = useCallback((otherData, expand) => {
|
|
123
123
|
const currentOther = otherData.find(other => other.value === expand);
|
|
124
|
-
return currentOther
|
|
124
|
+
return currentOther?.label || '';
|
|
125
125
|
}, []);
|
|
126
126
|
|
|
127
127
|
const nameRepeat = useMemo(() => {
|
|
@@ -121,7 +121,7 @@ const MixDynamicMoodEditorPage = (props: { theme?: ThemeType }) => {
|
|
|
121
121
|
|
|
122
122
|
const getSelectOther = useCallback((otherData, expand) => {
|
|
123
123
|
const currentOther = otherData.find(other => other.value === expand);
|
|
124
|
-
return currentOther
|
|
124
|
+
return currentOther?.label || '';
|
|
125
125
|
}, []);
|
|
126
126
|
|
|
127
127
|
useUpdateEffect(() =>{
|