@aks-dev/easyui 1.0.10 → 1.0.13
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.
- package/README.md +3 -3
- package/lib/Easy-Hud/AlertView/AlertView.tsx +1 -1
- package/lib/Easy-Hud/AlertView/index.ts +3 -3
- package/lib/Easy-Hud/EasyHud.tsx +8 -8
- package/lib/Easy-Hud/Loading/Loading.tsx +5 -5
- package/lib/Easy-Hud/Loading/index.ts +5 -5
- package/lib/Easy-Hud/Toast/Toast.tsx +4 -4
- package/lib/Easy-Hud/Toast/index.ts +4 -4
- package/lib/MutiPictureView/MutiPictureView.tsx +2 -2
- package/lib/index.md +15 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-04-25 17:57:29
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-05-
|
|
5
|
+
* @LastEditTime: 2022-05-12 10:57:01
|
|
6
6
|
* @FilePath: /@aks/easyui/README.md
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
### 安装
|
|
10
10
|
|
|
11
|
-
`$ npm install @
|
|
11
|
+
`$ npm install @aks-dev/easyui --save`
|
|
12
12
|
|
|
13
13
|
or
|
|
14
14
|
|
|
15
|
-
`$ yarn add @
|
|
15
|
+
`$ yarn add @aks-dev/easyui`
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
### [UI组件](./src/index.d.ts)
|
|
@@ -138,7 +138,7 @@ export const alertViewRef = React.createRef<AlertViewCurrent>();
|
|
|
138
138
|
|
|
139
139
|
|
|
140
140
|
|
|
141
|
-
export const
|
|
141
|
+
export const showAlertModal = (props: Partial<Options>) => {
|
|
142
142
|
alertViewRef.current?.show(props)
|
|
143
143
|
}
|
|
144
144
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-04-22 17:30:32
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-
|
|
6
|
-
* @FilePath: /@aks/
|
|
5
|
+
* @LastEditTime: 2022-05-12 11:32:28
|
|
6
|
+
* @FilePath: /@aks/easyui/lib/Easy-Hud/AlertView/index.ts
|
|
7
7
|
*/
|
|
8
8
|
import * as React from 'react'
|
|
9
9
|
|
|
@@ -26,7 +26,7 @@ export declare type Options = {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
export declare const
|
|
29
|
+
export declare const showAlertModal: (props: Partial<Options>) => void;
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
package/lib/Easy-Hud/EasyHud.tsx
CHANGED
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-04-24 14:10:04
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-05-
|
|
5
|
+
* @LastEditTime: 2022-05-12 11:34:10
|
|
6
6
|
* @FilePath: /@aks/easyui/lib/Easy-Hud/EasyHud.tsx
|
|
7
7
|
*/
|
|
8
8
|
import * as React from 'react'
|
|
9
9
|
// import { StyleSheet } from 'react-native'
|
|
10
10
|
import {
|
|
11
|
-
alertViewRef, default as AlertView,
|
|
11
|
+
alertViewRef, default as AlertView, showAlertModal
|
|
12
12
|
} from './AlertView/AlertView'
|
|
13
13
|
import {
|
|
14
|
-
|
|
14
|
+
hideLoading, Loading, loadingRef, showLoading
|
|
15
15
|
} from './Loading/Loading'
|
|
16
16
|
import {
|
|
17
|
-
|
|
17
|
+
showToast, Toast, toastRef
|
|
18
18
|
} from './Toast/Toast'
|
|
19
19
|
|
|
20
20
|
|
|
@@ -41,8 +41,8 @@ export const EasyHud: React.FC<{}> = () => React.cloneElement(
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
showAlertModal,
|
|
45
|
+
showToast,
|
|
46
|
+
showLoading,
|
|
47
|
+
hideLoading
|
|
48
48
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-04-24 14:27:02
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-05-
|
|
5
|
+
* @LastEditTime: 2022-05-12 11:33:21
|
|
6
6
|
* @FilePath: /@aks/easyui/lib/Easy-Hud/Loading/Loading.tsx
|
|
7
7
|
*/
|
|
8
8
|
import React, { useImperativeHandle, useState } from 'react';
|
|
@@ -20,11 +20,11 @@ export const Loading = React.forwardRef<LoadingCurrent, {}>((_, ref) => {
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
useImperativeHandle<unknown, LoadingCurrent>(ref, () => ({
|
|
23
|
-
|
|
23
|
+
showLoading: (content?: string) => {
|
|
24
24
|
setShow(true);
|
|
25
25
|
setTipText(content || '加载中')
|
|
26
26
|
},
|
|
27
|
-
|
|
27
|
+
hideLoading: () => {
|
|
28
28
|
setShow(false);
|
|
29
29
|
}
|
|
30
30
|
}), [show])
|
|
@@ -44,8 +44,8 @@ export const Loading = React.forwardRef<LoadingCurrent, {}>((_, ref) => {
|
|
|
44
44
|
})
|
|
45
45
|
|
|
46
46
|
export const loadingRef = React.createRef<LoadingCurrent>();
|
|
47
|
-
export const
|
|
48
|
-
export const
|
|
47
|
+
export const showLoading = (content?: string) => loadingRef.current?.showLoading(content)
|
|
48
|
+
export const hideLoading = () => loadingRef.current?.hideLoading()
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @Author: shiguo
|
|
4
4
|
* @Date: 2022-04-24 14:27:02
|
|
5
5
|
* @LastEditors: shiguo
|
|
6
|
-
* @LastEditTime: 2022-05-
|
|
6
|
+
* @LastEditTime: 2022-05-12 11:32:41
|
|
7
7
|
* @FilePath: /@aks/easyui/lib/Easy-Hud/Loading/index.ts
|
|
8
8
|
*/
|
|
9
9
|
import * as React from 'react'
|
|
@@ -16,17 +16,17 @@ import * as React from 'react'
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
export declare type LoadingCurrent = {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
showLoading: (content?: string) => void;
|
|
20
|
+
hideLoading: () => void;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
export declare const
|
|
26
|
+
export declare const showLoading: (content?: string) => void;
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
export declare const
|
|
29
|
+
export declare const hideLoading: () => void;
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
export declare const loadingRef: React.RefObject<LoadingCurrent>;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2021-04-27 10:38:04
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-
|
|
6
|
-
* @FilePath: /@aks/
|
|
5
|
+
* @LastEditTime: 2022-05-12 11:33:40
|
|
6
|
+
* @FilePath: /@aks/easyui/lib/Easy-Hud/Toast/Toast.tsx
|
|
7
7
|
*/
|
|
8
8
|
import React, { useImperativeHandle, useState, useRef } from 'react';
|
|
9
9
|
import { View, StyleSheet, Text, Dimensions, Animated, Easing } from 'react-native';
|
|
@@ -34,7 +34,7 @@ export const Toast = React.forwardRef<ToastCurrent, {}>((_, ref) => {
|
|
|
34
34
|
])
|
|
35
35
|
|
|
36
36
|
useImperativeHandle<unknown, ToastCurrent>(ref, () => ({
|
|
37
|
-
|
|
37
|
+
showToast: (content: string) => {
|
|
38
38
|
setTipText(content || errorMsg)
|
|
39
39
|
fadeAnimation.reset()
|
|
40
40
|
fadeAnimation.start()
|
|
@@ -53,7 +53,7 @@ export const Toast = React.forwardRef<ToastCurrent, {}>((_, ref) => {
|
|
|
53
53
|
|
|
54
54
|
export const toastRef = React.createRef<ToastCurrent>();
|
|
55
55
|
|
|
56
|
-
export const
|
|
56
|
+
export const showToast = (content: string) => toastRef.current?.showToast(content)
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @Author: shiguo
|
|
3
3
|
* @Date: 2022-04-18 19:18:03
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-
|
|
6
|
-
* @FilePath: /@aks/
|
|
5
|
+
* @LastEditTime: 2022-05-12 11:33:32
|
|
6
|
+
* @FilePath: /@aks/easyui/lib/Easy-Hud/Toast/index.ts
|
|
7
7
|
*/
|
|
8
8
|
import * as React from 'react'
|
|
9
9
|
|
|
@@ -11,10 +11,10 @@ import * as React from 'react'
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
export declare type ToastCurrent = {
|
|
14
|
-
|
|
14
|
+
showToast: (content: string) => void;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export declare const
|
|
17
|
+
export declare const showToast: (content: string) => void;
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
export declare const toastRef: React.RefObject<ToastCurrent>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: OBKoro1
|
|
3
3
|
* @Date: 2022-04-24 17:38:27
|
|
4
4
|
* @LastEditors: shiguo
|
|
5
|
-
* @LastEditTime: 2022-05-
|
|
5
|
+
* @LastEditTime: 2022-05-12 10:59:12
|
|
6
6
|
* @FilePath: /@aks/easyui/lib/MutiPictureView/MutiPictureView.tsx
|
|
7
7
|
*/
|
|
8
8
|
|
|
@@ -11,7 +11,7 @@ import { Image, View, StyleSheet, Keyboard, ImageSourcePropType, TouchableOpacit
|
|
|
11
11
|
import { px2dp } from '../../screen/px2dp'
|
|
12
12
|
import { px2sp } from '../../screen/px2sp'
|
|
13
13
|
|
|
14
|
-
import SYImagePicker from "@
|
|
14
|
+
import SYImagePicker from "@aks-dev/react-native-syan-image-picker";
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
import type { MutiPictureViewProps } from '.'
|
package/lib/index.md
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aks-dev/easyui",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.13",
|
|
4
|
+
"description": "爱科森开发工具包",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"typings": "./src/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"keywords": [
|
|
11
11
|
"react",
|
|
12
12
|
"react-native",
|
|
13
|
-
"@aks/easyui"
|
|
13
|
+
"@aks-dev/easyui"
|
|
14
14
|
],
|
|
15
15
|
"files": [
|
|
16
16
|
"/android",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"author": "",
|
|
35
35
|
"license": "MIT",
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@
|
|
37
|
+
"@aks-dev/react-native-syan-image-picker": "*",
|
|
38
38
|
"react": "*",
|
|
39
39
|
"react-native": "*",
|
|
40
40
|
"react-native-webview": "*"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"react-native-swipe-list-view": "^3.2.9"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@
|
|
49
|
+
"@aks-dev/react-native-syan-image-picker": "^0.5.58",
|
|
50
50
|
"@types/react": "^17.0.39",
|
|
51
51
|
"@types/react-native": "^0.67.4",
|
|
52
52
|
"react-native-webview": "^11.18.2",
|