File tree Expand file tree Collapse file tree
packages/api-proxy/src/platform/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ import { noop } from '@mpxjs/utils'
33
44function showActionSheet ( options = { } ) {
55 const opts = changeOpts ( options , {
6- itemList : 'items'
6+ itemList : 'items' ,
7+ alertText : 'title'
78 } )
89
910 const cacheSuc = opts . success || noop
Original file line number Diff line number Diff line change 1+ import { ENV_OBJ , changeOpts } from '../../../common/js'
2+
3+ function createAnimation ( options = { } ) {
4+ const opts = changeOpts ( options , {
5+ timingFunction : 'timeFunction'
6+ } )
7+
8+ return ENV_OBJ . createAnimation ( opts )
9+ }
10+
11+ export {
12+ createAnimation
13+ }
Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ const oldObserveList = new Set()
55
66if ( isBrowser ) {
77 window . addEventListener ( 'offline' , ( ) => {
8- oldObserveList . forEach ( fn => fn ( { isConnected : false , type : 'none' } ) )
8+ oldObserveList . forEach ( fn => fn ( { isConnected : false , networkType : 'none' } ) )
99 } )
1010 window . addEventListener ( 'online' , ( ) => {
11- oldObserveList . forEach ( fn => fn ( { isConnected : true , type : 'unknow' } ) )
11+ oldObserveList . forEach ( fn => fn ( { isConnected : true , networkType : 'unknow' } ) )
1212 } )
1313}
1414
@@ -22,7 +22,7 @@ export function onNetworkStatusChange (callbackFn) {
2222 const isConnected = navigator . onLine
2323 callbackFn ( {
2424 isConnected,
25- type : isConnected ? evt . currentTarget . effectiveType : 'none'
25+ networkType : isConnected ? evt . currentTarget . effectiveType : 'none'
2626 } )
2727 }
2828 fnMap . set ( callbackFn , proxyCallback )
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ const getSystemInfoSync = function () {
1111 brand : DeviceInfo . getBrand ( ) ,
1212 model : DeviceInfo . getModel ( ) ,
1313 system : `${ DeviceInfo . getSystemName ( ) } ${ DeviceInfo . getSystemVersion ( ) } ` ,
14- platform : DeviceInfo . isEmulatorSync ( ) ? 'emulator' : DeviceInfo . getSystemName ( ) ,
14+ platform : DeviceInfo . isEmulatorSync ( ) ? 'emulator' : DeviceInfo . getSystemName ( ) . toLowerCase ( ) ,
1515 deviceOrientation : screenWidth > screenHeight ? 'portrait' : 'landscape' ,
1616 fontSizeSetting : PixelRatio . getFontScale ( )
1717 }
@@ -68,7 +68,7 @@ const getDeviceInfo = function () {
6868 brand : DeviceInfo . getBrand ( ) ,
6969 model : DeviceInfo . getModel ( ) ,
7070 system : `${ DeviceInfo . getSystemName ( ) } ${ DeviceInfo . getSystemVersion ( ) } ` ,
71- platform : DeviceInfo . isEmulatorSync ( ) ? 'emulator' : DeviceInfo . getSystemName ( ) ,
71+ platform : DeviceInfo . isEmulatorSync ( ) ? 'emulator' : DeviceInfo . getSystemName ( ) . toLowerCase ( ) ,
7272 memorySize : DeviceInfo . getTotalMemorySync ( ) / ( 1024 * 1024 )
7373 } )
7474 return deviceInfo
You can’t perform that action at this time.
0 commit comments