@nutui/nutui-react-taro 2.0.6 → 2.0.7
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 +9 -0
- package/dist/esm/Audio.js +2 -2
- package/dist/esm/DatePicker.js +2 -2
- package/dist/esm/Picker.js +1 -1
- package/dist/esm/Range.js +1 -1
- package/dist/esm/Uploader.js +1 -1
- package/dist/esm/{audio.taro-198b2c31.js → audio.taro-8398218d.js} +1 -1
- package/dist/esm/{datepicker.taro-9ca00609.js → datepicker.taro-8dd27172.js} +1 -1
- package/dist/esm/nutui-react.es.js +5 -5
- package/dist/esm/{picker.taro-bfe36c06.js → picker.taro-7e4954f3.js} +1 -1
- package/dist/esm/{range.taro-9f854c57.js → range.taro-70101605.js} +3 -3
- package/dist/esm/types/src/packages/audio/audio.d.ts +5 -4
- package/dist/esm/types/src/packages/avatar/avatar.d.ts +2 -1
- package/dist/esm/types/src/packages/avatar/avatar.taro.d.ts +2 -1
- package/dist/esm/types/src/packages/backtop/backtop.d.ts +2 -1
- package/dist/esm/types/src/packages/backtop/backtop.taro.d.ts +2 -1
- package/dist/esm/types/src/packages/button/button.d.ts +2 -1
- package/dist/esm/types/src/packages/button/button.taro.d.ts +2 -1
- package/dist/esm/types/src/packages/col/col.d.ts +2 -1
- package/dist/esm/types/src/packages/col/col.taro.d.ts +2 -1
- package/dist/esm/types/src/packages/dialog/config.d.ts +2 -1
- package/dist/esm/types/src/packages/formitem/types.d.ts +2 -1
- package/dist/esm/types/src/packages/row/row.d.ts +2 -1
- package/dist/esm/types/src/packages/row/row.taro.d.ts +2 -1
- package/dist/esm/types/src/packages/searchbar/searchbar.d.ts +6 -5
- package/dist/esm/types/src/packages/searchbar/searchbar.taro.d.ts +6 -5
- package/dist/esm/types/src/packages/swipe/swipe.d.ts +5 -4
- package/dist/esm/types/src/packages/swipe/swipe.taro.d.ts +5 -4
- package/dist/esm/types/src/packages/tag/tag.d.ts +2 -1
- package/dist/esm/types/src/packages/tag/tag.taro.d.ts +2 -1
- package/dist/esm/types/src/packages/textarea/textarea.d.ts +3 -2
- package/dist/esm/types/src/packages/uploader/uploader.d.ts +1 -0
- package/dist/esm/types/src/utils/use-touch.d.ts +2 -2
- package/dist/esm/{uploader.taro-8964a9b8.js → uploader.taro-f834c8ff.js} +2 -0
- 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/tr-TR.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +9 -7
- package/dist/nutui.react.umd.js +9 -7
- package/dist/style.mjs +1 -1
- package/dist/types/packages/avatar/avatar.taro.d.ts +2 -1
- package/dist/types/packages/backtop/backtop.taro.d.ts +2 -1
- package/dist/types/packages/button/button.taro.d.ts +3 -2
- package/dist/types/packages/col/col.taro.d.ts +2 -1
- package/dist/types/packages/dialog/config.d.ts +2 -1
- package/dist/types/packages/formitem/types.d.ts +2 -1
- package/dist/types/packages/row/row.taro.d.ts +2 -1
- package/dist/types/packages/searchbar/searchbar.taro.d.ts +10 -6
- package/dist/types/packages/swipe/swipe.taro.d.ts +5 -4
- package/dist/types/packages/tag/tag.taro.d.ts +2 -1
- package/dist/types/utils/use-touch.d.ts +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
# v2.0.7
|
|
2
|
+
`2023-07-26`
|
|
3
|
+
|
|
4
|
+
* :sparkles: feat: formitem label 支持 reactnode (#1254) @oasis-cloud
|
|
5
|
+
* :sparkles: feat: uploader 添加上传的响应数据 (#1251) @逍遥
|
|
6
|
+
* 🔨 chore: 优化 any 类型 (#1222) @junjun666
|
|
7
|
+
* 📖 docs(SearchBar): 补充 onClear 属性说明 (#1256) @Tralafalgar Wang
|
|
8
|
+
|
|
9
|
+
|
|
1
10
|
# v2.0.6
|
|
2
11
|
`2023-07-21`
|
|
3
12
|
|
package/dist/esm/Audio.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as Audio } from "./audio.taro-
|
|
1
|
+
import { A as Audio } from "./audio.taro-8398218d.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "@tarojs/taro";
|
|
4
4
|
import "@nutui/icons-react-taro";
|
|
5
|
-
import "./range.taro-
|
|
5
|
+
import "./range.taro-70101605.js";
|
|
6
6
|
import "classnames";
|
|
7
7
|
import "@tarojs/components";
|
|
8
8
|
import "./use-touch-ff43512c.js";
|
package/dist/esm/DatePicker.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { D as DatePicker } from "./datepicker.taro-
|
|
1
|
+
import { D as DatePicker } from "./datepicker.taro-8dd27172.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "@tarojs/components";
|
|
4
|
-
import "./picker.taro-
|
|
4
|
+
import "./picker.taro-7e4954f3.js";
|
|
5
5
|
import "classnames";
|
|
6
6
|
import "@tarojs/taro";
|
|
7
7
|
import "./popup.taro-6ecef0f4.js";
|
package/dist/esm/Picker.js
CHANGED
package/dist/esm/Range.js
CHANGED
package/dist/esm/Uploader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default, { useState, useRef } from "react";
|
|
2
2
|
import { createInnerAudioContext } from "@tarojs/taro";
|
|
3
3
|
import { Service } from "@nutui/icons-react-taro";
|
|
4
|
-
import { R as Range } from "./range.taro-
|
|
4
|
+
import { R as Range } from "./range.taro-70101605.js";
|
|
5
5
|
import { B as Button } from "./button.taro-25f559e1.js";
|
|
6
6
|
import { u as useConfig } from "./configprovider.taro-974adb9a.js";
|
|
7
7
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default, { useState, useEffect } from "react";
|
|
2
2
|
import { View } from "@tarojs/components";
|
|
3
|
-
import { P as Picker } from "./picker.taro-
|
|
3
|
+
import { P as Picker } from "./picker.taro-7e4954f3.js";
|
|
4
4
|
import { u as useConfig } from "./configprovider.taro-974adb9a.js";
|
|
5
5
|
import { u as usePropsValue } from "./use-props-value-e8331e19.js";
|
|
6
6
|
import { C as ComponentDefaults } from "./typings-11d83a22.js";
|
|
@@ -27,7 +27,7 @@ import { C as C5 } from "./calendar.taro-a91e6a63.js";
|
|
|
27
27
|
import { C as C6 } from "./calendaritem.taro-a4532b45.js";
|
|
28
28
|
import { C as C7 } from "./cascader.taro-b68a89ca.js";
|
|
29
29
|
import { C as C8, a } from "./checkbox.taro-07d5c9d5.js";
|
|
30
|
-
import { D as D2 } from "./datepicker.taro-
|
|
30
|
+
import { D as D2 } from "./datepicker.taro-8dd27172.js";
|
|
31
31
|
import { F as F2 } from "./form.taro-16cb71e2.js";
|
|
32
32
|
import { F as F3 } from "./formitem.taro-34af0204.js";
|
|
33
33
|
import { I as I2 } from "./input.taro-fb8e7a49.js";
|
|
@@ -35,16 +35,16 @@ import { I as I3 } from "./inputnumber.taro-9c74cc1c.js";
|
|
|
35
35
|
import { M } from "./menu.taro-7cab4e8c.js";
|
|
36
36
|
import { M as M2 } from "./menuitem.taro-567bf91f.js";
|
|
37
37
|
import { N as N2 } from "./numberkeyboard.taro-c4fc80ed.js";
|
|
38
|
-
import { P } from "./picker.taro-
|
|
38
|
+
import { P } from "./picker.taro-7e4954f3.js";
|
|
39
39
|
import { R as R2, a as a2 } from "./radio.taro-802db0e9.js";
|
|
40
|
-
import { R as R3 } from "./range.taro-
|
|
40
|
+
import { R as R3 } from "./range.taro-70101605.js";
|
|
41
41
|
import { R as R4 } from "./rate.taro-f090e140.js";
|
|
42
42
|
import { S as S5 } from "./searchbar.taro-14821587.js";
|
|
43
43
|
import { S as S6 } from "./shortpassword.taro-2533954b.js";
|
|
44
44
|
import { S as S7 } from "./signature.taro-3e0c2694.js";
|
|
45
45
|
import { S as S8 } from "./switch.taro-bbdada9e.js";
|
|
46
46
|
import { T as T5 } from "./textarea.taro-38d284c4.js";
|
|
47
|
-
import { U } from "./uploader.taro-
|
|
47
|
+
import { U } from "./uploader.taro-f834c8ff.js";
|
|
48
48
|
import { A as A2 } from "./actionsheet.taro-b642975d.js";
|
|
49
49
|
import { B as B3 } from "./badge.taro-289489e5.js";
|
|
50
50
|
import { B as B4 } from "./dialog.taro-0a2dfa58.js";
|
|
@@ -61,7 +61,7 @@ import { S as S10 } from "./swipe.taro-36f8782e.js";
|
|
|
61
61
|
import { T as T6 } from "./toast.taro-9e5afd6d.js";
|
|
62
62
|
import { A as A3 } from "./animate.taro-37bf4eab.js";
|
|
63
63
|
import { default as default2 } from "./AnimatingNumbers.js";
|
|
64
|
-
import { A as A4 } from "./audio.taro-
|
|
64
|
+
import { A as A4 } from "./audio.taro-8398218d.js";
|
|
65
65
|
import { A as A5 } from "./avatar.taro-dd654a49.js";
|
|
66
66
|
import { A as A6 } from "./avatargroup.taro-1f8b7174.js";
|
|
67
67
|
import { C as C9 } from "./circleprogress.taro-417e1d3f.js";
|
|
@@ -205,7 +205,7 @@ const Range = (props) => {
|
|
|
205
205
|
setEaxctValue(newValue);
|
|
206
206
|
updateValue(newValue);
|
|
207
207
|
};
|
|
208
|
-
const onTouchEnd = (
|
|
208
|
+
const onTouchEnd = () => {
|
|
209
209
|
if (disabled) {
|
|
210
210
|
return;
|
|
211
211
|
}
|
|
@@ -246,8 +246,8 @@ const Range = (props) => {
|
|
|
246
246
|
setButtonIndex(index);
|
|
247
247
|
}
|
|
248
248
|
onTouchStart(e);
|
|
249
|
-
}, onTouchMove: (e) => onTouchMove(e), onTouchEnd
|
|
250
|
-
}) : React__default.createElement(View, { catchMove: true, className: "nut-range-button-wrapper", onTouchStart: (e) => onTouchStart(e), onTouchMove: (e) => onTouchMove(e), onTouchEnd
|
|
249
|
+
}, onTouchMove: (e) => onTouchMove(e), onTouchEnd, onTouchCancel: onTouchEnd, onClick: (e) => e.stopPropagation() }, renderButton(index));
|
|
250
|
+
}) : React__default.createElement(View, { catchMove: true, className: "nut-range-button-wrapper", onTouchStart: (e) => onTouchStart(e), onTouchMove: (e) => onTouchMove(e), onTouchEnd, onTouchCancel: onTouchEnd, onClick: (e) => e.stopPropagation() }, renderButton()))
|
|
251
251
|
),
|
|
252
252
|
maxDescription !== null && React__default.createElement("div", { className: "max" }, maxDescription || max)
|
|
253
253
|
);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import React, { FunctionComponent
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import type { SyntheticEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '@/utils/typings';
|
|
3
4
|
export interface AudioProps extends BasicComponent {
|
|
4
5
|
src: string;
|
|
@@ -9,9 +10,9 @@ export interface AudioProps extends BasicComponent {
|
|
|
9
10
|
type: string;
|
|
10
11
|
onBack: (e: HTMLAudioElement) => void;
|
|
11
12
|
onForward: (e: HTMLAudioElement) => void;
|
|
12
|
-
onPause: (
|
|
13
|
-
onEnd: (e: HTMLAudioElement) => void;
|
|
13
|
+
onPause: (e: SyntheticEvent<HTMLAudioElement>) => void;
|
|
14
|
+
onEnd: (e: SyntheticEvent<HTMLAudioElement>) => void;
|
|
14
15
|
onMute: (e: HTMLAudioElement) => void;
|
|
15
|
-
onCanPlay: (
|
|
16
|
+
onCanPlay: (e: SyntheticEvent<HTMLAudioElement>) => void;
|
|
16
17
|
}
|
|
17
18
|
export declare const Audio: FunctionComponent<Partial<AudioProps> & React.HTMLAttributes<HTMLElement>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import type { MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '@/utils/typings';
|
|
3
4
|
import AvatarGroup from '@/packages/avatargroup';
|
|
4
5
|
export interface AvatarProps extends BasicComponent {
|
|
@@ -10,7 +11,7 @@ export interface AvatarProps extends BasicComponent {
|
|
|
10
11
|
color: string;
|
|
11
12
|
src: string;
|
|
12
13
|
alt: string;
|
|
13
|
-
onClick: (e: MouseEvent) => void;
|
|
14
|
+
onClick: (e: MouseEvent<HTMLDivElement>) => void;
|
|
14
15
|
onError: () => void;
|
|
15
16
|
}
|
|
16
17
|
export type AvatarShape = 'round' | 'square';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import type { MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '@/utils/typings';
|
|
3
4
|
import AvatarGroup from '@/packages/avatargroup/index.taro';
|
|
4
5
|
export interface AvatarProps extends BasicComponent {
|
|
@@ -10,7 +11,7 @@ export interface AvatarProps extends BasicComponent {
|
|
|
10
11
|
fit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
11
12
|
src: string;
|
|
12
13
|
alt: string;
|
|
13
|
-
onClick: (e: MouseEvent) => void;
|
|
14
|
+
onClick: (e: MouseEvent<HTMLDivElement>) => void;
|
|
14
15
|
onError: () => void;
|
|
15
16
|
}
|
|
16
17
|
export type AvatarShape = 'round' | 'square';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import type { MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '@/utils/typings';
|
|
3
4
|
export interface BackTopProps extends BasicComponent {
|
|
4
5
|
target: string;
|
|
5
6
|
threshold: number;
|
|
6
7
|
zIndex: number;
|
|
7
8
|
duration: number;
|
|
8
|
-
onClick?: (event: MouseEvent) => void;
|
|
9
|
+
onClick?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
9
10
|
}
|
|
10
11
|
export declare const BackTop: FunctionComponent<Partial<BackTopProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import type { MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '@/utils/typings';
|
|
3
4
|
export interface BackTopProps extends BasicComponent {
|
|
4
5
|
threshold: number;
|
|
5
6
|
zIndex: number;
|
|
6
7
|
duration: number;
|
|
7
|
-
onClick?: (event: MouseEvent) => void;
|
|
8
|
+
onClick?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
8
9
|
}
|
|
9
10
|
export declare const BackTop: FunctionComponent<Partial<BackTopProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '@/utils/typings';
|
|
3
4
|
export type ButtonType = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger';
|
|
4
5
|
export type ButtonSize = 'large' | 'normal' | 'small';
|
|
@@ -16,6 +17,6 @@ export interface ButtonProps extends BasicComponent {
|
|
|
16
17
|
icon: React.ReactNode;
|
|
17
18
|
id: string;
|
|
18
19
|
nativeType: 'submit' | 'reset' | 'button';
|
|
19
|
-
onClick: (e: MouseEvent) => void;
|
|
20
|
+
onClick: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
20
21
|
}
|
|
21
22
|
export declare const Button: React.ForwardRefExoticComponent<Partial<ButtonProps> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { MouseEvent } from 'react';
|
|
2
3
|
import { ButtonProps as MiniProgramButtonProps } from '@tarojs/components';
|
|
3
4
|
import { BasicComponent } from '@/utils/typings';
|
|
4
5
|
type OmitMiniProgramButtonProps = Omit<MiniProgramButtonProps, 'size' | 'type' | 'onClick' | 'style'>;
|
|
@@ -16,7 +17,7 @@ export interface ButtonProps extends BasicComponent, OmitMiniProgramButtonProps
|
|
|
16
17
|
loading: boolean;
|
|
17
18
|
disabled: boolean;
|
|
18
19
|
icon: React.ReactNode;
|
|
19
|
-
onClick: (e: MouseEvent) => void;
|
|
20
|
+
onClick: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
20
21
|
}
|
|
21
22
|
export declare const Button: React.ForwardRefExoticComponent<Omit<Partial<ButtonProps>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
22
23
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import type { MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '@/utils/typings';
|
|
3
4
|
export type ColEventType = 'row' | 'col';
|
|
4
5
|
export interface ColProps extends BasicComponent {
|
|
5
6
|
span: string | number;
|
|
6
7
|
offset: string | number;
|
|
7
8
|
gutter: string | number;
|
|
8
|
-
onClick: (e:
|
|
9
|
+
onClick: (e: MouseEvent<HTMLDivElement>, type: ColEventType) => void;
|
|
9
10
|
}
|
|
10
11
|
export declare const Col: FunctionComponent<Partial<ColProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import type { MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '@/utils/typings';
|
|
3
4
|
export type ColEventType = 'row' | 'col';
|
|
4
5
|
export interface ColProps extends BasicComponent {
|
|
5
6
|
span: string | number;
|
|
6
7
|
offset: string | number;
|
|
7
8
|
gutter: string | number;
|
|
8
|
-
onClick: (e:
|
|
9
|
+
onClick: (e: MouseEvent<HTMLDivElement>, type: ColEventType) => void;
|
|
9
10
|
}
|
|
10
11
|
export declare const Col: FunctionComponent<Partial<ColProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode, ForwardRefExoticComponent, PropsWithChildren } from 'react';
|
|
2
|
+
import type { MouseEvent } from 'react';
|
|
2
3
|
export type DialogConfigType = {
|
|
3
4
|
prefixCls?: string;
|
|
4
5
|
simple?: boolean;
|
|
@@ -20,7 +21,7 @@ export interface BasicDialogProps {
|
|
|
20
21
|
beforeClose?: () => boolean;
|
|
21
22
|
beforeCancel?: () => boolean;
|
|
22
23
|
onClose?: () => void;
|
|
23
|
-
onConfirm?: (e?: MouseEvent) => Promise<() => void> | void;
|
|
24
|
+
onConfirm?: (e?: MouseEvent<HTMLButtonElement>) => Promise<() => void> | void;
|
|
24
25
|
onCancel?: () => void;
|
|
25
26
|
onClick?: () => void;
|
|
26
27
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
export interface FormItemRuleWithoutValidator {
|
|
2
3
|
[key: string]: any;
|
|
3
4
|
regex?: RegExp;
|
|
@@ -15,7 +16,7 @@ export interface BaseFormField {
|
|
|
15
16
|
/**
|
|
16
17
|
* label 标签的文本
|
|
17
18
|
*/
|
|
18
|
-
label:
|
|
19
|
+
label: ReactNode;
|
|
19
20
|
/**
|
|
20
21
|
* 校验规则,设置字段的校验逻辑
|
|
21
22
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import type { MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '@/utils/typings';
|
|
3
4
|
export type RowEventType = 'row' | 'col';
|
|
4
5
|
export interface RowProps extends BasicComponent {
|
|
@@ -7,6 +8,6 @@ export interface RowProps extends BasicComponent {
|
|
|
7
8
|
align: string;
|
|
8
9
|
wrap: string;
|
|
9
10
|
gutter: string | number;
|
|
10
|
-
onClick: (e:
|
|
11
|
+
onClick: (e: MouseEvent<HTMLDivElement>, type: RowEventType) => void;
|
|
11
12
|
}
|
|
12
13
|
export declare const Row: FunctionComponent<Partial<RowProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import type { MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '@/utils/typings';
|
|
3
4
|
export type RowEventType = 'row' | 'col';
|
|
4
5
|
export interface RowProps extends BasicComponent {
|
|
@@ -7,6 +8,6 @@ export interface RowProps extends BasicComponent {
|
|
|
7
8
|
align: string;
|
|
8
9
|
wrap: string;
|
|
9
10
|
gutter: string | number;
|
|
10
|
-
onClick: (e:
|
|
11
|
+
onClick: (e: MouseEvent<HTMLDivElement>, type: RowEventType) => void;
|
|
11
12
|
}
|
|
12
13
|
export declare const Row: FunctionComponent<Partial<RowProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import type { ChangeEvent, FocusEvent, MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '@/utils/typings';
|
|
3
4
|
export interface SearchBarProps extends BasicComponent {
|
|
4
5
|
/** 文本值 */
|
|
@@ -24,14 +25,14 @@ export interface SearchBarProps extends BasicComponent {
|
|
|
24
25
|
/** 确定搜索时触发 */
|
|
25
26
|
onSearch?: (val: string) => void;
|
|
26
27
|
/** 输入框内容变化时触发 */
|
|
27
|
-
onChange?: (value: string, event:
|
|
28
|
+
onChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void;
|
|
28
29
|
/** 输入框获得焦点时触发 */
|
|
29
|
-
onFocus?: (value: string, event:
|
|
30
|
+
onFocus?: (value: string, event: FocusEvent<HTMLInputElement>) => void;
|
|
30
31
|
/** 输入框失去焦点时触发 */
|
|
31
|
-
onBlur?: (value: string, event:
|
|
32
|
+
onBlur?: (value: string, event: FocusEvent<HTMLInputElement>) => void;
|
|
32
33
|
/** 点击清除按钮后触发 */
|
|
33
|
-
onClear?: (event:
|
|
34
|
+
onClear?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
34
35
|
/** 点击输入区域时触发 */
|
|
35
|
-
onInputClick?: (event:
|
|
36
|
+
onInputClick?: (event: MouseEvent<HTMLInputElement>) => void;
|
|
36
37
|
}
|
|
37
38
|
export declare const SearchBar: FunctionComponent<Partial<SearchBarProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onFocus' | 'onBlur'>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import type { ChangeEvent, FocusEvent, MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '@/utils/typings';
|
|
3
4
|
export interface SearchBarProps extends BasicComponent {
|
|
4
5
|
/** 文本值 */
|
|
@@ -24,14 +25,14 @@ export interface SearchBarProps extends BasicComponent {
|
|
|
24
25
|
/** 确定搜索时触发 */
|
|
25
26
|
onSearch?: (val: string) => void;
|
|
26
27
|
/** 输入框内容变化时触发 */
|
|
27
|
-
onChange?: (value: string, event:
|
|
28
|
+
onChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void;
|
|
28
29
|
/** 输入框获得焦点时触发 */
|
|
29
|
-
onFocus?: (value: string, event:
|
|
30
|
+
onFocus?: (value: string, event: FocusEvent<HTMLInputElement>) => void;
|
|
30
31
|
/** 输入框失去焦点时触发 */
|
|
31
|
-
onBlur?: (value: string, event:
|
|
32
|
+
onBlur?: (value: string, event: FocusEvent<HTMLInputElement>) => void;
|
|
32
33
|
/** 点击清除按钮后触发 */
|
|
33
|
-
onClear?: (event:
|
|
34
|
+
onClear?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
34
35
|
/** 点击输入区域时触发 */
|
|
35
|
-
onInputClick?: (event:
|
|
36
|
+
onInputClick?: (event: MouseEvent<HTMLInputElement>) => void;
|
|
36
37
|
}
|
|
37
38
|
export declare const SearchBar: FunctionComponent<Partial<SearchBarProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onFocus' | 'onBlur'>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { TouchEvent, MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '@/utils/typings';
|
|
3
4
|
export type SwipeSide = 'left' | 'right';
|
|
4
5
|
export interface SwipeInstance {
|
|
@@ -27,9 +28,9 @@ export interface SwipeProps extends BasicComponent {
|
|
|
27
28
|
position: SwipeSide;
|
|
28
29
|
}) => void;
|
|
29
30
|
/** 点击时触发 */
|
|
30
|
-
onActionClick?: (event:
|
|
31
|
-
onTouchStart?: (event:
|
|
32
|
-
onTouchEnd?: (event:
|
|
33
|
-
onTouchMove?: (event:
|
|
31
|
+
onActionClick?: (event: MouseEvent<HTMLDivElement>, position: SwipeSide) => void;
|
|
32
|
+
onTouchStart?: (event: TouchEvent<HTMLDivElement>) => void;
|
|
33
|
+
onTouchEnd?: (event: TouchEvent<HTMLDivElement>) => void;
|
|
34
|
+
onTouchMove?: (event: TouchEvent<HTMLDivElement>) => void;
|
|
34
35
|
}
|
|
35
36
|
export declare const Swipe: React.ForwardRefExoticComponent<Partial<SwipeProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onTouchEnd" | "onTouchMove" | "onTouchStart"> & React.RefAttributes<SwipeInstance>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { TouchEvent, MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '@/utils/typings';
|
|
3
4
|
export type SwipeSide = 'left' | 'right';
|
|
4
5
|
export interface SwipeInstance {
|
|
@@ -27,9 +28,9 @@ export interface SwipeProps extends BasicComponent {
|
|
|
27
28
|
position: SwipeSide;
|
|
28
29
|
}) => void;
|
|
29
30
|
/** 点击时触发 */
|
|
30
|
-
onActionClick?: (event:
|
|
31
|
-
onTouchStart?: (event:
|
|
32
|
-
onTouchEnd?: (event:
|
|
33
|
-
onTouchMove?: (event:
|
|
31
|
+
onActionClick?: (event: MouseEvent<HTMLDivElement>, position: SwipeSide) => void;
|
|
32
|
+
onTouchStart?: (event: TouchEvent<HTMLDivElement>) => void;
|
|
33
|
+
onTouchEnd?: (event: TouchEvent<HTMLDivElement>) => void;
|
|
34
|
+
onTouchMove?: (event: TouchEvent<HTMLDivElement>) => void;
|
|
34
35
|
}
|
|
35
36
|
export declare const Swipe: React.ForwardRefExoticComponent<Partial<SwipeProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onTouchEnd" | "onTouchMove" | "onTouchStart"> & React.RefAttributes<SwipeInstance>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import type { MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '@/utils/typings';
|
|
3
4
|
export type TagType = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger';
|
|
4
5
|
export interface TagProps extends BasicComponent {
|
|
@@ -10,7 +11,7 @@ export interface TagProps extends BasicComponent {
|
|
|
10
11
|
mark: boolean;
|
|
11
12
|
closeable: boolean;
|
|
12
13
|
closeIcon: ReactNode;
|
|
13
|
-
onClick: (e: MouseEvent) => void;
|
|
14
|
+
onClick: (e: MouseEvent<HTMLDivElement>) => void;
|
|
14
15
|
onClose: (e?: any) => void;
|
|
15
16
|
}
|
|
16
17
|
export declare const Tag: FunctionComponent<Partial<TagProps>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import type { MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '@/utils/typings';
|
|
3
4
|
export type TagType = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger';
|
|
4
5
|
export interface TagProps extends BasicComponent {
|
|
@@ -10,7 +11,7 @@ export interface TagProps extends BasicComponent {
|
|
|
10
11
|
mark: boolean;
|
|
11
12
|
closeable: boolean;
|
|
12
13
|
closeIcon: ReactNode;
|
|
13
|
-
onClick: (e: MouseEvent) => void;
|
|
14
|
+
onClick: (e: MouseEvent<HTMLDivElement>) => void;
|
|
14
15
|
onClose: (e?: any) => void;
|
|
15
16
|
}
|
|
16
17
|
export declare const Tag: FunctionComponent<Partial<TagProps>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import type { FocusEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '@/utils/typings';
|
|
3
4
|
export interface TextAreaProps extends BasicComponent {
|
|
4
5
|
value: string;
|
|
@@ -11,7 +12,7 @@ export interface TextAreaProps extends BasicComponent {
|
|
|
11
12
|
disabled: boolean;
|
|
12
13
|
autoSize: boolean;
|
|
13
14
|
onChange: (value: string) => void;
|
|
14
|
-
onBlur: (event:
|
|
15
|
-
onFocus: (event:
|
|
15
|
+
onBlur: (event: FocusEvent<HTMLTextAreaElement>) => void;
|
|
16
|
+
onFocus: (event: FocusEvent<HTMLTextAreaElement>) => void;
|
|
16
17
|
}
|
|
17
18
|
export declare const TextArea: FunctionComponent<Partial<TextAreaProps> & Omit<React.HTMLAttributes<HTMLTextAreaElement>, 'onChange' | 'onBlur' | 'onFocus'>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type Direction = '' | 'vertical' | 'horizontal';
|
|
2
2
|
export declare function useTouch(): {
|
|
3
|
-
move:
|
|
4
|
-
start:
|
|
3
|
+
move: (event: React.TouchEvent<HTMLElement>) => void;
|
|
4
|
+
start: (event: React.TouchEvent<HTMLElement>) => void;
|
|
5
5
|
reset: () => void;
|
|
6
6
|
startX: number;
|
|
7
7
|
startY: number;
|
|
@@ -311,6 +311,7 @@ const InternalUploader = (props, ref) => {
|
|
|
311
311
|
if (item.uid === fileItem.uid) {
|
|
312
312
|
item.status = "success";
|
|
313
313
|
item.message = locale.uploader.success;
|
|
314
|
+
item.responseText = responseText;
|
|
314
315
|
}
|
|
315
316
|
});
|
|
316
317
|
return [...fileList2];
|
|
@@ -327,6 +328,7 @@ const InternalUploader = (props, ref) => {
|
|
|
327
328
|
if (item.uid === fileItem.uid) {
|
|
328
329
|
item.status = "error";
|
|
329
330
|
item.message = locale.uploader.error;
|
|
331
|
+
item.responseText = responseText;
|
|
330
332
|
}
|
|
331
333
|
});
|
|
332
334
|
return [...fileList2];
|
package/dist/locales/base.js
CHANGED
package/dist/locales/en-US.js
CHANGED
package/dist/locales/id-ID.js
CHANGED
package/dist/locales/tr-TR.js
CHANGED
package/dist/locales/zh-CN.js
CHANGED
package/dist/locales/zh-TW.js
CHANGED
package/dist/locales/zh-UG.js
CHANGED
package/dist/nutui.react.es.js
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
/*!
|
|
8
|
-
* @nutui/nutui-react-taro v2.0.
|
|
8
|
+
* @nutui/nutui-react-taro v2.0.7 Wed Jul 26 2023 14:03:27 GMT+0800 (China Standard Time)
|
|
9
9
|
* (c) 2023 @jdf2e.
|
|
10
10
|
* Released under the MIT License.
|
|
11
11
|
*/
|
|
@@ -8904,7 +8904,7 @@ const InternalPickerPanel = (props, ref) => {
|
|
|
8904
8904
|
const move = touch.deltaY - startY;
|
|
8905
8905
|
setMove(move);
|
|
8906
8906
|
};
|
|
8907
|
-
const touchEnd = (
|
|
8907
|
+
const touchEnd = () => {
|
|
8908
8908
|
if (!moving.current)
|
|
8909
8909
|
return;
|
|
8910
8910
|
const move = touch.deltaY - startY;
|
|
@@ -12468,7 +12468,7 @@ const Range = (props) => {
|
|
|
12468
12468
|
setEaxctValue(newValue);
|
|
12469
12469
|
updateValue(newValue);
|
|
12470
12470
|
};
|
|
12471
|
-
const onTouchEnd = (
|
|
12471
|
+
const onTouchEnd = () => {
|
|
12472
12472
|
if (disabled) {
|
|
12473
12473
|
return;
|
|
12474
12474
|
}
|
|
@@ -12517,8 +12517,8 @@ const Range = (props) => {
|
|
|
12517
12517
|
onTouchStart(e);
|
|
12518
12518
|
},
|
|
12519
12519
|
onTouchMove: (e) => onTouchMove(e),
|
|
12520
|
-
onTouchEnd
|
|
12521
|
-
onTouchCancel:
|
|
12520
|
+
onTouchEnd,
|
|
12521
|
+
onTouchCancel: onTouchEnd,
|
|
12522
12522
|
onClick: (e) => e.stopPropagation()
|
|
12523
12523
|
},
|
|
12524
12524
|
renderButton(index)
|
|
@@ -12530,8 +12530,8 @@ const Range = (props) => {
|
|
|
12530
12530
|
className: "nut-range-button-wrapper",
|
|
12531
12531
|
onTouchStart: (e) => onTouchStart(e),
|
|
12532
12532
|
onTouchMove: (e) => onTouchMove(e),
|
|
12533
|
-
onTouchEnd
|
|
12534
|
-
onTouchCancel:
|
|
12533
|
+
onTouchEnd,
|
|
12534
|
+
onTouchCancel: onTouchEnd,
|
|
12535
12535
|
onClick: (e) => e.stopPropagation()
|
|
12536
12536
|
},
|
|
12537
12537
|
renderButton()
|
|
@@ -13649,6 +13649,7 @@ const InternalUploader = (props, ref) => {
|
|
|
13649
13649
|
if (item.uid === fileItem.uid) {
|
|
13650
13650
|
item.status = "success";
|
|
13651
13651
|
item.message = locale.uploader.success;
|
|
13652
|
+
item.responseText = responseText;
|
|
13652
13653
|
}
|
|
13653
13654
|
});
|
|
13654
13655
|
return [...fileList2];
|
|
@@ -13665,6 +13666,7 @@ const InternalUploader = (props, ref) => {
|
|
|
13665
13666
|
if (item.uid === fileItem.uid) {
|
|
13666
13667
|
item.status = "error";
|
|
13667
13668
|
item.message = locale.uploader.error;
|
|
13669
|
+
item.responseText = responseText;
|
|
13668
13670
|
}
|
|
13669
13671
|
});
|
|
13670
13672
|
return [...fileList2];
|
package/dist/nutui.react.umd.js
CHANGED
|
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8
8
|
return value;
|
|
9
9
|
};
|
|
10
10
|
/*!
|
|
11
|
-
* @nutui/nutui-react-taro v2.0.
|
|
11
|
+
* @nutui/nutui-react-taro v2.0.7 Wed Jul 26 2023 14:03:27 GMT+0800 (China Standard Time)
|
|
12
12
|
* (c) 2023 @jdf2e.
|
|
13
13
|
* Released under the MIT License.
|
|
14
14
|
*/
|
|
@@ -8920,7 +8920,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8920
8920
|
const move = touch.deltaY - startY;
|
|
8921
8921
|
setMove(move);
|
|
8922
8922
|
};
|
|
8923
|
-
const touchEnd = (
|
|
8923
|
+
const touchEnd = () => {
|
|
8924
8924
|
if (!moving.current)
|
|
8925
8925
|
return;
|
|
8926
8926
|
const move = touch.deltaY - startY;
|
|
@@ -12484,7 +12484,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12484
12484
|
setEaxctValue(newValue);
|
|
12485
12485
|
updateValue(newValue);
|
|
12486
12486
|
};
|
|
12487
|
-
const onTouchEnd = (
|
|
12487
|
+
const onTouchEnd = () => {
|
|
12488
12488
|
if (disabled) {
|
|
12489
12489
|
return;
|
|
12490
12490
|
}
|
|
@@ -12533,8 +12533,8 @@ var __publicField = (obj, key, value) => {
|
|
|
12533
12533
|
onTouchStart(e);
|
|
12534
12534
|
},
|
|
12535
12535
|
onTouchMove: (e) => onTouchMove(e),
|
|
12536
|
-
onTouchEnd
|
|
12537
|
-
onTouchCancel:
|
|
12536
|
+
onTouchEnd,
|
|
12537
|
+
onTouchCancel: onTouchEnd,
|
|
12538
12538
|
onClick: (e) => e.stopPropagation()
|
|
12539
12539
|
},
|
|
12540
12540
|
renderButton(index)
|
|
@@ -12546,8 +12546,8 @@ var __publicField = (obj, key, value) => {
|
|
|
12546
12546
|
className: "nut-range-button-wrapper",
|
|
12547
12547
|
onTouchStart: (e) => onTouchStart(e),
|
|
12548
12548
|
onTouchMove: (e) => onTouchMove(e),
|
|
12549
|
-
onTouchEnd
|
|
12550
|
-
onTouchCancel:
|
|
12549
|
+
onTouchEnd,
|
|
12550
|
+
onTouchCancel: onTouchEnd,
|
|
12551
12551
|
onClick: (e) => e.stopPropagation()
|
|
12552
12552
|
},
|
|
12553
12553
|
renderButton()
|
|
@@ -13665,6 +13665,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13665
13665
|
if (item.uid === fileItem.uid) {
|
|
13666
13666
|
item.status = "success";
|
|
13667
13667
|
item.message = locale.uploader.success;
|
|
13668
|
+
item.responseText = responseText;
|
|
13668
13669
|
}
|
|
13669
13670
|
});
|
|
13670
13671
|
return [...fileList2];
|
|
@@ -13681,6 +13682,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13681
13682
|
if (item.uid === fileItem.uid) {
|
|
13682
13683
|
item.status = "error";
|
|
13683
13684
|
item.message = locale.uploader.error;
|
|
13685
|
+
item.responseText = responseText;
|
|
13684
13686
|
}
|
|
13685
13687
|
});
|
|
13686
13688
|
return [...fileList2];
|
package/dist/style.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import type { MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '../../utils/typings';
|
|
3
4
|
import AvatarGroup from '../../packages/avatargroup/index.taro';
|
|
4
5
|
export interface AvatarProps extends BasicComponent {
|
|
@@ -42,7 +43,7 @@ export interface AvatarProps extends BasicComponent {
|
|
|
42
43
|
* 点击头像触发事件
|
|
43
44
|
* @default -
|
|
44
45
|
*/
|
|
45
|
-
onClick: (e: MouseEvent) => void
|
|
46
|
+
onClick: (e: MouseEvent<HTMLDivElement>) => void
|
|
46
47
|
/**
|
|
47
48
|
* 图片加载失败的事件
|
|
48
49
|
* @default -
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import type { MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '../../utils/typings';
|
|
3
4
|
export interface BackTopProps extends BasicComponent {
|
|
4
5
|
/**
|
|
@@ -20,6 +21,6 @@ export interface BackTopProps extends BasicComponent {
|
|
|
20
21
|
* 按钮点击时触发事件
|
|
21
22
|
* @default -
|
|
22
23
|
*/
|
|
23
|
-
onClick?: (event: MouseEvent) => void
|
|
24
|
+
onClick?: (event: MouseEvent<HTMLDivElement>) => void
|
|
24
25
|
}
|
|
25
26
|
export declare const BackTop: FunctionComponent<Partial<BackTopProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { MouseEvent } from 'react';
|
|
2
3
|
import { ButtonProps as MiniProgramButtonProps } from '@tarojs/components';
|
|
3
4
|
import { BasicComponent } from '../../utils/typings';
|
|
4
5
|
type OmitMiniProgramButtonProps = Omit<MiniProgramButtonProps, 'size' | 'type' | 'onClick' | 'style'>;
|
|
@@ -54,9 +55,9 @@ export interface ButtonProps extends BasicComponent, OmitMiniProgramButtonProps
|
|
|
54
55
|
icon: React.ReactNode
|
|
55
56
|
/**
|
|
56
57
|
* 点击按钮时触发
|
|
57
|
-
* @default
|
|
58
|
+
* @default -
|
|
58
59
|
*/
|
|
59
|
-
onClick: (e: MouseEvent) => void
|
|
60
|
+
onClick: (e: MouseEvent<HTMLButtonElement>) => void
|
|
60
61
|
}
|
|
61
62
|
export declare const Button: React.ForwardRefExoticComponent<Omit<Partial<ButtonProps>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
62
63
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import type { MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '../../utils/typings';
|
|
3
4
|
export type ColEventType = 'row' | 'col';
|
|
4
5
|
export interface ColProps extends BasicComponent {
|
|
@@ -17,6 +18,6 @@ export interface ColProps extends BasicComponent {
|
|
|
17
18
|
* 点击时触发
|
|
18
19
|
* @default -
|
|
19
20
|
*/
|
|
20
|
-
onClick: (e:
|
|
21
|
+
onClick: (e: MouseEvent<HTMLDivElement>, type: ColEventType) => void
|
|
21
22
|
}
|
|
22
23
|
export declare const Col: FunctionComponent<Partial<ColProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode, ForwardRefExoticComponent, PropsWithChildren } from 'react';
|
|
2
|
+
import type { MouseEvent } from 'react';
|
|
2
3
|
export type DialogConfigType = {
|
|
3
4
|
prefixCls?: string;
|
|
4
5
|
simple?: boolean;
|
|
@@ -20,7 +21,7 @@ export interface BasicDialogProps {
|
|
|
20
21
|
beforeClose?: () => boolean;
|
|
21
22
|
beforeCancel?: () => boolean;
|
|
22
23
|
onClose?: () => void;
|
|
23
|
-
onConfirm?: (e?: MouseEvent) => Promise<() => void> | void;
|
|
24
|
+
onConfirm?: (e?: MouseEvent<HTMLButtonElement>) => Promise<() => void> | void;
|
|
24
25
|
onCancel?: () => void;
|
|
25
26
|
onClick?: () => void;
|
|
26
27
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
export interface FormItemRuleWithoutValidator {
|
|
2
3
|
[key: string]: any;
|
|
3
4
|
regex?: RegExp;
|
|
@@ -15,7 +16,7 @@ export interface BaseFormField {
|
|
|
15
16
|
/**
|
|
16
17
|
* label 标签的文本
|
|
17
18
|
*/
|
|
18
|
-
label:
|
|
19
|
+
label: ReactNode;
|
|
19
20
|
/**
|
|
20
21
|
* 校验规则,设置字段的校验逻辑
|
|
21
22
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import type { MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '../../utils/typings';
|
|
3
4
|
export type RowEventType = 'row' | 'col';
|
|
4
5
|
export interface RowProps extends BasicComponent {
|
|
@@ -7,6 +8,6 @@ export interface RowProps extends BasicComponent {
|
|
|
7
8
|
align: string;
|
|
8
9
|
wrap: string;
|
|
9
10
|
gutter: string | number;
|
|
10
|
-
onClick: (e:
|
|
11
|
+
onClick: (e: MouseEvent<HTMLDivElement>, type: RowEventType) => void;
|
|
11
12
|
}
|
|
12
13
|
export declare const Row: FunctionComponent<Partial<RowProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import type { ChangeEvent, FocusEvent, MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '../../utils/typings';
|
|
3
4
|
export interface SearchBarProps extends BasicComponent {
|
|
4
5
|
/**
|
|
@@ -70,23 +71,26 @@ export interface SearchBarProps extends BasicComponent {
|
|
|
70
71
|
* 输入内容时触发
|
|
71
72
|
* @default -
|
|
72
73
|
*/
|
|
73
|
-
onChange?: (value: string, event:
|
|
74
|
+
onChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void;
|
|
74
75
|
/**
|
|
75
76
|
* 聚焦时触发
|
|
76
77
|
* @default -
|
|
77
78
|
*/
|
|
78
|
-
onFocus?: (value: string, event:
|
|
79
|
+
onFocus?: (value: string, event: FocusEvent<HTMLInputElement>) => void;
|
|
79
80
|
/**
|
|
80
81
|
* 失焦时触发
|
|
81
82
|
* @default -
|
|
82
83
|
*/
|
|
83
|
-
onBlur?: (value: string, event:
|
|
84
|
-
/**
|
|
85
|
-
|
|
84
|
+
onBlur?: (value: string, event: FocusEvent<HTMLInputElement>) => void;
|
|
85
|
+
/**
|
|
86
|
+
* 点击清空时触发
|
|
87
|
+
* @default -
|
|
88
|
+
*/
|
|
89
|
+
onClear?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
86
90
|
/**
|
|
87
91
|
* 点击输入区域时触发
|
|
88
92
|
* @default -
|
|
89
93
|
*/
|
|
90
|
-
onInputClick?: (event:
|
|
94
|
+
onInputClick?: (event: MouseEvent<HTMLInputElement>) => void;
|
|
91
95
|
}
|
|
92
96
|
export declare const SearchBar: FunctionComponent<Partial<SearchBarProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onFocus' | 'onBlur'>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { TouchEvent, MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '../../utils/typings';
|
|
3
4
|
export type SwipeSide = 'left' | 'right';
|
|
4
5
|
export interface SwipeInstance {
|
|
@@ -51,21 +52,21 @@ export interface SwipeProps extends BasicComponent {
|
|
|
51
52
|
* 点击左侧或者右侧时触发
|
|
52
53
|
* @default -
|
|
53
54
|
*/
|
|
54
|
-
onActionClick?: (event:
|
|
55
|
+
onActionClick?: (event: MouseEvent<HTMLDivElement>, position: SwipeSide) => void;
|
|
55
56
|
/**
|
|
56
57
|
* onTouchStart
|
|
57
58
|
* @default -
|
|
58
59
|
*/
|
|
59
|
-
onTouchStart?: (event:
|
|
60
|
+
onTouchStart?: (event: TouchEvent<HTMLDivElement>) => void
|
|
60
61
|
/**
|
|
61
62
|
* onTouchEnd
|
|
62
63
|
* @default -
|
|
63
64
|
*/
|
|
64
|
-
onTouchEnd?: (event:
|
|
65
|
+
onTouchEnd?: (event: TouchEvent<HTMLDivElement>) => void
|
|
65
66
|
/**
|
|
66
67
|
* onTouchMove
|
|
67
68
|
* @default -
|
|
68
69
|
*/
|
|
69
|
-
onTouchMove?: (event:
|
|
70
|
+
onTouchMove?: (event: TouchEvent<HTMLDivElement>) => void
|
|
70
71
|
}
|
|
71
72
|
export declare const Swipe: React.ForwardRefExoticComponent<Partial<SwipeProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onTouchStart" | "onTouchMove" | "onTouchEnd"> & React.RefAttributes<SwipeInstance>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import type { MouseEvent } from 'react';
|
|
2
3
|
import { BasicComponent } from '../../utils/typings';
|
|
3
4
|
export type TagType = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger';
|
|
4
5
|
export interface TagProps extends BasicComponent {
|
|
@@ -46,7 +47,7 @@ export interface TagProps extends BasicComponent {
|
|
|
46
47
|
* 点击事件
|
|
47
48
|
* @default -
|
|
48
49
|
*/
|
|
49
|
-
onClick: (e: MouseEvent) => void
|
|
50
|
+
onClick: (e: MouseEvent<HTMLDivElement>) => void
|
|
50
51
|
/**
|
|
51
52
|
* 关闭事件
|
|
52
53
|
* @default -
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type Direction = '' | 'vertical' | 'horizontal';
|
|
2
2
|
export declare function useTouch(): {
|
|
3
|
-
move:
|
|
4
|
-
start:
|
|
3
|
+
move: (event: React.TouchEvent<HTMLElement>) => void;
|
|
4
|
+
start: (event: React.TouchEvent<HTMLElement>) => void;
|
|
5
5
|
reset: () => void;
|
|
6
6
|
startX: number;
|
|
7
7
|
startY: number;
|