@qsxy/element-plus-react 1.0.0-next.12 → 1.0.0-next.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/InputNumber/InputNumber.d.ts +2 -2
- package/dist/InputNumber/InputNumber.js +3 -3
- package/dist/Loading/Loading.d.ts +7 -2
- package/dist/Loading/Loading.js +108 -57
- package/dist/Loading/typings.d.ts +7 -1
- package/dist/Message/Main.d.ts +0 -7
- package/dist/Message/Main.js +0 -7
- package/dist/Message/Message.d.ts +2 -2
- package/dist/Message/Message.js +4 -3
- package/dist/Message/index.d.ts +0 -8
- package/dist/Message/index.js +5 -9
- package/dist/MessageBox/MessageBox.js +2 -1
- package/dist/MessageBox/index.d.ts +5 -5
- package/dist/MessageBox/index.js +1 -0
- package/dist/Notification/Main.d.ts +0 -7
- package/dist/Notification/Main.js +0 -7
- package/dist/Popover/Popover.d.ts +3 -2
- package/dist/Popover/Popover.js +10 -5
- package/dist/Popover/typings.d.ts +0 -1
- package/dist/Table/Table.d.ts +0 -1
- package/dist/Table/Table.js +1 -1
- package/dist/Table/hooks/useSelection.d.ts +1 -1
- package/dist/Tooltip/Tooltip.d.ts +3 -3
- package/dist/Tooltip/Tooltip.js +6 -6
- package/dist/Upload/use-handlers.d.ts +1 -1
- package/dist/index.css +1 -1
- package/package.json +1 -1
- package/theme-chalk/message/index.scss +11 -3
- package/dist/theme-chalk/avatar/index.scss +0 -50
- package/dist/theme-chalk/badge/index.scss +0 -63
- package/dist/theme-chalk/breadcrumb/index.scss +0 -65
- package/dist/theme-chalk/build.scss +0 -2
- package/dist/theme-chalk/button/_mixins.scss +0 -317
- package/dist/theme-chalk/button/button-group.scss +0 -83
- package/dist/theme-chalk/button/button.scss +0 -382
- package/dist/theme-chalk/button/index.scss +0 -2
- package/dist/theme-chalk/calendar/date-picker.scss +0 -112
- package/dist/theme-chalk/calendar/date-range-picker.scss +0 -139
- package/dist/theme-chalk/calendar/date-table.scss +0 -156
- package/dist/theme-chalk/calendar/index.scss +0 -6
- package/dist/theme-chalk/calendar/month-table.scss +0 -92
- package/dist/theme-chalk/calendar/picker-panel.scss +0 -136
- package/dist/theme-chalk/calendar/year-table.scss +0 -107
- package/dist/theme-chalk/card/index.scss +0 -44
- package/dist/theme-chalk/carousel/index.scss +0 -237
- package/dist/theme-chalk/cascader/cascader-panel.scss +0 -184
- package/dist/theme-chalk/cascader/cascader.scss +0 -239
- package/dist/theme-chalk/cascader/index.scss +0 -2
- package/dist/theme-chalk/checkbox/index.scss +0 -255
- package/dist/theme-chalk/checkbox-button/index.scss +0 -117
- package/dist/theme-chalk/checkbox-group/index.scss +0 -33
- package/dist/theme-chalk/col/_mixins.scss +0 -62
- package/dist/theme-chalk/col/index.scss +0 -50
- package/dist/theme-chalk/collapse/index.scss +0 -84
- package/dist/theme-chalk/color-picker/index.scss +0 -340
- package/dist/theme-chalk/common/_var.scss +0 -6
- package/dist/theme-chalk/common/index.d.ts +0 -1
- package/dist/theme-chalk/common/index.js +0 -1
- package/dist/theme-chalk/common/index.scss +0 -222
- package/dist/theme-chalk/date-picker/index.scss +0 -253
- package/dist/theme-chalk/date-time-picker/index.scss +0 -3
- package/dist/theme-chalk/date-time-picker/time-picker.scss +0 -83
- package/dist/theme-chalk/date-time-picker/time-range-picker.scss +0 -32
- package/dist/theme-chalk/descriptions/descriptions-item.scss +0 -66
- package/dist/theme-chalk/descriptions/descriptions.scss +0 -160
- package/dist/theme-chalk/descriptions/index.scss +0 -2
- package/dist/theme-chalk/dev.scss +0 -2
- package/dist/theme-chalk/dialog/index.scss +0 -190
- package/dist/theme-chalk/display.scss +0 -46
- package/dist/theme-chalk/divider/index.scss +0 -51
- package/dist/theme-chalk/doc.scss +0 -2
- package/dist/theme-chalk/drawer/index.scss +0 -250
- package/dist/theme-chalk/dropdown/index.scss +0 -147
- package/dist/theme-chalk/empty/index.scss +0 -69
- package/dist/theme-chalk/fonts/fa-brands-400.ttf +0 -0
- package/dist/theme-chalk/fonts/fa-brands-400.woff2 +0 -0
- package/dist/theme-chalk/fonts/fa-duotone-900.ttf +0 -0
- package/dist/theme-chalk/fonts/fa-duotone-900.woff2 +0 -0
- package/dist/theme-chalk/fonts/fa-light-300.ttf +0 -0
- package/dist/theme-chalk/fonts/fa-light-300.woff2 +0 -0
- package/dist/theme-chalk/fonts/fa-regular-400.ttf +0 -0
- package/dist/theme-chalk/fonts/fa-regular-400.woff2 +0 -0
- package/dist/theme-chalk/fonts/fa-solid-900.ttf +0 -0
- package/dist/theme-chalk/fonts/fa-solid-900.woff2 +0 -0
- package/dist/theme-chalk/fonts/fa-thin-100.ttf +0 -0
- package/dist/theme-chalk/fonts/fa-thin-100.woff2 +0 -0
- package/dist/theme-chalk/fonts/fa-v4compatibility.ttf +0 -0
- package/dist/theme-chalk/fonts/fa-v4compatibility.woff2 +0 -0
- package/dist/theme-chalk/form/index.scss +0 -378
- package/dist/theme-chalk/icon/fonts.scss +0 -9
- package/dist/theme-chalk/icon/index.scss +0 -44
- package/dist/theme-chalk/icon/scss/_animated.scss +0 -205
- package/dist/theme-chalk/icon/scss/_bordered-pulled.scss +0 -20
- package/dist/theme-chalk/icon/scss/_core.scss +0 -33
- package/dist/theme-chalk/icon/scss/_duotone-icons.scss +0 -12
- package/dist/theme-chalk/icon/scss/_fixed-width.scss +0 -7
- package/dist/theme-chalk/icon/scss/_functions.scss +0 -57
- package/dist/theme-chalk/icon/scss/_icons.scss +0 -11
- package/dist/theme-chalk/icon/scss/_list.scss +0 -20
- package/dist/theme-chalk/icon/scss/_mixins.scss +0 -102
- package/dist/theme-chalk/icon/scss/_rotated-flipped.scss +0 -31
- package/dist/theme-chalk/icon/scss/_screen-reader.scss +0 -14
- package/dist/theme-chalk/icon/scss/_shims.scss +0 -2606
- package/dist/theme-chalk/icon/scss/_sizing.scss +0 -16
- package/dist/theme-chalk/icon/scss/_stacked.scss +0 -32
- package/dist/theme-chalk/icon/scss/_variables.scss +0 -9189
- package/dist/theme-chalk/icon/scss/brands.scss +0 -27
- package/dist/theme-chalk/icon/scss/duotone.scss +0 -72
- package/dist/theme-chalk/icon/scss/fontawesome.scss +0 -13
- package/dist/theme-chalk/icon/scss/index.scss +0 -15
- package/dist/theme-chalk/icon/scss/light.scss +0 -21
- package/dist/theme-chalk/icon/scss/regular.scss +0 -21
- package/dist/theme-chalk/icon/scss/solid.scss +0 -21
- package/dist/theme-chalk/icon/scss/thin.scss +0 -21
- package/dist/theme-chalk/icon/scss/v4-shims.scss +0 -3
- package/dist/theme-chalk/index.scss +0 -67
- package/dist/theme-chalk/input/_mixins.scss +0 -16
- package/dist/theme-chalk/input/index.scss +0 -3
- package/dist/theme-chalk/input/input-range.scss +0 -208
- package/dist/theme-chalk/input/input.scss +0 -577
- package/dist/theme-chalk/input-number/index.scss +0 -172
- package/dist/theme-chalk/link/index.scss +0 -99
- package/dist/theme-chalk/loading/index.scss +0 -94
- package/dist/theme-chalk/message/index.scss +0 -169
- package/dist/theme-chalk/message-box/index.scss +0 -184
- package/dist/theme-chalk/notification/index.scss +0 -155
- package/dist/theme-chalk/pagination/index.scss +0 -515
- package/dist/theme-chalk/placeholder/index.scss +0 -135
- package/dist/theme-chalk/popconfirm/index.scss +0 -35
- package/dist/theme-chalk/popover/index.scss +0 -54
- package/dist/theme-chalk/popper/index.scss +0 -86
- package/dist/theme-chalk/progress/index.scss +0 -155
- package/dist/theme-chalk/radio/index.scss +0 -2
- package/dist/theme-chalk/radio/radio-button.scss +0 -128
- package/dist/theme-chalk/radio/radio.scss +0 -171
- package/dist/theme-chalk/radio-group/index.scss +0 -31
- package/dist/theme-chalk/row/index.scss +0 -30
- package/dist/theme-chalk/scrollbar/index.scss +0 -103
- package/dist/theme-chalk/select/index.scss +0 -244
- package/dist/theme-chalk/select/option-group.scss +0 -54
- package/dist/theme-chalk/select/option.scss +0 -63
- package/dist/theme-chalk/select/select-dropdown.scss +0 -57
- package/dist/theme-chalk/switch/index.scss +0 -273
- package/dist/theme-chalk/table/index.scss +0 -714
- package/dist/theme-chalk/tabs/index.scss +0 -620
- package/dist/theme-chalk/tag/index.scss +0 -360
- package/dist/theme-chalk/time-line/_timeline-item.scss +0 -90
- package/dist/theme-chalk/time-line/_timeline.scss +0 -50
- package/dist/theme-chalk/time-line/index.scss +0 -2
- package/dist/theme-chalk/time-picker/index.scss +0 -109
- package/dist/theme-chalk/tooltip/index.scss +0 -13
- package/dist/theme-chalk/transfer/index.scss +0 -247
- package/dist/theme-chalk/transition/index.scss +0 -756
- package/dist/theme-chalk/tree/_directory.scss +0 -73
- package/dist/theme-chalk/tree/_tree.scss +0 -401
- package/dist/theme-chalk/tree/index.scss +0 -2
- package/dist/theme-chalk/tree-select/index.scss +0 -25
- package/dist/theme-chalk/upload/index.scss +0 -631
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { InputNumberProps, InputNumberRef } from './typings';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
3
|
+
declare const InputNumber: React.MemoExoticComponent<React.ForwardRefExoticComponent<InputNumberProps<import("./typings").ValueType> & React.RefAttributes<InputNumberRef>>>;
|
|
4
|
+
export default InputNumber;
|
|
@@ -25,7 +25,7 @@ import Icon from "../Icon/Icon";
|
|
|
25
25
|
import Input from "../Input/Input";
|
|
26
26
|
import { floatAdd, floatSub, formatNumber, isEmpty, isNotEmpty, mergeDefaultProps } from "../Util";
|
|
27
27
|
import { partitionHTMLProps, useClassNames, useControlled, useDisabled, useSize } from "../hooks";
|
|
28
|
-
var InputNumber = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
28
|
+
var InputNumber = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
29
29
|
props = mergeDefaultProps({
|
|
30
30
|
step: 1,
|
|
31
31
|
precision: 0,
|
|
@@ -250,6 +250,6 @@ var InputNumber = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
250
250
|
}, []),
|
|
251
251
|
ref: inputRef
|
|
252
252
|
}, omit(htmlInputProps, ['disabled', 'size', 'onInput', 'onKeyDown', 'onKeyUp', 'size', 'onChange', 'style', 'className', 'type', 'name', 'prefix', 'readOnly', 'maxLength', 'minLength']))));
|
|
253
|
-
});
|
|
253
|
+
}));
|
|
254
254
|
InputNumber.displayName = 'ElInputNumber';
|
|
255
|
-
export default
|
|
255
|
+
export default InputNumber;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import { FC, RefObject } from 'react';
|
|
2
2
|
import { LoadingProps, LoadingService } from './typings';
|
|
3
|
+
export declare class Main {
|
|
4
|
+
ref: RefObject<any>;
|
|
5
|
+
root: any;
|
|
6
|
+
constructor(props: LoadingProps);
|
|
7
|
+
render(props: LoadingProps): void;
|
|
8
|
+
}
|
|
3
9
|
declare const Loading: CompInterface;
|
|
4
10
|
interface CompInterface extends FC<LoadingProps> {
|
|
5
11
|
displayName?: string;
|
|
6
|
-
defaultProps?: Partial<LoadingProps>;
|
|
7
12
|
service: LoadingService;
|
|
8
13
|
}
|
|
9
14
|
export default Loading;
|
package/dist/Loading/Loading.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3;
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
6
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
7
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
8
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
9
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -8,77 +11,127 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
8
11
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
10
13
|
import classNames from 'classnames';
|
|
11
|
-
import { addClass } from 'dom-lib';
|
|
12
|
-
import React, { useEffect, useRef } from 'react';
|
|
14
|
+
import { addClass, removeClass } from 'dom-lib';
|
|
15
|
+
import React, { createRef, forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
13
16
|
import { createPortal } from 'react-dom';
|
|
14
17
|
import { createRoot } from 'react-dom/client';
|
|
15
18
|
import Icon from "../Icon/Icon";
|
|
16
19
|
import Transition from "../Transition/Transition";
|
|
17
20
|
import { PopupManager } from "../Util";
|
|
18
21
|
import { useClassNames } from "../hooks";
|
|
19
|
-
var
|
|
22
|
+
var LoadingMain = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
20
23
|
var visible = props.visible,
|
|
21
24
|
text = props.text,
|
|
22
|
-
|
|
23
|
-
fullscreen = _props$fullscreen === void 0 ? true : _props$fullscreen,
|
|
25
|
+
fullscreen = props.fullscreen,
|
|
24
26
|
spinner = props.spinner,
|
|
25
|
-
background = props.background
|
|
27
|
+
background = props.background,
|
|
28
|
+
svg = props.svg,
|
|
29
|
+
svgViewBox = props.svgViewBox;
|
|
26
30
|
var _useClassNames = useClassNames('loading'),
|
|
27
31
|
b = _useClassNames.b,
|
|
28
32
|
is = _useClassNames.is,
|
|
29
33
|
bm = _useClassNames.bm;
|
|
30
34
|
var nodeRef = useRef(null);
|
|
31
|
-
|
|
35
|
+
var onEnter = useCallback(function () {
|
|
32
36
|
var _nodeRef$current;
|
|
33
|
-
if ((_nodeRef$current = nodeRef.current) !== null && _nodeRef$current !== void 0 && _nodeRef$current.parentNode) {
|
|
37
|
+
if (!props.children && (_nodeRef$current = nodeRef.current) !== null && _nodeRef$current !== void 0 && _nodeRef$current.parentNode) {
|
|
34
38
|
addClass(nodeRef.current.parentNode, bm('parent', 'relative'));
|
|
39
|
+
addClass(nodeRef.current.parentNode, bm('parent', 'hidden'));
|
|
40
|
+
}
|
|
41
|
+
}, [bm, props.children]);
|
|
42
|
+
var onDestory = useCallback(function () {
|
|
43
|
+
var _nodeRef$current2;
|
|
44
|
+
if (!props.children && (_nodeRef$current2 = nodeRef.current) !== null && _nodeRef$current2 !== void 0 && _nodeRef$current2.parentNode) {
|
|
45
|
+
removeClass(nodeRef.current.parentNode, bm('parent', 'relative'));
|
|
46
|
+
removeClass(nodeRef.current.parentNode, bm('parent', 'hidden'));
|
|
47
|
+
}
|
|
48
|
+
}, [bm, props.children]);
|
|
49
|
+
useEffect(function () {
|
|
50
|
+
if (!visible) {
|
|
51
|
+
onDestory();
|
|
35
52
|
}
|
|
36
53
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
37
|
-
}, []);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
54
|
+
}, [visible]);
|
|
55
|
+
useImperativeHandle(ref, function () {
|
|
56
|
+
return {
|
|
57
|
+
onDestory: onDestory
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
var content = useMemo(function () {
|
|
61
|
+
return /*#__PURE__*/React.createElement(Transition, {
|
|
62
|
+
nodeRef: nodeRef,
|
|
63
|
+
name: "loading-fade",
|
|
64
|
+
transitionAppear: true,
|
|
65
|
+
unmountOnExit: true,
|
|
66
|
+
visible: visible,
|
|
67
|
+
onEnter: onEnter
|
|
68
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
69
|
+
ref: nodeRef,
|
|
70
|
+
className: classNames(b(_templateObject || (_templateObject = _taggedTemplateLiteral(["mask"]))), is({
|
|
71
|
+
fullscreen: fullscreen
|
|
72
|
+
}), props.className),
|
|
73
|
+
style: _objectSpread(_objectSpread({}, props.style), {}, {
|
|
74
|
+
background: background,
|
|
75
|
+
zIndex: PopupManager.nextZIndex()
|
|
76
|
+
})
|
|
77
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
78
|
+
className: b(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["spinner"])))
|
|
79
|
+
}, spinner ? /*#__PURE__*/React.createElement(Icon, {
|
|
80
|
+
name: spinner,
|
|
81
|
+
spin: true
|
|
82
|
+
}) : /*#__PURE__*/React.createElement("svg", {
|
|
83
|
+
className: "circular",
|
|
84
|
+
viewBox: svgViewBox !== null && svgViewBox !== void 0 ? svgViewBox : '25 25 50 50'
|
|
85
|
+
}, svg ? svg : /*#__PURE__*/React.createElement("circle", {
|
|
86
|
+
className: "path",
|
|
87
|
+
cx: "50",
|
|
88
|
+
cy: "50",
|
|
89
|
+
r: "20",
|
|
90
|
+
fill: "none"
|
|
91
|
+
})), text && /*#__PURE__*/React.createElement("p", {
|
|
92
|
+
className: b(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["text"])))
|
|
93
|
+
}, text))));
|
|
94
|
+
}, [b, background, fullscreen, is, onEnter, props.className, props.style, spinner, svg, svgViewBox, text, visible]);
|
|
95
|
+
return props.children ? /*#__PURE__*/React.createElement("div", {
|
|
96
|
+
className: classNames(bm('parent', 'relative'), bm('parent', 'hidden'))
|
|
97
|
+
}, content, props.children) : content;
|
|
98
|
+
});
|
|
99
|
+
export var Main = /*#__PURE__*/function () {
|
|
100
|
+
function Main(props) {
|
|
101
|
+
_classCallCheck(this, Main);
|
|
102
|
+
_defineProperty(this, "ref", void 0);
|
|
103
|
+
_defineProperty(this, "root", void 0);
|
|
104
|
+
this.ref = /*#__PURE__*/createRef();
|
|
105
|
+
this.render(props);
|
|
106
|
+
}
|
|
107
|
+
_createClass(Main, [{
|
|
108
|
+
key: "render",
|
|
109
|
+
value: function render(props) {
|
|
110
|
+
var _props$target = props.target,
|
|
111
|
+
target = _props$target === void 0 ? {
|
|
112
|
+
current: document.body
|
|
113
|
+
} : _props$target;
|
|
114
|
+
var renderDom = document.createDocumentFragment();
|
|
115
|
+
this.root = createRoot(renderDom);
|
|
116
|
+
this.root.render( /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement(LoadingMain, _extends({}, props, {
|
|
117
|
+
visible: true,
|
|
118
|
+
ref: this.ref
|
|
119
|
+
})), target.current));
|
|
120
|
+
}
|
|
121
|
+
}]);
|
|
122
|
+
return Main;
|
|
123
|
+
}();
|
|
69
124
|
var service = function service() {
|
|
70
125
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
71
|
-
var
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
var root = createRoot(renderDom);
|
|
77
|
-
root.render( /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement(Main, _extends({}, props, {
|
|
78
|
-
visible: true
|
|
79
|
-
})), target.current));
|
|
126
|
+
var instance = new Main(_objectSpread({
|
|
127
|
+
fullscreen: true
|
|
128
|
+
}, props));
|
|
129
|
+
var ref = instance.ref,
|
|
130
|
+
root = instance.root;
|
|
80
131
|
return {
|
|
81
132
|
close: function close() {
|
|
133
|
+
var _ref$current;
|
|
134
|
+
(_ref$current = ref.current) === null || _ref$current === void 0 || _ref$current.onDestory();
|
|
82
135
|
setTimeout(function () {
|
|
83
136
|
root.unmount();
|
|
84
137
|
}, 200);
|
|
@@ -87,16 +140,14 @@ var service = function service() {
|
|
|
87
140
|
};
|
|
88
141
|
var Loading = function Loading(props) {
|
|
89
142
|
var target = props.target,
|
|
90
|
-
visible = props.visible
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if (target !== null && target !== void 0 && target.current) {
|
|
95
|
-
return /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement(Main, _extends({}, props, {
|
|
143
|
+
visible = props.visible,
|
|
144
|
+
fullscreen = props.fullscreen;
|
|
145
|
+
if (target !== null && target !== void 0 && target.current || fullscreen) {
|
|
146
|
+
return /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement(LoadingMain, _extends({}, props, {
|
|
96
147
|
visible: visible
|
|
97
|
-
})), target.current);
|
|
148
|
+
})), fullscreen ? document.body : target.current);
|
|
98
149
|
}
|
|
99
|
-
return /*#__PURE__*/React.createElement(
|
|
150
|
+
return /*#__PURE__*/React.createElement(LoadingMain, _extends({}, props, {
|
|
100
151
|
visible: visible
|
|
101
152
|
}));
|
|
102
153
|
};
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
1
|
+
import { ReactElement, RefObject } from 'react';
|
|
2
2
|
import { IconName } from '../Icon';
|
|
3
3
|
import { BaseProps, NativeProps } from '../types/common';
|
|
4
4
|
export interface LoadingProps extends BaseProps, NativeProps {
|
|
5
5
|
/** Loading 需要覆盖的 DOM 节点。 可传入一个 DOM 对象或字符串; 若传入字符串,则会将其作为参数传入 document.querySelector以获取到对应 DOM 节点 */
|
|
6
6
|
target?: RefObject<HTMLElement>;
|
|
7
|
+
/** 是否显示Loading */
|
|
7
8
|
visible?: boolean;
|
|
8
9
|
/** 是否让加载组件铺满整个屏幕 */
|
|
9
10
|
fullscreen?: boolean;
|
|
11
|
+
/** 是否锁定父级元素滚动 */
|
|
10
12
|
lock?: boolean;
|
|
11
13
|
/** 显示在加载图标下方的加载文案 */
|
|
12
14
|
text?: string;
|
|
13
15
|
/** 自定义加载图标类名 */
|
|
14
16
|
spinner?: IconName;
|
|
17
|
+
/** 自定义 SVG 元素覆盖默认加载器 */
|
|
18
|
+
svg?: ReactElement;
|
|
19
|
+
/** 设置用于加载 svg 元素的 viewBox 属性 */
|
|
20
|
+
svgViewBox?: string;
|
|
15
21
|
/** 遮罩背景色 */
|
|
16
22
|
background?: string;
|
|
17
23
|
}
|
package/dist/Message/Main.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MessageProps, MessageRef } from './typings';
|
|
3
|
-
/**
|
|
4
|
-
* @author Parker
|
|
5
|
-
* @CreateTime 2022/5/2 21:15:44
|
|
6
|
-
* @LastEditor Parker
|
|
7
|
-
* @ModifyTime 2022/5/3 12:09:53
|
|
8
|
-
* @Description
|
|
9
|
-
*/
|
|
10
3
|
export declare class Main {
|
|
11
4
|
ref: React.RefObject<MessageRef>;
|
|
12
5
|
constructor(props: MessageProps);
|
package/dist/Message/Main.js
CHANGED
|
@@ -9,13 +9,6 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
9
9
|
import React, { createRef } from 'react';
|
|
10
10
|
import { createRoot } from 'react-dom/client';
|
|
11
11
|
import Message from "./Message";
|
|
12
|
-
/**
|
|
13
|
-
* @author Parker
|
|
14
|
-
* @CreateTime 2022/5/2 21:15:44
|
|
15
|
-
* @LastEditor Parker
|
|
16
|
-
* @ModifyTime 2022/5/3 12:09:53
|
|
17
|
-
* @Description
|
|
18
|
-
*/
|
|
19
12
|
export var Main = /*#__PURE__*/function () {
|
|
20
13
|
function Main(props) {
|
|
21
14
|
_classCallCheck(this, Main);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MessageProps, MessageRef } from './typings';
|
|
3
|
-
declare const
|
|
4
|
-
export default
|
|
3
|
+
declare const Message: React.MemoExoticComponent<React.ForwardRefExoticComponent<MessageProps & React.RefAttributes<MessageRef>>>;
|
|
4
|
+
export default Message;
|
package/dist/Message/Message.js
CHANGED
|
@@ -26,7 +26,7 @@ import { EVENT_CODE, TypeMap } from "../config/Constants";
|
|
|
26
26
|
import { useClassNames } from "../hooks";
|
|
27
27
|
// import { ConfigProvider } from '../ConfigProvider';
|
|
28
28
|
|
|
29
|
-
var Message = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
29
|
+
var Message = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
30
30
|
var _props2;
|
|
31
31
|
props = mergeDefaultProps({
|
|
32
32
|
duration: 3000,
|
|
@@ -191,5 +191,6 @@ var Message = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
191
191
|
}), /*#__PURE__*/React.createElement("p", {
|
|
192
192
|
className: e(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["content"])))
|
|
193
193
|
}, message), closeIcon)), document.body);
|
|
194
|
-
});
|
|
195
|
-
|
|
194
|
+
}));
|
|
195
|
+
Message.displayName = 'ElMessage';
|
|
196
|
+
export default Message;
|
package/dist/Message/index.d.ts
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
import { MessageMethod, MessageQueue } from './typings';
|
|
3
3
|
export declare const instances: MessageQueue;
|
|
4
|
-
/**
|
|
5
|
-
* 消息提示组件
|
|
6
|
-
* @author Parker
|
|
7
|
-
* @CreateTime 2022/3/10 12:45:48
|
|
8
|
-
* @LastEditor Parker
|
|
9
|
-
* @ModifyTime 2022/5/3 12:10:04
|
|
10
|
-
* @Description Element Plus 消息提示组件魔改过来的,源代码见:https://github.com/element-plus/element-plus
|
|
11
|
-
*/
|
|
12
4
|
export declare const Message: MessageMethod;
|
|
13
5
|
export declare function close(id: string, userOnClose?: (el?: RefObject<HTMLElement>) => void): void;
|
|
14
6
|
export declare function closeAll(): void;
|
package/dist/Message/index.js
CHANGED
|
@@ -9,15 +9,6 @@ import { isEmpty } from "../Util";
|
|
|
9
9
|
import Main from "./Main";
|
|
10
10
|
export var instances = [];
|
|
11
11
|
var seed = 1;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* 消息提示组件
|
|
15
|
-
* @author Parker
|
|
16
|
-
* @CreateTime 2022/3/10 12:45:48
|
|
17
|
-
* @LastEditor Parker
|
|
18
|
-
* @ModifyTime 2022/5/3 12:10:04
|
|
19
|
-
* @Description Element Plus 消息提示组件魔改过来的,源代码见:https://github.com/element-plus/element-plus
|
|
20
|
-
*/
|
|
21
12
|
export var Message = function Message() {
|
|
22
13
|
var _opts, _ref$current, _ref$current2;
|
|
23
14
|
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -119,6 +110,11 @@ export function closeAll() {
|
|
|
119
110
|
return Message(options);
|
|
120
111
|
};
|
|
121
112
|
});
|
|
113
|
+
|
|
114
|
+
// const config = (opts: MessageParams = {} as MessageParams) => {
|
|
115
|
+
|
|
116
|
+
// }
|
|
117
|
+
|
|
122
118
|
Object.assign(Message, {
|
|
123
119
|
closeAll: closeAll
|
|
124
120
|
});
|
|
@@ -80,7 +80,7 @@ var MessageBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref
|
|
|
80
80
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
81
81
|
confirmButtonText = _useState6[0],
|
|
82
82
|
setConfirmButtonText = _useState6[1];
|
|
83
|
-
var _useControlled = useControlled(options.inputValue),
|
|
83
|
+
var _useControlled = useControlled(undefined, options.inputValue),
|
|
84
84
|
_useControlled2 = _slicedToArray(_useControlled, 2),
|
|
85
85
|
inputValue = _useControlled2[0],
|
|
86
86
|
setInputValue = _useControlled2[1];
|
|
@@ -236,6 +236,7 @@ var MessageBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref
|
|
|
236
236
|
}, messageContainer)), boxType === 'prompt' && showInput && /*#__PURE__*/React.createElement("div", {
|
|
237
237
|
className: e(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["input"])))
|
|
238
238
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
239
|
+
value: inputValue,
|
|
239
240
|
type: inputType,
|
|
240
241
|
error: validateError,
|
|
241
242
|
placeholder: inputPlaceholder,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Action, MessageBoxInputData, MessageBoxProps } from './typings';
|
|
3
3
|
export declare const MessageBox: {
|
|
4
|
-
(options?: MessageBoxProps): Promise<
|
|
4
|
+
(options?: MessageBoxProps): Promise<Action>;
|
|
5
5
|
/**
|
|
6
6
|
* 消息弹窗提示
|
|
7
7
|
* @param message 消息内容
|
|
@@ -9,7 +9,7 @@ export declare const MessageBox: {
|
|
|
9
9
|
* @param options 其他设置项
|
|
10
10
|
* @returns
|
|
11
11
|
*/
|
|
12
|
-
alert: (message: string | React.ReactElement, title: string | React.ReactElement | MessageBoxProps, options?: MessageBoxProps) => Promise<
|
|
12
|
+
alert: (message: string | React.ReactElement, title: string | React.ReactElement | MessageBoxProps, options?: MessageBoxProps) => Promise<Action>;
|
|
13
13
|
/**
|
|
14
14
|
* 确认消息
|
|
15
15
|
* @param message 消息内容
|
|
@@ -17,7 +17,7 @@ export declare const MessageBox: {
|
|
|
17
17
|
* @param options 其他设置项
|
|
18
18
|
* @returns
|
|
19
19
|
*/
|
|
20
|
-
confirm: (message: string | React.ReactElement, title: string | React.ReactElement | MessageBoxProps, options?: MessageBoxProps) => Promise<
|
|
21
|
-
prompt: (message: string | React.ReactElement, title: string | React.ReactElement | MessageBoxProps, options?: MessageBoxProps) => Promise<
|
|
20
|
+
confirm: (message: string | React.ReactElement, title: string | React.ReactElement | MessageBoxProps, options?: MessageBoxProps) => Promise<Action>;
|
|
21
|
+
prompt: (message: string | React.ReactElement, title: string | React.ReactElement | MessageBoxProps, options?: MessageBoxProps) => Promise<MessageBoxInputData>;
|
|
22
22
|
};
|
|
23
23
|
export type { Action as MessageBoxAction, MessageBoxMethod, MessageBoxProps, MessageBoxRef } from './typings';
|
package/dist/MessageBox/index.js
CHANGED
|
@@ -41,6 +41,7 @@ var instanceFactory = function instanceFactory(boxType) {
|
|
|
41
41
|
}, MESSAGE_BOX_DEFAULT_OPTS[boxType]), options),
|
|
42
42
|
onAction: function onAction(action, value) {
|
|
43
43
|
if (action === 'confirm') {
|
|
44
|
+
// @ts-ignore
|
|
44
45
|
resolve(boxType === 'prompt' ? {
|
|
45
46
|
value: value,
|
|
46
47
|
action: action
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
import { NotificationProps, NotificationRef } from './typings';
|
|
3
|
-
/**
|
|
4
|
-
* @author Parker
|
|
5
|
-
* @CreateTime 2022/3/10 12:45:48
|
|
6
|
-
* @LastEditor Parker
|
|
7
|
-
* @ModifyTime 2022/5/3 12:24:58
|
|
8
|
-
* @Description
|
|
9
|
-
*/
|
|
10
3
|
export declare class Main {
|
|
11
4
|
ref: RefObject<NotificationRef>;
|
|
12
5
|
constructor(props: NotificationProps);
|
|
@@ -9,13 +9,6 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
9
9
|
import React, { createRef } from 'react';
|
|
10
10
|
import { createRoot } from 'react-dom/client';
|
|
11
11
|
import Notification from "./Notification";
|
|
12
|
-
/**
|
|
13
|
-
* @author Parker
|
|
14
|
-
* @CreateTime 2022/3/10 12:45:48
|
|
15
|
-
* @LastEditor Parker
|
|
16
|
-
* @ModifyTime 2022/5/3 12:24:58
|
|
17
|
-
* @Description
|
|
18
|
-
*/
|
|
19
12
|
export var Main = /*#__PURE__*/function () {
|
|
20
13
|
function Main(props) {
|
|
21
14
|
_classCallCheck(this, Main);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TooltipRef } from '../Tooltip/typings';
|
|
2
3
|
import { PopoverProps } from './typings';
|
|
3
|
-
declare const Popover:
|
|
4
|
+
declare const Popover: React.MemoExoticComponent<React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<TooltipRef>>>;
|
|
4
5
|
export default Popover;
|
package/dist/Popover/Popover.js
CHANGED
|
@@ -15,16 +15,16 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
15
15
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
16
16
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
17
17
|
import classNames from 'classnames';
|
|
18
|
-
import React, { useCallback } from 'react';
|
|
18
|
+
import React, { forwardRef, memo, useCallback, useImperativeHandle, useRef } from 'react';
|
|
19
19
|
import Tooltip from "../Tooltip/Tooltip";
|
|
20
20
|
import { mergeDefaultProps } from "../Util";
|
|
21
21
|
import { partitionAnimationProps, partitionPopperPropsUtils, useClassNames } from "../hooks";
|
|
22
|
-
var Popover = function
|
|
22
|
+
var Popover = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
23
23
|
props = mergeDefaultProps({
|
|
24
24
|
placement: 'bottom',
|
|
25
25
|
showArrow: true,
|
|
26
26
|
showTimeout: 0,
|
|
27
|
-
hideTimeout:
|
|
27
|
+
hideTimeout: 100,
|
|
28
28
|
width: 200,
|
|
29
29
|
trigger: 'click'
|
|
30
30
|
}, props);
|
|
@@ -54,6 +54,7 @@ var Popover = function Popover(props) {
|
|
|
54
54
|
var _partitionAnimationPr = partitionAnimationProps(rest),
|
|
55
55
|
_partitionAnimationPr2 = _slicedToArray(_partitionAnimationPr, 1),
|
|
56
56
|
transitionProps = _partitionAnimationPr2[0];
|
|
57
|
+
var tooltipRef = useRef(null);
|
|
57
58
|
|
|
58
59
|
/** 显示 */
|
|
59
60
|
var handleMouseEnter = useCallback(function (event) {
|
|
@@ -64,7 +65,11 @@ var Popover = function Popover(props) {
|
|
|
64
65
|
var handleMouseLeave = useCallback(function (event) {
|
|
65
66
|
onMouseLeave === null || onMouseLeave === void 0 || onMouseLeave(event);
|
|
66
67
|
}, [onMouseLeave]);
|
|
68
|
+
useImperativeHandle(ref, function () {
|
|
69
|
+
return tooltipRef.current;
|
|
70
|
+
});
|
|
67
71
|
return /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
72
|
+
ref: tooltipRef,
|
|
68
73
|
classPrefix: classPrefix,
|
|
69
74
|
popperClass: classNames(b(), _defineProperty({}, m(_templateObject || (_templateObject = _taggedTemplateLiteral(["plain"]))), plain)),
|
|
70
75
|
popperStyle: {
|
|
@@ -85,6 +90,6 @@ var Popover = function Popover(props) {
|
|
|
85
90
|
className: e(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["title"])))
|
|
86
91
|
}, title), content)
|
|
87
92
|
}, popperProps, transitionProps));
|
|
88
|
-
};
|
|
89
|
-
Popover.displayName = '
|
|
93
|
+
}));
|
|
94
|
+
Popover.displayName = 'ElPopover';
|
|
90
95
|
export default Popover;
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { PopperOptions } from '../Popper';
|
|
3
3
|
import { TransitionProps } from '../Transition';
|
|
4
4
|
import { AnimationEventProps, BaseProps, NativeProps } from '../types/common';
|
|
5
|
-
/** Dropdown 属性 */
|
|
6
5
|
export interface PopoverProps extends BaseProps<React.ReactElement>, NativeProps, PopperOptions, AnimationEventProps, Omit<TransitionProps, 'children'> {
|
|
7
6
|
/** 触发下拉的行为 */
|
|
8
7
|
trigger?: 'hover' | 'click' | 'contextmenu';
|
package/dist/Table/Table.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ declare const ForwardTable: <RecordType extends object = any>(props: TableProps<
|
|
|
6
6
|
type InternalTableType = typeof ForwardTable;
|
|
7
7
|
interface TableInterface extends InternalTableType {
|
|
8
8
|
displayName?: string;
|
|
9
|
-
defaultProps?: Partial<TableProps<any>>;
|
|
10
9
|
}
|
|
11
10
|
declare const Table: TableInterface;
|
|
12
11
|
export default Table;
|
package/dist/Table/Table.js
CHANGED
|
@@ -39,4 +39,4 @@ export declare const activeRow: <T>(payload: T) => Action;
|
|
|
39
39
|
* @param payload
|
|
40
40
|
* @returns
|
|
41
41
|
*/
|
|
42
|
-
export declare const onCheck: <T>(payload: Pick<State<T>, "
|
|
42
|
+
export declare const onCheck: <T>(payload: Pick<State<T>, "selection" | "isIndeterminate">) => Action;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TooltipProps } from './typings';
|
|
3
|
-
declare const Tooltip:
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TooltipProps, TooltipRef } from './typings';
|
|
3
|
+
declare const Tooltip: React.MemoExoticComponent<React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<TooltipRef>>>;
|
|
4
4
|
export default Tooltip;
|
package/dist/Tooltip/Tooltip.js
CHANGED
|
@@ -18,12 +18,12 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
18
18
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19
19
|
import classNames from 'classnames';
|
|
20
20
|
import noop from 'lodash/noop';
|
|
21
|
-
import React, { Children, cloneElement, forwardRef, useCallback, useImperativeHandle, useRef } from 'react';
|
|
21
|
+
import React, { Children, cloneElement, forwardRef, memo, useCallback, useImperativeHandle, useRef } from 'react';
|
|
22
22
|
import * as ReactIs from 'react-is';
|
|
23
|
-
import { partitionAnimationProps, partitionPopperPropsUtils, useClassNames, useControlled } from "../hooks";
|
|
24
23
|
import Popper from "../Popper/Popper";
|
|
24
|
+
import { partitionAnimationProps, partitionPopperPropsUtils, useClassNames, useControlled } from "../hooks";
|
|
25
25
|
import { TooltipContext } from "./TooltipContext";
|
|
26
|
-
var Tooltip = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
26
|
+
var Tooltip = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
27
27
|
var _props$classPrefix = props.classPrefix,
|
|
28
28
|
classPrefix = _props$classPrefix === void 0 ? 'tooltip' : _props$classPrefix,
|
|
29
29
|
_props$effect = props.effect,
|
|
@@ -37,7 +37,7 @@ var Tooltip = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
37
37
|
_props$showAfter = props.showAfter,
|
|
38
38
|
showAfter = _props$showAfter === void 0 ? 0 : _props$showAfter,
|
|
39
39
|
_props$hideAfter = props.hideAfter,
|
|
40
|
-
hideAfter = _props$hideAfter === void 0 ?
|
|
40
|
+
hideAfter = _props$hideAfter === void 0 ? 100 : _props$hideAfter,
|
|
41
41
|
onMouseEnter = props.onMouseEnter,
|
|
42
42
|
onMouseLeave = props.onMouseLeave,
|
|
43
43
|
onEnter = props.onEnter,
|
|
@@ -194,6 +194,6 @@ var Tooltip = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
}, contentSlot !== null && contentSlot !== void 0 ? contentSlot : /*#__PURE__*/React.createElement("span", null, content))));
|
|
197
|
-
});
|
|
198
|
-
Tooltip.displayName = '
|
|
197
|
+
}));
|
|
198
|
+
Tooltip.displayName = 'ElTooltip';
|
|
199
199
|
export default Tooltip;
|
|
@@ -12,6 +12,6 @@ export declare const useHandlers: (props: Omit<UploadProps, 'fileList'> & {
|
|
|
12
12
|
handleProgress: (evt: import("./typings").UploadProgressEvent, rawFile: UploadRawFile) => void;
|
|
13
13
|
handleStart: (rawFile: UploadRawFile) => void;
|
|
14
14
|
handleSuccess: (response: any, rawFile: UploadRawFile) => unknown;
|
|
15
|
-
handleRemove: (file:
|
|
15
|
+
handleRemove: (file: UploadRawFile | UploadFile) => void;
|
|
16
16
|
submit: () => void;
|
|
17
17
|
};
|