-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: [harmony-hybrid]修复部分API调用原生报错问题
- Loading branch information
1 parent
50bd2a9
commit 73f86b8
Showing
42 changed files
with
263 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 2 additions & 8 deletions
10
packages/taro-platform-harmony-hybrid/src/api/apis/device/memory/offMemoryWarning.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,11 @@ | ||
import Taro from '@tarojs/taro' | ||
|
||
import native from '../../NativeApi' | ||
|
||
/** | ||
* 取消监听内存不足告警事件 | ||
* | ||
* @canUse offMemoryWarning | ||
* @null_implementation | ||
*/ | ||
export const offMemoryWarning: typeof Taro.offMemoryWarning = (callback) => { | ||
// @ts-ignore | ||
if (native[offMemoryWarning]) { | ||
// @ts-ignore | ||
native.offMemoryWarning(callback) | ||
} | ||
export const offMemoryWarning: typeof Taro.offMemoryWarning = (_callback) => { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
packages/taro-platform-harmony-hybrid/src/api/apis/device/wifi/NativeWifi.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { asyncAndNotRelease, asyncAndRelease } from '../../harmony-native/ApiDecorator' | ||
|
||
class NativeWifi { | ||
@asyncAndRelease | ||
connectWifi (_options: any):void {} | ||
|
||
@asyncAndRelease | ||
getConnectedWifi (_options: any):void {} | ||
|
||
@asyncAndRelease | ||
getWifiList (_options: any):void {} | ||
|
||
@asyncAndRelease | ||
offGetWifiList (_options: any):void {} | ||
|
||
@asyncAndRelease | ||
offWifiConnected (_options: any):void {} | ||
|
||
@asyncAndRelease | ||
offWifiConnectedWithPartialInfo (_options: any):void {} | ||
|
||
@asyncAndNotRelease | ||
onGetWifiList (_options: any):void {} | ||
|
||
@asyncAndNotRelease | ||
onWifiConnected (_options: any):void {} | ||
|
||
@asyncAndNotRelease | ||
onWifiConnectedWithPartialInfo (_options: any):void {} | ||
|
||
@asyncAndRelease | ||
startWifi (_options: any):void {} | ||
|
||
@asyncAndRelease | ||
stopWifi (_options: any):void {} | ||
} | ||
|
||
const nativeWifi = new NativeWifi() | ||
|
||
export default nativeWifi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.