@nutui/nutui-react 2.6.12 → 2.6.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/Address/style/style.css +1 -1
- package/dist/esm/CalendarItem.js +2 -0
- package/dist/esm/Cascader/style/style.css +1 -1
- package/dist/esm/Drag.js +6 -2
- package/dist/esm/ImagePreview.js +3 -3
- package/dist/esm/Tabs/style/style.css +1 -1
- package/dist/esm/formitem2.js +0 -1
- 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 +40 -7
- package/dist/nutui.react.umd.js +40 -7
- package/dist/packages/tabs/tabs.scss +1 -0
- package/dist/style.css +1 -1
- package/dist/types/packages/drag/drag.d.ts +18 -0
- package/dist/types/packages/drag/drag.taro.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
2
|
import { BasicComponent } from '../../utils/typings';
|
|
3
|
+
export interface DragState {
|
|
4
|
+
offset: [x: number, y: number];
|
|
5
|
+
}
|
|
3
6
|
export interface DragProps extends BasicComponent {
|
|
4
7
|
/**
|
|
5
8
|
* 是否开启自动吸边
|
|
@@ -21,5 +24,20 @@ export interface DragProps extends BasicComponent {
|
|
|
21
24
|
right: number;
|
|
22
25
|
bottom: number;
|
|
23
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* 开始拖拽元素
|
|
29
|
+
* @default -
|
|
30
|
+
*/
|
|
31
|
+
onDragStart: () => void
|
|
32
|
+
/**
|
|
33
|
+
* 停止拖拽元素
|
|
34
|
+
* @default -
|
|
35
|
+
*/
|
|
36
|
+
onDragEnd: (state: DragState) => void
|
|
37
|
+
/**
|
|
38
|
+
* 拖拽元素
|
|
39
|
+
* @default -
|
|
40
|
+
*/
|
|
41
|
+
onDrag: (state: DragState) => void
|
|
24
42
|
}
|
|
25
43
|
export declare const Drag: FunctionComponent<Partial<DragProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
2
|
import { BasicComponent } from '../../utils/typings';
|
|
3
|
+
import { DragState } from './drag';
|
|
3
4
|
export interface DragProps extends BasicComponent {
|
|
4
5
|
attract: boolean;
|
|
5
6
|
direction: 'x' | 'y' | 'lock' | undefined;
|
|
@@ -9,5 +10,8 @@ export interface DragProps extends BasicComponent {
|
|
|
9
10
|
right: number;
|
|
10
11
|
bottom: number;
|
|
11
12
|
};
|
|
13
|
+
onDragStart: () => void;
|
|
14
|
+
onDragEnd: (state: DragState) => void;
|
|
15
|
+
onDrag: (state: DragState) => void;
|
|
12
16
|
}
|
|
13
17
|
export declare const Drag: FunctionComponent<Partial<DragProps> & React.HTMLAttributes<HTMLDivElement>>;
|