@ledvance/base 1.1.9 → 1.1.11

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.
@@ -199,12 +199,13 @@ export function useUAGroupInfo(): UAGroupInfo {
199
199
  }
200
200
 
201
201
  export function useGroupConfig<T>(): [T, (dps: any, newConfig: T) => Promise<Result<any>>] {
202
+ const tyGroupId = useUAGroupInfo().tyGroupId
202
203
  const config = useUAGroupInfo().config as T
203
204
  const dispatch = useDispatch()
204
205
  const {setGroupConfig} = nativePropsSlice.actions
205
206
  const setConfig = useCallback(async (dps: any, newConfig: T) => {
206
207
  // 发送控制命令
207
- const res = await NativeApi.groupControl(JSON.stringify(dps), JSON.stringify(newConfig))
208
+ const res = await NativeApi.groupControl(tyGroupId, JSON.stringify(dps), JSON.stringify(newConfig))
208
209
  if (res.success) {
209
210
  // 只在结果成功时才改变 redux 数据
210
211
  dispatch(setGroupConfig(newConfig))
@@ -27,7 +27,7 @@ declare const _default: {
27
27
  add: string;
28
28
  delete: string;
29
29
  icon_edit_scene: string;
30
- device_panel_timer_add: string;
30
+ device_panel_timer_add: any;
31
31
  device_panel_schedule_add: string;
32
32
  device_panel_schedule_alert: string;
33
33
  ic_arrows_nav_clear: any;
package/src/res/index.ts CHANGED
@@ -27,7 +27,7 @@ export default {
27
27
  add: 'add',
28
28
  delete: 'delete',
29
29
  icon_edit_scene: 'icon_edit_scene',
30
- device_panel_timer_add: 'device_panel_timer_add',
30
+ device_panel_timer_add: require('./materialiconsOutlinedArrowsNavAddBox.png'),
31
31
  device_panel_schedule_add: 'device_panel_schedule_add',
32
32
  device_panel_schedule_alert: 'device_panel_schedule_alert',
33
33
  ic_arrows_nav_clear: require('./materialiconsFilledCancel.png'),