Skip to content

Commit

Permalink
Merge pull request #15603 from handsomeliuyang/main
Browse files Browse the repository at this point in the history
默认走native,不走oschannel通道
  • Loading branch information
qican777 authored Apr 30, 2024
2 parents d99ed0c + 823d140 commit 1b55373
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 13 deletions.
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 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)
}

0 comments on commit 1b55373

Please sign in to comment.