提交 fc9da06d 编写于 作者: D DCloud_LXH

fix(app): bluetooth getBluetoothAdapterState、getConnectedBluetoothDevices question/142669

上级 cc8fa0e6
...@@ -96,7 +96,9 @@ export const getBluetoothAdapterState = defineAsyncApi< ...@@ -96,7 +96,9 @@ export const getBluetoothAdapterState = defineAsyncApi<
typeof uni.getBluetoothAdapterState typeof uni.getBluetoothAdapterState
>( >(
'getBluetoothAdapterState', 'getBluetoothAdapterState',
warpPlusMethod(() => plus.bluetooth.getBluetoothAdapterState) warpPlusMethod(() =>
plus.bluetooth.getBluetoothAdapterState.bind(plus.bluetooth)
)
) )
export const startBluetoothDevicesDiscovery = export const startBluetoothDevicesDiscovery =
defineAsyncApi<API_TYPE_START_BLUETOOTH_DEVICES_DISCOVERY>( defineAsyncApi<API_TYPE_START_BLUETOOTH_DEVICES_DISCOVERY>(
...@@ -123,7 +125,9 @@ export const getBluetoothDevices = defineAsyncApi< ...@@ -123,7 +125,9 @@ export const getBluetoothDevices = defineAsyncApi<
export const getConnectedBluetoothDevices = export const getConnectedBluetoothDevices =
defineAsyncApi<API_TYPE_GET_CONNECTED_BLUETOOTH_DEVICES>( defineAsyncApi<API_TYPE_GET_CONNECTED_BLUETOOTH_DEVICES>(
API_GET_CONNECTED_BLUETOOTH_DEVICES, API_GET_CONNECTED_BLUETOOTH_DEVICES,
warpPlusMethod(() => plus.bluetooth.getConnectedBluetoothDevices), warpPlusMethod(() =>
plus.bluetooth.getConnectedBluetoothDevices.bind(plus.bluetooth)
),
GetConnectedBluetoothDevicesProtocol GetConnectedBluetoothDevicesProtocol
) )
export const createBLEConnection = export const createBLEConnection =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册