@aks-dev/easyui 1.0.196 → 1.0.198
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.
Potentially problematic release.
This version of @aks-dev/easyui might be problematic. Click here for more details.
- package/dist/components/AnimationModal/AnimationModal.js +41 -23
- package/dist/components/Badge/Badge.js +16 -7
- package/dist/components/DottedLine/DottedLine.js +20 -15
- package/dist/components/Echarts/EchartsView.js +77 -40
- package/dist/components/Echarts/helper.js +16 -1
- package/dist/components/Hud/AlertBottomView/AlertBottomView.js +64 -49
- package/dist/components/Hud/AlertSheetView/AlertSheetView.js +34 -30
- package/dist/components/Hud/AlertView/AlertView.js +66 -52
- package/dist/components/Hud/Hud.js +19 -8
- package/dist/components/Hud/Loading/Loading.js +25 -7
- package/dist/components/Hud/PopoverView/PopoverView.js +20 -5
- package/dist/components/Hud/Scanner/Scanner.js +99 -71
- package/dist/components/Hud/Toast/Toast.js +16 -6
- package/dist/components/MenuView/MenuView.js +73 -32
- package/dist/components/Modal/Modal.js +7 -0
- package/dist/components/MutiPictureView/MutiPictureView.js +88 -78
- package/dist/components/PictureViewer/PictureViewer.js +32 -11
- package/dist/components/RefreshList/RefreshList.js +52 -43
- package/dist/components/RichText/RichText.js +23 -23
- package/dist/components/StickHeaderView/StickHeaderView.js +12 -2
- package/dist/components/TableCell/TableCell.js +53 -37
- package/dist/components/TextInputArea/TextInputArea.js +31 -22
- package/dist/components/WithLoadingContainer/WithLoadingContainer.js +31 -14
- package/dist/index.js +11 -0
- package/dist/jsbridge/RNEasyui.js +26 -1
- package/dist/jsbridge/UpgradeModule.js +21 -12
- package/dist/jsbridge/index.js +7 -0
- package/dist/screen/index.js +8 -0
- package/dist/screen/px2dp.js +25 -2
- package/dist/screen/px2sp.js +35 -5
- package/dist/screen/text-fit.js +21 -5
- package/dist/utils/index.js +7 -0
- package/dist/utils/lazy.js +71 -19
- package/dist/utils/mode.js +21 -0
- package/package.json +1 -2
- package/types/components/AnimationModal/AnimationModal.d.ts +8 -0
- package/types/components/AnimationModal/AnimationModal.d.ts.map +1 -1
- package/types/components/Echarts/helper.d.ts +5 -0
- package/types/components/Echarts/helper.d.ts.map +1 -1
- package/types/components/Hud/AlertBottomView/AlertBottomView.d.ts +1 -1
- package/types/components/Hud/AlertBottomView/AlertBottomView.d.ts.map +1 -1
- package/types/components/Hud/AlertSheetView/AlertSheetView.d.ts +1 -1
- package/types/components/Hud/AlertSheetView/AlertSheetView.d.ts.map +1 -1
- package/types/components/Hud/AlertView/AlertView.d.ts +1 -1
- package/types/components/Hud/AlertView/AlertView.d.ts.map +1 -1
- package/types/components/Hud/Loading/Loading.d.ts +3 -3
- package/types/components/Hud/Loading/Loading.d.ts.map +1 -1
- package/types/components/Hud/PopoverView/PopoverView.d.ts +3 -3
- package/types/components/Hud/PopoverView/PopoverView.d.ts.map +1 -1
- package/types/components/Hud/Scanner/Scanner.d.ts +3 -3
- package/types/components/Hud/Scanner/Scanner.d.ts.map +1 -1
- package/types/components/Hud/Toast/Toast.d.ts +2 -2
- package/types/components/Hud/Toast/Toast.d.ts.map +1 -1
- package/types/components/MutiPictureView/MutiPictureView.d.ts +9 -0
- package/types/components/MutiPictureView/MutiPictureView.d.ts.map +1 -1
- package/types/components/StickHeaderView/StickHeaderView.d.ts +6 -0
- package/types/components/StickHeaderView/StickHeaderView.d.ts.map +1 -1
- package/types/components/TextInputArea/TextInputArea.d.ts +1 -0
- package/types/components/TextInputArea/TextInputArea.d.ts.map +1 -1
- package/types/jsbridge/RNEasyui.d.ts +18 -0
- package/types/jsbridge/RNEasyui.d.ts.map +1 -1
- package/types/jsbridge/UpgradeModule.d.ts +15 -0
- package/types/jsbridge/UpgradeModule.d.ts.map +1 -1
- package/types/screen/px2dp.d.ts +11 -0
- package/types/screen/px2dp.d.ts.map +1 -1
- package/types/screen/text-fit.d.ts +3 -0
- package/types/screen/text-fit.d.ts.map +1 -1
- package/types/utils/lazy.d.ts +35 -2
- package/types/utils/lazy.d.ts.map +1 -1
- package/types/utils/mode.d.ts +14 -0
- package/types/utils/mode.d.ts.map +1 -1
- package/dist/components/Echarts/demo.js +0 -201
- package/dist/components/RefreshList/demo.js +0 -9
- package/dist/components/RefreshList/demo1.js +0 -27
- package/dist/components/RefreshList/demo2.js +0 -9
- package/dist/components/StickHeaderView/demo.js +0 -37
- package/types/components/Echarts/demo.d.ts +0 -4
- package/types/components/Echarts/demo.d.ts.map +0 -1
- package/types/components/RefreshList/demo.d.ts +0 -2
- package/types/components/RefreshList/demo.d.ts.map +0 -1
- package/types/components/RefreshList/demo1.d.ts +0 -2
- package/types/components/RefreshList/demo1.d.ts.map +0 -1
- package/types/components/RefreshList/demo2.d.ts +0 -2
- package/types/components/RefreshList/demo2.d.ts.map +0 -1
- package/types/components/StickHeaderView/demo.d.ts +0 -4
- package/types/components/StickHeaderView/demo.d.ts.map +0 -1
package/types/utils/lazy.d.ts
CHANGED
|
@@ -1,8 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description: 睡眠时间
|
|
3
|
+
* @param {*}毫秒值
|
|
4
|
+
* @return {*}
|
|
5
|
+
*/
|
|
1
6
|
export declare const sleep: (msec?: number) => Promise<unknown>;
|
|
7
|
+
/**
|
|
8
|
+
* @description: 获取随机色
|
|
9
|
+
* @param {*}
|
|
10
|
+
* @return {*}
|
|
11
|
+
*/
|
|
2
12
|
export declare const randomcolor: () => string;
|
|
3
13
|
type SyncLoopCallBack = (item: any, index: number) => void;
|
|
14
|
+
/**
|
|
15
|
+
* @description: 同步循环
|
|
16
|
+
* @param {*} dataList:数据源
|
|
17
|
+
* @return {*}
|
|
18
|
+
*/
|
|
4
19
|
export declare const syncLoop: (dataList: any[], callback: SyncLoopCallBack) => Promise<string>;
|
|
20
|
+
/**
|
|
21
|
+
* @description: 对11位手机号码加*
|
|
22
|
+
* @return {*}
|
|
23
|
+
*/
|
|
5
24
|
export declare const encryptMobilePhoneNumber: (text: string) => string;
|
|
25
|
+
/**
|
|
26
|
+
* @description: 判断对象
|
|
27
|
+
* @return {*}
|
|
28
|
+
*/
|
|
6
29
|
export declare const isObject: (exp: any) => boolean;
|
|
7
30
|
export declare const isArray: (exp: any) => boolean;
|
|
8
31
|
export declare const isString: (exp: any) => boolean;
|
|
@@ -10,16 +33,26 @@ export declare const isNumber: (exp: any) => boolean;
|
|
|
10
33
|
export declare const isNull: (exp: any) => boolean;
|
|
11
34
|
export declare const isNullObject: (obj: any) => boolean;
|
|
12
35
|
export declare const isUndefined: (exp: any) => boolean;
|
|
36
|
+
/**判断两个对象是否相同 */
|
|
13
37
|
export declare const isObjectValueEqual: (a: any, b: any) => boolean;
|
|
14
38
|
export declare const deepEqual: (x: any, y: any) => boolean;
|
|
15
39
|
export declare function deepClone(target: any): any;
|
|
16
40
|
export declare const isPhoneNumber: (str: string) => boolean;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @param dateStr yyyy-MM-dd HH:mm:ss
|
|
44
|
+
* @returns {string}
|
|
45
|
+
*/
|
|
17
46
|
export declare const toDateFriendly: (dateStr: string) => string;
|
|
18
47
|
export declare const isChainChar: (str: string) => boolean;
|
|
19
|
-
export declare const isHaveChartCount: (str: string) => number;
|
|
20
|
-
export declare const isHaveNumberCount: (str: string) => number;
|
|
48
|
+
export declare const isHaveChartCount: (str: string) => number | undefined;
|
|
49
|
+
export declare const isHaveNumberCount: (str: string) => number | undefined;
|
|
21
50
|
export declare const isHaveChinese: (text: string) => boolean;
|
|
22
51
|
export declare const isHaveEmojiCharact: (substring: string) => boolean;
|
|
52
|
+
/**
|
|
53
|
+
* @description: 获得32位随机字符
|
|
54
|
+
* @return {*}
|
|
55
|
+
*/
|
|
23
56
|
export declare const getUuid: () => string;
|
|
24
57
|
export {};
|
|
25
58
|
//# sourceMappingURL=lazy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../src/utils/lazy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../src/utils/lazy.ts"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,qBAIlC,CAAC;AACF;;;;GAIG;AACH,eAAO,MAAM,WAAW,cAEvB,CAAC;AAEF,KAAK,gBAAgB,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAC3D;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GAAU,UAAU,GAAG,EAAE,EAAE,UAAU,gBAAgB,oBAazE,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GAAI,MAAM,MAAM,WAOpD,CAAC;AAEF;;;GAGG;AAGH,eAAO,MAAM,QAAQ,GAAI,KAAK,GAAG,YAEhC,CAAC;AAGF,eAAO,MAAM,OAAO,GAAI,KAAK,GAAG,YAE/B,CAAC;AAGF,eAAO,MAAM,QAAQ,GAAI,KAAK,GAAG,YAEhC,CAAC;AAGF,eAAO,MAAM,QAAQ,GAAI,KAAK,GAAG,YAEhC,CAAC;AAGF,eAAO,MAAM,MAAM,GAAI,KAAK,GAAG,YAE9B,CAAC;AAGF,eAAO,MAAM,YAAY,GAAI,KAAK,GAAG,YAOpC,CAAC;AAGF,eAAO,MAAM,WAAW,GAAI,KAAK,GAAG,YAEnC,CAAC;AACF,gBAAgB;AAChB,eAAO,MAAM,kBAAkB,GAAI,GAAG,GAAG,EAAE,GAAG,GAAG,YAqBhD,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,GAAG,GAAG,EAAE,GAAG,GAAG,YA4CvC,CAAC;AAGF,wBAAgB,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG,CA+B1C;AAED,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,YAMxC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,SAAS,MAAM,WAmC7C,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,YAKtC,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,uBAK3C,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,KAAK,MAAM,uBAK5C,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,YAOzC,CAAC;AACF,eAAO,MAAM,kBAAkB,GAAI,WAAW,MAAM,YAyCnD,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,OAAO,cAYnB,CAAC"}
|
package/types/utils/mode.d.ts
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
type CallBack = (...args: any[]) => void;
|
|
2
|
+
/**
|
|
3
|
+
* @description: 通过手势关闭键盘
|
|
4
|
+
* @return {*}
|
|
5
|
+
*/
|
|
2
6
|
export declare const keyboardDismissHandlers: import("react-native").GestureResponderHandlers;
|
|
7
|
+
/**
|
|
8
|
+
* @description: 手势动作回调
|
|
9
|
+
* @param {*}
|
|
10
|
+
* @return {*}
|
|
11
|
+
*/
|
|
3
12
|
export declare const panHandlersCallback: (props: {
|
|
4
13
|
GrantCallback: CallBack;
|
|
5
14
|
MoveCallback: CallBack;
|
|
6
15
|
ReleaseCallback: CallBack;
|
|
7
16
|
}) => import("react-native").GestureResponderHandlers;
|
|
17
|
+
/**
|
|
18
|
+
* @description: 拨打电话
|
|
19
|
+
* @param {number} phone
|
|
20
|
+
* @return {*}
|
|
21
|
+
*/
|
|
8
22
|
export declare const callTelephone: (phone: number | string) => void;
|
|
9
23
|
export {};
|
|
10
24
|
//# sourceMappingURL=mode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mode.d.ts","sourceRoot":"","sources":["../../src/utils/mode.ts"],"names":[],"mappings":"AASA,KAAK,QAAQ,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"mode.d.ts","sourceRoot":"","sources":["../../src/utils/mode.ts"],"names":[],"mappings":"AASA,KAAK,QAAQ,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;AACzC;;;GAGG;AACH,eAAO,MAAM,uBAAuB,iDAGtB,CAAC;AACf;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAO;IACzC,aAAa,EAAE,QAAQ,CAAC;IACxB,YAAY,EAAE,QAAQ,CAAC;IACvB,eAAe,EAAE,QAAQ,CAAC;CAC3B,oDAQA,CAAC;AACF;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,GAAG,MAAM,SAanD,CAAC"}
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { View, StyleSheet } from "react-native";
|
|
3
|
-
import EchartsView from "./EchartsView";
|
|
4
|
-
import { echarts } from "./EchartsView";
|
|
5
|
-
export default () => {
|
|
6
|
-
let option = {
|
|
7
|
-
color: ["#80FFA5", "#00DDFF", "#37A2FF", "#FF0087", "#FFBF00"],
|
|
8
|
-
title: {
|
|
9
|
-
text: "Gradient Stacked Area Chart",
|
|
10
|
-
},
|
|
11
|
-
tooltip: {
|
|
12
|
-
trigger: "axis",
|
|
13
|
-
axisPointer: {
|
|
14
|
-
type: "cross",
|
|
15
|
-
label: {
|
|
16
|
-
backgroundColor: "#6a7985",
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
legend: {
|
|
21
|
-
data: ["Line 1", "Line 2", "Line 3", "Line 4", "Line 5"],
|
|
22
|
-
},
|
|
23
|
-
toolbox: {
|
|
24
|
-
feature: {
|
|
25
|
-
saveAsImage: {},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
grid: {
|
|
29
|
-
left: "3%",
|
|
30
|
-
right: "4%",
|
|
31
|
-
bottom: "3%",
|
|
32
|
-
containLabel: true,
|
|
33
|
-
},
|
|
34
|
-
xAxis: [
|
|
35
|
-
{
|
|
36
|
-
type: "category",
|
|
37
|
-
boundaryGap: false,
|
|
38
|
-
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
|
|
39
|
-
},
|
|
40
|
-
],
|
|
41
|
-
yAxis: [
|
|
42
|
-
{
|
|
43
|
-
type: "value",
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
series: [
|
|
47
|
-
{
|
|
48
|
-
name: "Line 1",
|
|
49
|
-
type: "line",
|
|
50
|
-
stack: "Total",
|
|
51
|
-
smooth: true,
|
|
52
|
-
lineStyle: {
|
|
53
|
-
width: 0,
|
|
54
|
-
},
|
|
55
|
-
showSymbol: false,
|
|
56
|
-
areaStyle: {
|
|
57
|
-
opacity: 0.8,
|
|
58
|
-
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
59
|
-
{
|
|
60
|
-
offset: 0,
|
|
61
|
-
color: "rgb(128, 255, 165)",
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
offset: 1,
|
|
65
|
-
color: "rgb(1, 191, 236)",
|
|
66
|
-
},
|
|
67
|
-
]),
|
|
68
|
-
},
|
|
69
|
-
emphasis: {
|
|
70
|
-
focus: "series",
|
|
71
|
-
},
|
|
72
|
-
data: [140, 232, 101, 264, 90, 340, 250],
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
name: "Line 2",
|
|
76
|
-
type: "line",
|
|
77
|
-
stack: "Total",
|
|
78
|
-
smooth: true,
|
|
79
|
-
lineStyle: {
|
|
80
|
-
width: 0,
|
|
81
|
-
},
|
|
82
|
-
showSymbol: false,
|
|
83
|
-
areaStyle: {
|
|
84
|
-
opacity: 0.8,
|
|
85
|
-
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
86
|
-
{
|
|
87
|
-
offset: 0,
|
|
88
|
-
color: "rgb(0, 221, 255)",
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
offset: 1,
|
|
92
|
-
color: "rgb(77, 119, 255)",
|
|
93
|
-
},
|
|
94
|
-
]),
|
|
95
|
-
},
|
|
96
|
-
emphasis: {
|
|
97
|
-
focus: "series",
|
|
98
|
-
},
|
|
99
|
-
data: [120, 282, 111, 234, 220, 340, 310],
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
name: "Line 3",
|
|
103
|
-
type: "line",
|
|
104
|
-
stack: "Total",
|
|
105
|
-
smooth: true,
|
|
106
|
-
lineStyle: {
|
|
107
|
-
width: 0,
|
|
108
|
-
},
|
|
109
|
-
showSymbol: false,
|
|
110
|
-
areaStyle: {
|
|
111
|
-
opacity: 0.8,
|
|
112
|
-
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
113
|
-
{
|
|
114
|
-
offset: 0,
|
|
115
|
-
color: "rgb(55, 162, 255)",
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
offset: 1,
|
|
119
|
-
color: "rgb(116, 21, 219)",
|
|
120
|
-
},
|
|
121
|
-
]),
|
|
122
|
-
},
|
|
123
|
-
emphasis: {
|
|
124
|
-
focus: "series",
|
|
125
|
-
},
|
|
126
|
-
data: [320, 132, 201, 334, 190, 130, 220],
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
name: "Line 4",
|
|
130
|
-
type: "line",
|
|
131
|
-
stack: "Total",
|
|
132
|
-
smooth: true,
|
|
133
|
-
lineStyle: {
|
|
134
|
-
width: 0,
|
|
135
|
-
},
|
|
136
|
-
showSymbol: false,
|
|
137
|
-
areaStyle: {
|
|
138
|
-
opacity: 0.8,
|
|
139
|
-
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
140
|
-
{
|
|
141
|
-
offset: 0,
|
|
142
|
-
color: "rgb(255, 0, 135)",
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
offset: 1,
|
|
146
|
-
color: "rgb(135, 0, 157)",
|
|
147
|
-
},
|
|
148
|
-
]),
|
|
149
|
-
},
|
|
150
|
-
emphasis: {
|
|
151
|
-
focus: "series",
|
|
152
|
-
},
|
|
153
|
-
data: [220, 402, 231, 134, 190, 230, 120],
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
name: "Line 5",
|
|
157
|
-
type: "line",
|
|
158
|
-
stack: "Total",
|
|
159
|
-
smooth: true,
|
|
160
|
-
lineStyle: {
|
|
161
|
-
width: 0,
|
|
162
|
-
},
|
|
163
|
-
showSymbol: false,
|
|
164
|
-
label: {
|
|
165
|
-
show: true,
|
|
166
|
-
position: "top",
|
|
167
|
-
},
|
|
168
|
-
areaStyle: {
|
|
169
|
-
opacity: 0.8,
|
|
170
|
-
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
171
|
-
{
|
|
172
|
-
offset: 0,
|
|
173
|
-
color: "rgb(255, 191, 0)",
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
offset: 1,
|
|
177
|
-
color: "rgb(224, 62, 76)",
|
|
178
|
-
},
|
|
179
|
-
]),
|
|
180
|
-
},
|
|
181
|
-
emphasis: {
|
|
182
|
-
focus: "series",
|
|
183
|
-
},
|
|
184
|
-
data: [220, 302, 181, 234, 210, 290, 150],
|
|
185
|
-
},
|
|
186
|
-
],
|
|
187
|
-
};
|
|
188
|
-
return (React.createElement(View, { style: styles.container },
|
|
189
|
-
React.createElement(View, { style: { width: 100, height: 100, backgroundColor: "pink" } }),
|
|
190
|
-
React.createElement(EchartsView, { option: option, style: {
|
|
191
|
-
marginTop: 100,
|
|
192
|
-
marginHorizontal: 20,
|
|
193
|
-
height: 200,
|
|
194
|
-
} })));
|
|
195
|
-
};
|
|
196
|
-
const styles = StyleSheet.create({
|
|
197
|
-
container: {
|
|
198
|
-
flexGrow: 1,
|
|
199
|
-
display: "flex",
|
|
200
|
-
},
|
|
201
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { View } from "react-native";
|
|
3
|
-
import { default as RefreshList, RefreshState } from "./RefreshList";
|
|
4
|
-
const App = () => {
|
|
5
|
-
const [refreshState, setRefreshState] = React.useState(RefreshState.Idle);
|
|
6
|
-
return (React.createElement(RefreshList, { data: ["a", "b"], renderItem: ({ item, index }) => {
|
|
7
|
-
return React.createElement(View, null, item);
|
|
8
|
-
}, refreshState: refreshState, onHeaderRefresh: () => { }, onFooterRefresh: () => { } }));
|
|
9
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { View } from "react-native";
|
|
3
|
-
import { default as RefreshList, RefreshState } from "./RefreshList";
|
|
4
|
-
const App = () => {
|
|
5
|
-
const [refreshState, setRefreshState] = React.useState(RefreshState.Idle);
|
|
6
|
-
const listRef = React.useRef(null);
|
|
7
|
-
return (React.createElement(RefreshList, { mode: "SectionList", sections: [
|
|
8
|
-
{
|
|
9
|
-
title: "Main dishes",
|
|
10
|
-
data: ["Pizza", "Burger", "Risotto"],
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
title: "Sides",
|
|
14
|
-
data: ["French Fries", "Onion Rings", "Fried Shrimps"],
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
title: "Drinks",
|
|
18
|
-
data: ["Water", "Coke", "Beer"],
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
title: "Desserts",
|
|
22
|
-
data: ["Cheese Cake", "Ice Cream"],
|
|
23
|
-
},
|
|
24
|
-
], renderItem: ({ item, section }) => {
|
|
25
|
-
return React.createElement(View, null, item);
|
|
26
|
-
}, refreshState: refreshState, onHeaderRefresh: () => { }, onFooterRefresh: () => { }, renderSectionHeader: ({ section: { letter } }) => (React.createElement(View, { style: { backgroundColor: "red" } })) }));
|
|
27
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { RefreshState } from "./RefreshList";
|
|
3
|
-
const App = () => {
|
|
4
|
-
const [refreshState, setRefreshState] = React.useState(RefreshState.Idle);
|
|
5
|
-
const listRef = React.useRef(null);
|
|
6
|
-
const dataList = Array(20)
|
|
7
|
-
.fill("")
|
|
8
|
-
.map((_, i) => ({ key: `${i}`, text: `item #${i}` }));
|
|
9
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { View, StyleSheet, TouchableOpacity, Text, Animated, } from "react-native";
|
|
3
|
-
import { px2dp } from "../../screen/px2dp";
|
|
4
|
-
import { px2sp } from "../../screen/px2sp";
|
|
5
|
-
import StickHeaderView from "./StickHeaderView";
|
|
6
|
-
import WithLoadingContainer from "../WithLoadingContainer/WithLoadingContainer";
|
|
7
|
-
import { Status } from "../WithLoadingContainer/WithLoadingContainer";
|
|
8
|
-
export default ({}) => {
|
|
9
|
-
var _a;
|
|
10
|
-
const scrollY = React.useRef(new Animated.Value(0)).current;
|
|
11
|
-
const headHeight = React.useRef(-1);
|
|
12
|
-
return (React.createElement(View, { style: styles.container },
|
|
13
|
-
React.createElement(Animated.ScrollView, { style: { flex: 1 }, onScroll: Animated.event([
|
|
14
|
-
{
|
|
15
|
-
nativeEvent: { contentOffset: { y: scrollY } },
|
|
16
|
-
},
|
|
17
|
-
]), scrollEventThrottle: 1 },
|
|
18
|
-
React.createElement(View, { onLayout: (e) => {
|
|
19
|
-
let { height } = e.nativeEvent.layout;
|
|
20
|
-
headHeight.current = height;
|
|
21
|
-
} }),
|
|
22
|
-
React.createElement(StickHeaderView, { stickyHeaderY: headHeight.current, stickyScrollY: scrollY },
|
|
23
|
-
React.createElement(View, null,
|
|
24
|
-
React.createElement(Text, { style: {
|
|
25
|
-
fontSize: px2sp(16),
|
|
26
|
-
color: "#333",
|
|
27
|
-
marginLeft: px2dp(30),
|
|
28
|
-
} }, "\u5F53\u65E5\u8BA1\u5212"))),
|
|
29
|
-
React.createElement(WithLoadingContainer, { status: Status.SUCCESS, emptyText: "今日无需巡检" }, (_a = Array(30)
|
|
30
|
-
.fill("")) === null || _a === void 0 ? void 0 : _a.map((i, index) => (React.createElement(Item, { key: `sg-item-${index}`, item: i, index: index })))))));
|
|
31
|
-
};
|
|
32
|
-
const Item = (props) => {
|
|
33
|
-
return React.createElement(TouchableOpacity, null);
|
|
34
|
-
};
|
|
35
|
-
const styles = StyleSheet.create({
|
|
36
|
-
container: {},
|
|
37
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"demo.d.ts","sourceRoot":"","sources":["../../../src/components/Echarts/demo.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;;AAM/B,wBAsME"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"demo.d.ts","sourceRoot":"","sources":["../../../src/components/RefreshList/demo.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"demo1.d.ts","sourceRoot":"","sources":["../../../src/components/RefreshList/demo1.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"demo2.d.ts","sourceRoot":"","sources":["../../../src/components/RefreshList/demo2.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"demo.d.ts","sourceRoot":"","sources":["../../../src/components/StickHeaderView/demo.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;yBAcV,MAAE;AAAlB,wBAoEE"}
|