Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

默认走native,不走oschannel通道 #15603

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2144,6 +2144,13 @@
"scroll-top": false
},
"custom-wrapper": true,
"draggable-sheet": {
"initial-child-size": false,
"min-child-size": false,
"max-child-size": false,
"snap": false,
"snap-sizes": false
},
"editor": {
"read-only": false,
"placeholder": false,
Expand All @@ -2169,12 +2176,29 @@
},
"args": false
},
"grid-builder": {
"type": {
"aligned": false,
"masonry": false
},
"list": false,
"child-count": false,
"cross-axis-count": false,
"max-cross-axis-extent": false,
"main-axis-gap": false,
"cross-axis-gap": false,
"padding": false
},
"grid-view": {
"type": false,
"cross-axis-count": false,
"main-axis-gap": false,
"cross-axis-gap": false,
"max-cross-axis-extent": false
"max-cross-axis-extent": false,
"type": {
"aligned": false,
"masonry": false
},
"padding": false
},
"icon": {
"type": {
Expand Down Expand Up @@ -2263,7 +2287,19 @@
},
"lifestyle": false,
"like": false,
"list-view": false,
"list-builder": {
"type": {
"static": false,
"dynamic": false
},
"list": false,
"child-count": false,
"child-height": false,
"padding": false
},
"list-view": {
"padding": false
},
"live-player": {
"src": true,
"mode": {
Expand Down Expand Up @@ -2495,7 +2531,23 @@
"hover-stay-time": false,
"short-link": false
},
"nested-scroll-body": false,
"nested-scroll-header": false,
"official-account": false,
"open-container": {
"transition-type": {
"fade": false,
"fadeThrough": false
},
"transition-duration": false,
"closed-color": false,
"closed-elevation": false,
"close-border-radius": false,
"middle-color": false,
"open-color": false,
"open-elevation": false,
"open-border-radius": false
},
"open-data": {
"type": {
"groupName": false,
Expand Down Expand Up @@ -2666,7 +2718,8 @@
"enable-passive": false,
"type": {
"list": false,
"custom": false
"custom": false,
"nested": false
},
"reverse": false,
"cache-extent": false,
Expand Down Expand Up @@ -2732,10 +2785,20 @@
"slot": {
"name": false
},
"snapshot": false,
"sticky-header": false,
"snapshot": {
"mode": {
"view": false,
"picture": false
}
},
"span": false,
"sticky-header": {
"offset-top": false,
"padding": false
},
"sticky-section": {
"push-pinned-header": false
"push-pinned-header": false,
"padding": false
},
"swiper": {
"indicator-dots": true,
Expand Down Expand Up @@ -2786,7 +2849,13 @@
"nbsp": false
},
"decode": false,
"max-lines": false
"max-lines": false,
"overflow": {
"clip": false,
"fade": false,
"ellipsis": false,
"visible": false
}
},
"textarea": {
"value": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import Taro from '@tarojs/api'
import { getAppAuthorizeSetting as nativeGetAppAuthorizeSetting } from './native'
import { getAppAuthorizeSetting as osChannelGetAppAuthorizeSetting } from './oschannel'

export const getAppAuthorizeSetting: typeof Taro.getAppAuthorizeSetting = (useNativeImpl: boolean = false) => {
export const getAppAuthorizeSetting: typeof Taro.getAppAuthorizeSetting = (useNativeImpl: boolean = true) => {
return useNativeImpl ? nativeGetAppAuthorizeSetting() : osChannelGetAppAuthorizeSetting()
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import Taro from '@tarojs/api'
import { getSystemSetting as nativeGetSystemSetting } from './native'
import { getSystemSetting as osChannelGetSystemSetting } from './oschannel'

export const getSystemSetting: typeof Taro.getSystemSetting = (useNativeImpl: boolean = false) => {
export const getSystemSetting: typeof Taro.getSystemSetting = (useNativeImpl: boolean = true) => {
return useNativeImpl ? nativeGetSystemSetting() : osChannelGetSystemSetting()
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import Taro from '@tarojs/api'


let display
let bluetooth
let geoLocationManager
let wifiManager

try {
// @ts-ignore
display = requireNapi('display')

// @ts-ignore
bluetooth = requireNapi('bluetooth')

Expand All @@ -14,7 +17,7 @@

// @ts-ignore
wifiManager = requireNapi('wifi')
} catch (error) {}

Check warning on line 20 in packages/taro-platform-harmony-hybrid/src/api/apis/base/getSystemSetting/oschannel.ts

View workflow job for this annotation

GitHub Actions / Testing on Node.js 16.x (windows-latest)

Empty block statement

Check warning on line 20 in packages/taro-platform-harmony-hybrid/src/api/apis/base/getSystemSetting/oschannel.ts

View workflow job for this annotation

GitHub Actions / Testing on Node.js 16.x (macos-11)

Empty block statement

Check warning on line 20 in packages/taro-platform-harmony-hybrid/src/api/apis/base/getSystemSetting/oschannel.ts

View workflow job for this annotation

GitHub Actions / Testing on Node.js 16.x (ubuntu-latest)

Empty block statement

Check warning on line 20 in packages/taro-platform-harmony-hybrid/src/api/apis/base/getSystemSetting/oschannel.ts

View workflow job for this annotation

GitHub Actions / Testing on Node.js 16.x (ubuntu-latest)

Empty block statement

// @ts-ignore
export const getSystemSetting: typeof Taro.getSystemSetting = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import { hideKeyboard as nativeHideKeyboard } from './native'
import { hideKeyboard as osChannelHideKeyboard } from './oschannel'


export const hideKeyboard: typeof Taro.hideKeyboard = (options, useNativeImpl: boolean = false) => {
export const hideKeyboard: typeof Taro.hideKeyboard = (options, useNativeImpl: boolean = true) => {
return useNativeImpl ? nativeHideKeyboard(options) : osChannelHideKeyboard(options)
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import Taro from '@tarojs/api'
import { makePhoneCall as nativeMakePhoneCall } from './native'
import { makePhoneCall as osChannelMakePhoneCall } from './oschannel'

export const makePhoneCall: typeof Taro.makePhoneCall = (options, useNativeImpl = false) => {
export const makePhoneCall: typeof Taro.makePhoneCall = (options, useNativeImpl = true) => {
return useNativeImpl ? nativeMakePhoneCall(options) : osChannelMakePhoneCall(options)
}
Loading