@nutui/nutui-react-taro 1.3.7 → 1.3.8
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/CHANGELOG.md +26 -0
- package/dist/esm/Audio.js +3 -3
- package/dist/esm/Avatar.js +2 -2
- package/dist/esm/Cascader.js +4 -4
- package/dist/esm/Cell.js +2 -2
- package/dist/esm/Collapse.js +2 -2
- package/dist/esm/Input.js +2 -2
- package/dist/esm/InputNumber.js +2 -2
- package/dist/esm/NoticeBar.js +2 -2
- package/dist/esm/Range.js +2 -2
- package/dist/esm/SideNavBar.js +2 -2
- package/dist/esm/SideNavBarItem.js +2 -2
- package/dist/esm/Signature.js +2 -2
- package/dist/esm/Skeleton.js +3 -3
- package/dist/esm/Step.js +2 -2
- package/dist/esm/Steps.js +2 -2
- package/dist/esm/SubSideNavBar.js +2 -2
- package/dist/esm/Switch.js +2 -2
- package/dist/esm/TabPane.js +2 -2
- package/dist/esm/Tabbar.js +2 -2
- package/dist/esm/Tabs.js +2 -2
- package/dist/esm/TimeSelect.js +2 -2
- package/dist/esm/Uploader.js +2 -2
- package/dist/esm/Video.js +2 -2
- package/dist/esm/VirtualList.js +2 -2
- package/dist/esm/{audio.taro-57d4f0da.js → audio.taro-c2f9948a.js} +1 -1
- package/dist/esm/{avatar.taro-ec620cdd.js → avatar.taro-deabe88a.js} +4 -4
- package/dist/esm/{cascader.taro-77100fb4.js → cascader.taro-8c9891b4.js} +2 -2
- package/dist/esm/{cell.taro-a4c3bb7b.js → cell.taro-6daf51a0.js} +5 -2
- package/dist/esm/{collapse.taro-72e58ba2.js → collapse.taro-13cde270.js} +6 -3
- package/dist/esm/{input.taro-2453d7c4.js → input.taro-40d7e7dd.js} +35 -19
- package/dist/esm/{inputnumber.taro-0cf7c1b7.js → inputnumber.taro-0a01f6e1.js} +15 -1
- package/dist/esm/{noticebar.taro-332691f9.js → noticebar.taro-77b5a2c9.js} +6 -0
- package/dist/esm/nutui-react.es.js +24 -24
- package/dist/esm/{range.taro-fc7c0b6a.js → range.taro-4232e6a7.js} +7 -1
- package/dist/esm/{sidenavbar.taro-87f056cd.js → sidenavbar.taro-4297f552.js} +3 -3
- package/dist/esm/{sidenavbaritem.taro-77e077f4.js → sidenavbaritem.taro-fee11d26.js} +3 -3
- package/dist/esm/{signature.taro-59b3b3ab.js → signature.taro-0b3abea5.js} +14 -8
- package/dist/esm/{skeleton.taro-b9ff84b9.js → skeleton.taro-acca102c.js} +1 -1
- package/dist/esm/{step.taro-f1057500.js → step.taro-1c94e067.js} +3 -5
- package/dist/esm/{steps.taro-943f4fbb.js → steps.taro-acf205a0.js} +2 -1
- package/dist/esm/{subsidenavbar.taro-2c1fcf16.js → subsidenavbar.taro-4c80ad38.js} +3 -3
- package/dist/esm/{switch.taro-be5eb823.js → switch.taro-bae2dca0.js} +2 -2
- package/dist/esm/{tabbar.taro-da72fa2c.js → tabbar.taro-86cece39.js} +5 -2
- package/dist/esm/{tabpane.taro-95aa185b.js → tabpane.taro-91cd6cf4.js} +3 -2
- package/dist/esm/{tabs.taro-86186dff.js → tabs.taro-e71875fa.js} +8 -4
- package/dist/esm/{timeselect.taro-73796bfc.js → timeselect.taro-8c4439a8.js} +20 -5
- package/dist/esm/types/src/packages/avatar/avatar.d.ts +1 -0
- package/dist/esm/types/src/packages/avatar/avatar.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/cell/cell.d.ts +1 -0
- package/dist/esm/types/src/packages/cell/cell.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/collapse/collapse.d.ts +3 -1
- package/dist/esm/types/src/packages/collapse/collapse.taro.d.ts +3 -1
- package/dist/esm/types/src/packages/input/input.d.ts +10 -2
- package/dist/esm/types/src/packages/input/input.taro.d.ts +10 -2
- package/dist/esm/types/src/packages/inputnumber/inputnumber.d.ts +6 -0
- package/dist/esm/types/src/packages/inputnumber/inputnumber.taro.d.ts +6 -0
- package/dist/esm/types/src/packages/noticebar/noticebar.d.ts +3 -1
- package/dist/esm/types/src/packages/noticebar/noticebar.taro.d.ts +3 -1
- package/dist/esm/types/src/packages/range/range.d.ts +4 -1
- package/dist/esm/types/src/packages/range/range.taro.d.ts +4 -1
- package/dist/esm/types/src/packages/sidenavbar/sidenavbar.d.ts +1 -1
- package/dist/esm/types/src/packages/sidenavbar/sidenavbar.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/sidenavbaritem/sidenavbaritem.d.ts +1 -1
- package/dist/esm/types/src/packages/sidenavbaritem/sidenavbaritem.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/signature/signature.d.ts +2 -0
- package/dist/esm/types/src/packages/signature/signature.taro.d.ts +2 -0
- package/dist/esm/types/src/packages/steps/steps.d.ts +1 -0
- package/dist/esm/types/src/packages/steps/steps.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/subsidenavbar/subsidenavbar.d.ts +1 -1
- package/dist/esm/types/src/packages/subsidenavbar/subsidenavbar.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/switch/switch.d.ts +1 -1
- package/dist/esm/types/src/packages/switch/switch.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/tabbar/tabbar.d.ts +1 -0
- package/dist/esm/types/src/packages/tabbar/tabbar.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/tabpane/tabpane.d.ts +6 -2
- package/dist/esm/types/src/packages/tabpane/tabpane.taro.d.ts +6 -1
- package/dist/esm/types/src/packages/tabs/tabs.d.ts +1 -0
- package/dist/esm/types/src/packages/tabs/tabs.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/timeselect/timeselect.d.ts +5 -1
- package/dist/esm/types/src/packages/timeselect/timeselect.taro.d.ts +5 -1
- package/dist/esm/types/src/packages/video/video.d.ts +3 -0
- package/dist/esm/types/src/packages/virtuallist/type.d.ts +3 -1
- package/dist/esm/types/src/packages/virtuallist/virtuallist.d.ts +2 -2
- package/dist/esm/{uploader.taro-6184abe7.js → uploader.taro-63a36a30.js} +1 -1
- package/dist/esm/{video-c1090c92.js → video-8a3518c5.js} +7 -1
- package/dist/esm/{virtuallist.taro-6858f690.js → virtuallist.taro-e3035825.js} +11 -6
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/nutui.react.es.js +151 -61
- package/dist/nutui.react.umd.js +151 -61
- package/dist/packages/divider/divider.scss +2 -1
- package/dist/packages/noticebar/noticebar.scss +4 -1
- package/dist/packages/tabs/tabs.scss +3 -1
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/types/index.d.ts +56 -12
- package/package.json +3 -1
|
@@ -49,10 +49,18 @@ export interface InputProps extends IComponent {
|
|
|
49
49
|
blur?: (value: any, event: Event) => void;
|
|
50
50
|
focus?: (value: any, event: Event) => void;
|
|
51
51
|
clear?: (value: any, event: Event) => void;
|
|
52
|
-
keypress?: (value: any, event: Event) => void;
|
|
53
52
|
clickInput?: (value: any) => void;
|
|
54
53
|
clickLeftIcon?: (value: any) => void;
|
|
55
54
|
clickRightIcon?: (value: any) => void;
|
|
56
55
|
click?: (value: any) => void;
|
|
56
|
+
onChange?: (value: any, event: Event) => void;
|
|
57
|
+
onBlur?: (value: any, event: Event) => void;
|
|
58
|
+
onFocus?: (value: any, event: Event) => void;
|
|
59
|
+
onClear?: (value: any, event: Event) => void;
|
|
60
|
+
keypress?: (value: any, event: Event) => void;
|
|
61
|
+
onClickInput?: (value: any) => void;
|
|
62
|
+
onClickLeftIcon?: (value: any) => void;
|
|
63
|
+
onClickRightIcon?: (value: any) => void;
|
|
64
|
+
onClick?: (value: any) => void;
|
|
57
65
|
}
|
|
58
|
-
export declare const Input: FunctionComponent<Partial<InputProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
66
|
+
export declare const Input: FunctionComponent<Partial<InputProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onBlur' | 'onFocus' | 'onClick'>>;
|
|
@@ -45,14 +45,22 @@ export interface InputProps extends IComponent {
|
|
|
45
45
|
slotButton?: React.ReactNode;
|
|
46
46
|
slotInput?: React.ReactNode;
|
|
47
47
|
formatter: (value: string) => void;
|
|
48
|
+
onChange?: (value: any, event: Event) => void;
|
|
49
|
+
onBlur?: (value: any, event: Event) => void;
|
|
50
|
+
onFocus?: (value: any, event: Event) => void;
|
|
51
|
+
onClear?: (value: any, event: Event) => void;
|
|
52
|
+
keypress?: (value: any, event: Event) => void;
|
|
53
|
+
onClickInput?: (value: any) => void;
|
|
54
|
+
onClickLeftIcon?: (value: any) => void;
|
|
55
|
+
onClickRightIcon?: (value: any) => void;
|
|
56
|
+
onClick?: (value: any) => void;
|
|
48
57
|
change?: (value: any, event: Event) => void;
|
|
49
58
|
blur?: (value: any, event: Event) => void;
|
|
50
59
|
focus?: (value: any, event: Event) => void;
|
|
51
60
|
clear?: (value: any, event: Event) => void;
|
|
52
|
-
keypress?: (value: any, event: Event) => void;
|
|
53
61
|
clickInput?: (value: any) => void;
|
|
54
62
|
clickLeftIcon?: (value: any) => void;
|
|
55
63
|
clickRightIcon?: (value: any) => void;
|
|
56
64
|
click?: (value: any) => void;
|
|
57
65
|
}
|
|
58
|
-
export declare const Input: FunctionComponent<Partial<InputProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
66
|
+
export declare const Input: FunctionComponent<Partial<InputProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onBlur' | 'onFocus' | 'onClick'>>;
|
|
@@ -19,5 +19,11 @@ export interface InputNumberProps extends IComponent {
|
|
|
19
19
|
blur: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
20
20
|
focus: (e: FocusEvent<HTMLInputElement>) => void;
|
|
21
21
|
change: (param: string | number, e: MouseEvent | ChangeEvent<HTMLInputElement>) => void;
|
|
22
|
+
onAdd: (e: MouseEvent) => void;
|
|
23
|
+
onReduce: (e: MouseEvent) => void;
|
|
24
|
+
onOverlimit: (e: MouseEvent) => void;
|
|
25
|
+
onBlurFuc: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
26
|
+
onFocus: (e: FocusEvent<HTMLInputElement>) => void;
|
|
27
|
+
onChangeFuc: (param: string | number, e: MouseEvent | ChangeEvent<HTMLInputElement>) => void;
|
|
22
28
|
}
|
|
23
29
|
export declare const InputNumber: FunctionComponent<Partial<InputNumberProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -19,5 +19,11 @@ export interface InputNumberProps extends IComponent {
|
|
|
19
19
|
blur: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
20
20
|
focus: (e: FocusEvent<HTMLInputElement>) => void;
|
|
21
21
|
change: (param: string | number, e: MouseEvent | ChangeEvent<HTMLInputElement>) => void;
|
|
22
|
+
onAdd: (e: MouseEvent) => void;
|
|
23
|
+
onReduce: (e: MouseEvent) => void;
|
|
24
|
+
onOverlimit: (e: MouseEvent) => void;
|
|
25
|
+
onBlurFuc: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
26
|
+
onFocus: (e: FocusEvent<HTMLInputElement>) => void;
|
|
27
|
+
onChangeFuc: (param: string | number, e: MouseEvent | ChangeEvent<HTMLInputElement>) => void;
|
|
22
28
|
}
|
|
23
29
|
export declare const InputNumber: FunctionComponent<Partial<InputNumberProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -20,5 +20,7 @@ export interface NoticeBarProps extends IComponent {
|
|
|
20
20
|
rightIcon?: HTMLElement | any;
|
|
21
21
|
close?: (list?: any) => void;
|
|
22
22
|
click?: (item?: any) => void;
|
|
23
|
+
onClose?: (list?: any) => void;
|
|
24
|
+
onClick?: (item?: any) => void;
|
|
23
25
|
}
|
|
24
|
-
export declare const NoticeBar: FunctionComponent<Partial<NoticeBarProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
26
|
+
export declare const NoticeBar: FunctionComponent<Partial<NoticeBarProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
@@ -20,5 +20,7 @@ export interface NoticeBarProps extends IComponent {
|
|
|
20
20
|
rightIcon?: HTMLElement | any;
|
|
21
21
|
close?: (list?: any) => void;
|
|
22
22
|
click?: (item?: any) => void;
|
|
23
|
+
onClose?: (list?: any) => void;
|
|
24
|
+
onClick?: (item?: any) => void;
|
|
23
25
|
}
|
|
24
|
-
export declare const NoticeBar: FunctionComponent<Partial<NoticeBarProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
26
|
+
export declare const NoticeBar: FunctionComponent<Partial<NoticeBarProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
@@ -20,6 +20,9 @@ export interface RangeProps {
|
|
|
20
20
|
change?: (value: number) => void;
|
|
21
21
|
dragStart?: () => void;
|
|
22
22
|
dragEnd?: () => void;
|
|
23
|
+
onChange?: (value: number) => void;
|
|
24
|
+
onDragStart?: () => void;
|
|
25
|
+
onDragEnd?: () => void;
|
|
23
26
|
}
|
|
24
|
-
export declare const Range: FunctionComponent<Partial<RangeProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
27
|
+
export declare const Range: FunctionComponent<Partial<RangeProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick' | 'onChange'>>;
|
|
25
28
|
export {};
|
|
@@ -20,6 +20,9 @@ export interface RangeProps {
|
|
|
20
20
|
change?: (value: number) => void;
|
|
21
21
|
dragStart?: () => void;
|
|
22
22
|
dragEnd?: () => void;
|
|
23
|
+
onChange?: (value: number) => void;
|
|
24
|
+
onDragStart?: () => void;
|
|
25
|
+
onDragEnd?: () => void;
|
|
23
26
|
}
|
|
24
|
-
export declare const Range: FunctionComponent<Partial<RangeProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
27
|
+
export declare const Range: FunctionComponent<Partial<RangeProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick' | 'onChange'>>;
|
|
25
28
|
export {};
|
|
@@ -8,7 +8,7 @@ export interface SideNavBarProps extends React.HTMLAttributes<HTMLDivElement>, N
|
|
|
8
8
|
width?: string;
|
|
9
9
|
offset?: number;
|
|
10
10
|
position?: 'left' | 'right';
|
|
11
|
-
|
|
11
|
+
onClose: () => void;
|
|
12
12
|
children?: React.ReactNode;
|
|
13
13
|
}
|
|
14
14
|
export declare const SideNavBar: FunctionComponent<SideNavBarProps>;
|
|
@@ -8,7 +8,7 @@ export interface SideNavBarProps extends React.HTMLAttributes<HTMLDivElement>, N
|
|
|
8
8
|
width?: string;
|
|
9
9
|
offset?: number;
|
|
10
10
|
position?: 'left' | 'right';
|
|
11
|
-
|
|
11
|
+
onClose: () => void;
|
|
12
12
|
children?: React.ReactNode;
|
|
13
13
|
}
|
|
14
14
|
export declare const SideNavBar: FunctionComponent<SideNavBarProps>;
|
|
@@ -7,5 +7,7 @@ export interface SignatureProps {
|
|
|
7
7
|
className: string;
|
|
8
8
|
confirm?: (canvas: HTMLCanvasElement, dataurl: string) => void;
|
|
9
9
|
clear?: () => void;
|
|
10
|
+
onConfirm?: (canvas: HTMLCanvasElement, dataurl: string) => void;
|
|
11
|
+
onClear?: () => void;
|
|
10
12
|
}
|
|
11
13
|
export declare const Signature: FunctionComponent<Partial<SignatureProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -14,6 +14,8 @@ export interface SignatureProps {
|
|
|
14
14
|
className: string;
|
|
15
15
|
confirm?: (dataurl: string) => void;
|
|
16
16
|
clear?: () => void;
|
|
17
|
+
onConfirm?: (dataurl: string) => void;
|
|
18
|
+
onClear?: () => void;
|
|
17
19
|
}
|
|
18
20
|
export declare const Signature: FunctionComponent<Partial<SignatureProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
19
21
|
export {};
|
|
@@ -6,5 +6,6 @@ export interface StepsProps {
|
|
|
6
6
|
className: string;
|
|
7
7
|
style: React.CSSProperties;
|
|
8
8
|
clickStep: (index: number) => void;
|
|
9
|
+
onClickStep: (index: number) => void;
|
|
9
10
|
}
|
|
10
11
|
export declare const Steps: FunctionComponent<Partial<StepsProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -6,5 +6,6 @@ export interface StepsProps {
|
|
|
6
6
|
className: string;
|
|
7
7
|
style: React.CSSProperties;
|
|
8
8
|
clickStep: (index: number) => void;
|
|
9
|
+
onClickStep: (index: number) => void;
|
|
9
10
|
}
|
|
10
11
|
export declare const Steps: FunctionComponent<Partial<StepsProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -9,6 +9,6 @@ export interface SwitchProps {
|
|
|
9
9
|
inactiveText: string;
|
|
10
10
|
className: string;
|
|
11
11
|
style: React.CSSProperties;
|
|
12
|
-
|
|
12
|
+
onChange: (val: boolean, event: React.MouseEvent) => void;
|
|
13
13
|
}
|
|
14
14
|
export declare const Switch: FunctionComponent<Partial<SwitchProps>>;
|
|
@@ -9,6 +9,6 @@ export interface SwitchProps {
|
|
|
9
9
|
inactiveText: string;
|
|
10
10
|
className: string;
|
|
11
11
|
style: React.CSSProperties;
|
|
12
|
-
|
|
12
|
+
onChange: (val: boolean, event: React.MouseEvent) => void;
|
|
13
13
|
}
|
|
14
14
|
export declare const Switch: FunctionComponent<Partial<SwitchProps>>;
|
|
@@ -9,6 +9,7 @@ export interface TabbarProps {
|
|
|
9
9
|
className: string;
|
|
10
10
|
style: React.CSSProperties;
|
|
11
11
|
tabSwitch: (child: React.ReactElement<any>, active: number) => void;
|
|
12
|
+
onSwitch: (child: React.ReactElement<any>, active: number) => void;
|
|
12
13
|
children?: React.ReactNode;
|
|
13
14
|
}
|
|
14
15
|
export declare const Tabbar: FunctionComponent<Partial<TabbarProps>>;
|
|
@@ -9,6 +9,7 @@ export interface TabbarProps {
|
|
|
9
9
|
className: string;
|
|
10
10
|
style: React.CSSProperties;
|
|
11
11
|
tabSwitch: (child: React.ReactElement<any>, active: number) => void;
|
|
12
|
+
onSwitch: (child: React.ReactElement<any>, active: number) => void;
|
|
12
13
|
children?: React.ReactNode;
|
|
13
14
|
}
|
|
14
15
|
export declare const Tabbar: FunctionComponent<Partial<TabbarProps>>;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
interface TabPanelInnerProps {
|
|
3
|
+
autoHeightClassName: string;
|
|
4
|
+
}
|
|
2
5
|
export interface TabPaneProps {
|
|
3
6
|
title: string | number;
|
|
4
7
|
paneKey: string | number;
|
|
5
8
|
activeKey: string | number;
|
|
6
9
|
disabled: boolean;
|
|
7
|
-
|
|
10
|
+
className: string;
|
|
8
11
|
children?: React.ReactNode;
|
|
9
12
|
}
|
|
10
|
-
export declare const TabPane: FunctionComponent<Partial<TabPaneProps>>;
|
|
13
|
+
export declare const TabPane: FunctionComponent<Partial<TabPaneProps & TabPanelInnerProps>>;
|
|
14
|
+
export {};
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
interface TabPanelInnerProps {
|
|
3
|
+
autoHeightClassName: string;
|
|
4
|
+
}
|
|
2
5
|
export interface TabPaneProps {
|
|
3
6
|
title: string | number;
|
|
4
7
|
paneKey: string | number;
|
|
5
8
|
activeKey: string | number;
|
|
6
9
|
disabled: boolean;
|
|
7
10
|
autoHeightClassName: string;
|
|
11
|
+
className: string;
|
|
8
12
|
children?: React.ReactNode;
|
|
9
13
|
}
|
|
10
|
-
export declare const TabPane: FunctionComponent<Partial<TabPaneProps>>;
|
|
14
|
+
export declare const TabPane: FunctionComponent<Partial<TabPaneProps & TabPanelInnerProps>>;
|
|
15
|
+
export {};
|
|
@@ -11,6 +11,7 @@ export declare type TabsSize = 'large' | 'normal' | 'small';
|
|
|
11
11
|
export interface TabsProps extends IComponent {
|
|
12
12
|
className: string;
|
|
13
13
|
style: React.CSSProperties;
|
|
14
|
+
tabStyle: React.CSSProperties;
|
|
14
15
|
value: string | number;
|
|
15
16
|
color: string;
|
|
16
17
|
background: string;
|
|
@@ -11,6 +11,7 @@ export declare type TabsSize = 'large' | 'normal' | 'small';
|
|
|
11
11
|
export interface TabsProps extends IComponent {
|
|
12
12
|
className: string;
|
|
13
13
|
style: React.CSSProperties;
|
|
14
|
+
tabStyle: React.CSSProperties;
|
|
14
15
|
value: string | number;
|
|
15
16
|
color: string;
|
|
16
17
|
background: string;
|
|
@@ -6,6 +6,7 @@ export interface DateType {
|
|
|
6
6
|
}
|
|
7
7
|
export interface TimeSelectProps {
|
|
8
8
|
className?: string;
|
|
9
|
+
style: React.CSSProperties;
|
|
9
10
|
visible?: boolean;
|
|
10
11
|
height?: string;
|
|
11
12
|
multiple?: boolean;
|
|
@@ -17,5 +18,8 @@ export interface TimeSelectProps {
|
|
|
17
18
|
select?: (selectTimeData: TimeType[]) => void;
|
|
18
19
|
pannelChange?: (pannelKey: string | number, selectTimeData: TimeType[]) => void;
|
|
19
20
|
timeChange?: (time: string, selectTimeData: TimeType[]) => void;
|
|
21
|
+
onSelect?: (selectTimeData: TimeType[]) => void;
|
|
22
|
+
onPannelChange?: (pannelKey: string | number, selectTimeData: TimeType[]) => void;
|
|
23
|
+
onTimeChange?: (time: string, selectTimeData: TimeType[]) => void;
|
|
20
24
|
}
|
|
21
|
-
export declare const TimeSelect: FunctionComponent<Partial<TimeSelectProps
|
|
25
|
+
export declare const TimeSelect: FunctionComponent<Partial<TimeSelectProps>>;
|
|
@@ -6,6 +6,7 @@ export interface DateType {
|
|
|
6
6
|
}
|
|
7
7
|
export interface TimeSelectProps {
|
|
8
8
|
className?: string;
|
|
9
|
+
style: React.CSSProperties;
|
|
9
10
|
visible?: boolean;
|
|
10
11
|
height?: string;
|
|
11
12
|
multiple?: boolean;
|
|
@@ -17,5 +18,8 @@ export interface TimeSelectProps {
|
|
|
17
18
|
select?: (selectTimeData: TimeType[]) => void;
|
|
18
19
|
pannelChange?: (pannelKey: string | number, selectTimeData: TimeType[]) => void;
|
|
19
20
|
timeChange?: (time: string, selectTimeData: TimeType[]) => void;
|
|
21
|
+
onSelect?: (selectTimeData: TimeType[]) => void;
|
|
22
|
+
onPannelChange?: (pannelKey: string | number, selectTimeData: TimeType[]) => void;
|
|
23
|
+
onTimeChange?: (time: string, selectTimeData: TimeType[]) => void;
|
|
20
24
|
}
|
|
21
|
-
export declare const TimeSelect: FunctionComponent<Partial<TimeSelectProps
|
|
25
|
+
export declare const TimeSelect: FunctionComponent<Partial<TimeSelectProps>>;
|
|
@@ -17,5 +17,8 @@ export interface VideoProps {
|
|
|
17
17
|
play: (e: HTMLVideoElement) => void;
|
|
18
18
|
pause: (e: HTMLVideoElement) => void;
|
|
19
19
|
playend: (e: HTMLVideoElement) => void;
|
|
20
|
+
onPlayFuc: (e: HTMLVideoElement) => void;
|
|
21
|
+
onPauseFuc: (e: HTMLVideoElement) => void;
|
|
22
|
+
onPlayend: (e: HTMLVideoElement) => void;
|
|
20
23
|
}
|
|
21
24
|
export declare const Video: FunctionComponent<Partial<VideoProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -16,6 +16,8 @@ export interface PositionType {
|
|
|
16
16
|
right: number;
|
|
17
17
|
}
|
|
18
18
|
export interface IVirtualListProps {
|
|
19
|
+
className?: string;
|
|
20
|
+
style?: React.CSSProperties;
|
|
19
21
|
sourceData: Array<Data>;
|
|
20
22
|
containerSize?: number;
|
|
21
23
|
ItemRender?: React.FC<any>;
|
|
@@ -24,9 +26,9 @@ export interface IVirtualListProps {
|
|
|
24
26
|
horizontal?: boolean;
|
|
25
27
|
overscan?: number;
|
|
26
28
|
handleScroll?: (...args: any[]) => any;
|
|
29
|
+
onScroll?: (...args: any[]) => any;
|
|
27
30
|
key?: string;
|
|
28
31
|
locale?: {
|
|
29
32
|
[key in string]: string;
|
|
30
33
|
};
|
|
31
|
-
className?: string;
|
|
32
34
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
2
|
import { IVirtualListProps } from './type';
|
|
3
3
|
export declare type VirtualListProps = IVirtualListProps;
|
|
4
|
-
export declare const VirtualList: FunctionComponent<VirtualListProps
|
|
4
|
+
export declare const VirtualList: FunctionComponent<VirtualListProps>;
|
|
@@ -495,7 +495,7 @@ var InternalUploader = function InternalUploader(props, ref) {
|
|
|
495
495
|
classPrefix: props.iconClassPrefix,
|
|
496
496
|
fontClassName: props.iconFontClassName,
|
|
497
497
|
name: "link"
|
|
498
|
-
}), "\xA0", item.name), React__default.createElement(Icon, {
|
|
498
|
+
}), "\xA0", item.name), isDeletable && React__default.createElement(Icon, {
|
|
499
499
|
classPrefix: props.iconClassPrefix,
|
|
500
500
|
fontClassName: props.iconFontClassName,
|
|
501
501
|
color: "#808080",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["children", "source", "options", "className", "play", "pause", "playend"];
|
|
3
|
+
var _excluded = ["children", "source", "options", "className", "play", "pause", "playend", "onPlayFuc", "onPauseFuc", "onPlayend"];
|
|
4
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
import React__default, { useRef, useEffect } from 'react';
|
|
@@ -29,6 +29,9 @@ var Video = function Video(props) {
|
|
|
29
29
|
play = _defaultProps$props.play,
|
|
30
30
|
pause = _defaultProps$props.pause,
|
|
31
31
|
playend = _defaultProps$props.playend,
|
|
32
|
+
onPlayFuc = _defaultProps$props.onPlayFuc,
|
|
33
|
+
onPauseFuc = _defaultProps$props.onPauseFuc,
|
|
34
|
+
onPlayend = _defaultProps$props.onPlayend,
|
|
32
35
|
restProps = _objectWithoutProperties(_defaultProps$props, _excluded);
|
|
33
36
|
var rootRef = useRef(null);
|
|
34
37
|
var b = cn('video');
|
|
@@ -51,13 +54,16 @@ var Video = function Video(props) {
|
|
|
51
54
|
videoRef.setAttribute('x5-video-player-fullscreen', 'false');
|
|
52
55
|
}
|
|
53
56
|
videoRef.addEventListener('play', function () {
|
|
57
|
+
onPlayFuc && onPlayFuc(videoRef);
|
|
54
58
|
play && play(videoRef);
|
|
55
59
|
});
|
|
56
60
|
videoRef.addEventListener('pause', function () {
|
|
61
|
+
onPauseFuc && onPauseFuc(videoRef);
|
|
57
62
|
pause && pause(videoRef);
|
|
58
63
|
});
|
|
59
64
|
videoRef.addEventListener('ended', function () {
|
|
60
65
|
videoRef.currentTime = 0;
|
|
66
|
+
onPlayend && onPlayend(videoRef);
|
|
61
67
|
playend && playend(videoRef);
|
|
62
68
|
});
|
|
63
69
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["sourceData", "ItemRender", "itemEqualSize", "itemSize", "horizontal", "overscan", "key", "handleScroll", "className", "containerSize"];
|
|
4
|
+
var _excluded = ["sourceData", "ItemRender", "itemEqualSize", "itemSize", "horizontal", "overscan", "key", "handleScroll", "onScroll", "className", "containerSize"];
|
|
5
5
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
7
|
import React__default, { useRef, useState, useEffect, useCallback } from 'react';
|
|
@@ -146,6 +146,7 @@ var VirtualList = function VirtualList(props) {
|
|
|
146
146
|
overscan = _props$overscan === void 0 ? 2 : _props$overscan,
|
|
147
147
|
key = props.key,
|
|
148
148
|
handleScroll = props.handleScroll,
|
|
149
|
+
onScroll = props.onScroll,
|
|
149
150
|
className = props.className,
|
|
150
151
|
containerSize = props.containerSize,
|
|
151
152
|
rest = _objectWithoutProperties(props, _excluded);
|
|
@@ -230,7 +231,7 @@ var VirtualList = function VirtualList(props) {
|
|
|
230
231
|
var totalSize = getListTotalSize(positions, horizontal);
|
|
231
232
|
setListTotalSize(totalSize);
|
|
232
233
|
}, [positions, sizeKey, horizontal]);
|
|
233
|
-
var
|
|
234
|
+
var scroll = useCallback(function () {
|
|
234
235
|
requestAnimationFrame(function (e) {
|
|
235
236
|
var scrollSize = getElement()[scrollKey];
|
|
236
237
|
var startIndex = binarySearch(positions, scrollSize, horizontal);
|
|
@@ -258,17 +259,21 @@ var VirtualList = function VirtualList(props) {
|
|
|
258
259
|
});
|
|
259
260
|
// 无限下滑
|
|
260
261
|
if (endIndex > sourceData.length - 1) {
|
|
261
|
-
|
|
262
|
+
if (onScroll) {
|
|
263
|
+
onScroll();
|
|
264
|
+
} else if (handleScroll) {
|
|
265
|
+
handleScroll();
|
|
266
|
+
}
|
|
262
267
|
}
|
|
263
268
|
});
|
|
264
269
|
}, [positions, getElement, sourceData, visibleCount, itemEqualSize, updateTotalSize, offsetKey, sizeKey, scrollKey, horizontal, overscan, handleScroll, offSetSize]);
|
|
265
270
|
useEffect(function () {
|
|
266
271
|
var element = getElement();
|
|
267
|
-
element.addEventListener('scroll',
|
|
272
|
+
element.addEventListener('scroll', scroll, false);
|
|
268
273
|
return function () {
|
|
269
|
-
element.removeEventListener('scroll',
|
|
274
|
+
element.removeEventListener('scroll', scroll, false);
|
|
270
275
|
};
|
|
271
|
-
}, [getElement,
|
|
276
|
+
}, [getElement, scroll]);
|
|
272
277
|
return React__default.createElement("div", _objectSpread(_objectSpread({
|
|
273
278
|
className: className ? "".concat(className, " nut-virtualList-box") : 'nut-virtualList-box'
|
|
274
279
|
}, rest), {}, {
|
package/dist/locales/base.js
CHANGED
package/dist/locales/en-US.js
CHANGED
package/dist/locales/id-ID.js
CHANGED
package/dist/locales/zh-CN.js
CHANGED
package/dist/locales/zh-TW.js
CHANGED