@aks-dev/easyui 1.0.106 → 1.0.108

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
  * @Author: shiguo
3
3
  * @Date: 2022-04-25 17:57:29
4
4
  * @LastEditors: shiguo
5
- * @LastEditTime: 2022-07-07 10:40:51
5
+ * @LastEditTime: 2022-10-24 16:08:50
6
6
  * @FilePath: /@aks-dev/easyui/android/src/main/java/com/easyui/RNEasyuiModule.java
7
7
  */
8
8
 
@@ -16,6 +16,7 @@ import com.facebook.react.bridge.Promise;
16
16
  import com.facebook.react.bridge.ReactApplicationContext;
17
17
  import com.facebook.react.bridge.ReactContextBaseJavaModule;
18
18
  import com.facebook.react.bridge.ReactMethod;
19
+ import android.os.Build;
19
20
 
20
21
  public class RNEasyuiModule extends ReactContextBaseJavaModule {
21
22
 
@@ -32,6 +33,11 @@ public class RNEasyuiModule extends ReactContextBaseJavaModule {
32
33
  }
33
34
 
34
35
 
36
+ @ReactMethod
37
+ public void getDeviceBrand(Promise promise) {
38
+ promise.resolve( Build.BRAND+ Build.MODEL);
39
+ }
40
+
35
41
  @Deprecated
36
42
  @ReactMethod
37
43
  public void getStatusBarHeight(final Promise promise) {
@@ -48,6 +54,9 @@ public class RNEasyuiModule extends ReactContextBaseJavaModule {
48
54
  }
49
55
 
50
56
 
57
+
58
+
59
+
51
60
  @Deprecated
52
61
  @ReactMethod
53
62
  public void getNavigationBarHeight(final Promise promise) {
@@ -2,7 +2,7 @@
2
2
  * @Author: shiguo
3
3
  * @Date: 2022-05-05 13:57:25
4
4
  * @LastEditors: shiguo
5
- * @LastEditTime: 2022-06-08 10:55:21
5
+ * @LastEditTime: 2022-10-24 16:07:27
6
6
  * @FilePath: /@aks-dev/easyui/android/src/main/java/com/easyui/UpgradeModule.java
7
7
  */
8
8
  package com.easyui;
@@ -100,6 +100,11 @@ public class UpgradeModule extends ReactContextBaseJavaModule {
100
100
  promise.resolve(this.getAppVersionName());
101
101
  }
102
102
 
103
+ @ReactMethod
104
+ public void getOSVersion(Promise promise) {
105
+ promise.resolve(android.os.Build.VERSION.RELEASE);
106
+ }
107
+
103
108
 
104
109
  @ReactMethod
105
110
  public void upgrade(final ReadableMap info, final Promise promise) {
package/ios/RNEasyui.m CHANGED
@@ -1,5 +1,6 @@
1
1
 
2
2
  #import "RNEasyui.h"
3
+ #import "RomUtil.h"
3
4
 
4
5
  @implementation RNEasyui
5
6
 
@@ -9,5 +10,11 @@
9
10
  }
10
11
  RCT_EXPORT_MODULE()
11
12
 
13
+ RCT_EXPORT_METHOD(getDeviceBrand:(RCTPromiseResolveBlock)resolve
14
+ reject:(RCTPromiseRejectBlock)reject){
15
+ resolve([RomUtil getCurrentDeviceModel]);
16
+ }
17
+
18
+
12
19
  @end
13
20
 
@@ -2,7 +2,7 @@
2
2
  * @Author: shiguo
3
3
  * @Date: 2022-04-19 10:23:01
4
4
  * @LastEditors: shiguo
5
- * @LastEditTime: 2022-07-07 10:41:19
5
+ * @LastEditTime: 2022-10-24 16:14:40
6
6
  * @FilePath: /@aks-dev/easyui/jsbridge/RNEasyui.ts
7
7
  */
8
8
 
@@ -12,6 +12,9 @@ const { RNEasyui } = NativeModules;
12
12
 
13
13
 
14
14
 
15
+ export const getDeviceBrand = () => RNEasyui.getDeviceBrand();
16
+
17
+
15
18
 
16
19
  export const getStatusBarHeight = () => {
17
20
  if (Platform.OS == 'android') return RNEasyui.getStatusBarHeight();
@@ -2,8 +2,8 @@
2
2
  * @Author: shiguo
3
3
  * @Date: 2022-05-05 14:19:39
4
4
  * @LastEditors: shiguo
5
- * @LastEditTime: 2022-05-24 14:08:49
6
- * @FilePath: /@aks-dev/easyui/jsbridge/UpgradeModule.tsx
5
+ * @LastEditTime: 2022-10-24 16:13:01
6
+ * @FilePath: /@aks-dev/easyui/jsbridge/UpgradeModule.ts
7
7
  */
8
8
  import { NativeModules, PermissionsAndroid, Platform } from 'react-native';
9
9
 
@@ -13,6 +13,7 @@ import type { UpgradeOptions } from '.'
13
13
 
14
14
  export const getAppVersion = () => UpgradeModule.getAppVersion();
15
15
 
16
+ export const getOSVersion = () => UpgradeModule.getOSVersion();
16
17
 
17
18
  export const upgrade = async (options: UpgradeOptions ) => {
18
19
  const { title = '提示' } = options
package/jsbridge/index.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * @Author: shiguo
3
3
  * @Date: 2022-04-19 10:23:01
4
4
  * @LastEditors: shiguo
5
- * @LastEditTime: 2022-07-07 10:41:01
5
+ * @LastEditTime: 2022-10-24 16:38:59
6
6
  * @FilePath: /@aks-dev/easyui/jsbridge/index.ts
7
7
  */
8
8
 
@@ -14,6 +14,20 @@
14
14
  */
15
15
  export declare const getAppVersion: () => Promise<string>;
16
16
 
17
+ /**
18
+ * @description: 获取操作系统版本
19
+ *
20
+ react-native-device-info
21
+ * @return {*}
22
+ */
23
+ export declare const getOSVersion: () => Promise<string>;
24
+
25
+ /**
26
+ * @description: 获取设备品牌
27
+ * @return {*}
28
+ */
29
+ export declare const getDeviceBrand: () => Promise<string>;
30
+
17
31
 
18
32
  export declare type UpgradeOptions = {
19
33
  title?: string;
@@ -13,7 +13,7 @@ import { TableCellProps } from './index'
13
13
  export default (props: Partial<TableCellProps>) => {
14
14
  const { showNav = false, activeOpacity = .8 } = props
15
15
  return (
16
- <TouchableOpacity activeOpacity={activeOpacity}
16
+ <TouchableOpacity activeOpacity={props.onPress == undefined ? activeOpacity : 1}
17
17
  style={[styles.container, props.style]}
18
18
  disabled={props.onPress == undefined}
19
19
  onPress={() => props.onPress && props.onPress()}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aks-dev/easyui",
3
- "version": "1.0.106",
3
+ "version": "1.0.108",
4
4
  "description": "工具箱",
5
5
  "main": "./src/index.ts",
6
6
  "typings": "./src/index.d.ts",