@kengic/core.react 0.0.1-beta.31 → 0.0.1-beta.32

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/core.react",
3
- "version": "0.0.1-beta.31",
3
+ "version": "0.0.1-beta.32",
4
4
  "type": "module",
5
5
  "main": "./kengic-core.react.js",
6
6
  "module": "./kengic-core.react.js",
@@ -34,19 +34,19 @@ export interface KgModalProps extends ModalProps {
34
34
  /**
35
35
  * 最大高度.
36
36
  */
37
- kgMaxHeight?: boolean;
37
+ kgMaxHeight?: number;
38
38
  /**
39
39
  * 最大宽度.
40
40
  */
41
- kgMaxWidth?: boolean;
41
+ kgMaxWidth?: number;
42
42
  /**
43
43
  * 最小高度.
44
44
  */
45
- kgMinHeight?: boolean;
45
+ kgMinHeight?: number;
46
46
  /**
47
47
  * 最小宽度.
48
48
  */
49
- kgMinWidth?: boolean;
49
+ kgMinWidth?: number;
50
50
  /**
51
51
  * 是否显示取消按钮.
52
52
  *
@@ -0,0 +1,29 @@
1
+ import React, { MutableRefObject } from 'react';
2
+ import { KgModalProps } from '../KgModal';
3
+ /**
4
+ * 拖拽改变大小.
5
+ *
6
+ * @param param.props 组件参数.
7
+ * @param param.domRef 页面上的那个特殊元素对象, 专门用于获取其他元素对象.
8
+ * @param param.getProps 计算后的组件参数.
9
+ */
10
+ export declare function useDragToResize(param: {
11
+ domRef: MutableRefObject<HTMLDivElement | null>;
12
+ getProps: KgModalProps;
13
+ props: KgModalProps;
14
+ }): {
15
+ /**
16
+ * 鼠标按下事件.
17
+ *
18
+ * @param param.event 鼠标事件对象.
19
+ * @param param.handleType 拖拽位置.
20
+ */
21
+ onMouseDown: (param: {
22
+ event: React.MouseEvent<HTMLDivElement, MouseEvent>;
23
+ handleType: "left" | "top" | "top-left" | "top-right" | "right" | "bottom-right" | "bottom" | "bottom-left";
24
+ }) => void;
25
+ /**
26
+ * 弹窗宽度.
27
+ */
28
+ width: string | number;
29
+ };