@para-ui/core 2.2.5-beta → 2.2.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/AutoBox/index.d.ts +6 -12
- package/AutoBox/index.js +15 -203
- package/AutoTips/index.d.ts +6 -12
- package/AutoTips/index.js +15 -84
- package/Breadcrumbs/index.d.ts +7 -13
- package/Breadcrumbs/index.js +15 -227
- package/Button/SplitButton.d.ts +61 -0
- package/Button/index.d.ts +11 -92
- package/Button/index.js +14 -348
- package/Button/lang/en_US.d.ts +4 -0
- package/Button/lang/index.d.ts +9 -0
- package/Button/lang/zh_CN.d.ts +4 -0
- package/ButtonGroup/index.d.ts +9 -21
- package/ButtonGroup/index.js +14 -128
- package/Carousel/index.d.ts +11 -17
- package/Carousel/index.js +15 -74
- package/Cascader/index.d.ts +7 -12
- package/Cascader/index.js +15 -166
- package/Cascader/lang/en_US.d.ts +4 -0
- package/Cascader/lang/index.d.ts +9 -0
- package/Cascader/lang/zh_CN.d.ts +4 -0
- package/Checkbox/index.d.ts +7 -13
- package/Checkbox/index.js +14 -105
- package/CheckboxGroup/index.d.ts +9 -15
- package/CheckboxGroup/index.js +14 -138
- package/Collapse/collapsePanel.d.ts +30 -0
- package/Collapse/index.d.ts +14 -49
- package/Collapse/index.js +15 -171
- package/Collapse/motion.d.ts +5 -0
- package/Collapse/util.d.ts +11 -0
- package/CollapseBox/index.d.ts +5 -11
- package/CollapseBox/index.js +15 -164
- package/CollapseBox/util.d.ts +5 -0
- package/ColorPicker/index.d.ts +4 -4
- package/ColorPicker/index.js +1 -4
- package/ComboSelect/WithTabsCombo/index.d.ts +11 -0
- package/ComboSelect/WithTabsCombo/interface.d.ts +141 -0
- package/ComboSelect/index.d.ts +6 -306
- package/ComboSelect/index.js +14 -1803
- package/ComboSelect/interface.d.ts +143 -0
- package/ComboSelect/lang/en_US.d.ts +8 -0
- package/ComboSelect/lang/index.d.ts +17 -0
- package/ComboSelect/lang/zh_CN.d.ts +8 -0
- package/ComboSelect/utils.d.ts +12 -0
- package/Container/index.d.ts +8 -13
- package/Container/index.js +15 -239
- package/DatePicker/PickerButton.d.ts +3 -0
- package/DatePicker/PickerTag.d.ts +3 -0
- package/DatePicker/generatePicker/generateRangePicker.d.ts +4 -0
- package/DatePicker/generatePicker/generateSinglePicker.d.ts +11 -0
- package/DatePicker/generatePicker/index.d.ts +77 -0
- package/DatePicker/index.d.ts +17 -30
- package/DatePicker/index.js +14 -733
- package/DatePicker/lang/en_US.d.ts +3 -0
- package/DatePicker/lang/index.d.ts +7 -0
- package/DatePicker/lang/zh_CN.d.ts +3 -0
- package/DatePicker/util.d.ts +20 -0
- package/Desktop/index.d.ts +6 -14
- package/Desktop/index.js +14 -853
- package/Drawer/index.d.ts +6 -92
- package/Drawer/index.js +14 -186
- package/Drawer/interface.d.ts +83 -0
- package/Drawer/lang/en_US.d.ts +5 -0
- package/Drawer/lang/index.d.ts +11 -0
- package/Drawer/lang/zh_CN.d.ts +5 -0
- package/Empty/images/index.d.ts +2 -0
- package/Empty/index.d.ts +10 -16
- package/Empty/index.js +14 -644
- package/Empty/lang/en_US.d.ts +6 -0
- package/Empty/lang/index.d.ts +13 -0
- package/Empty/lang/zh_CN.d.ts +6 -0
- package/Form/index.d.ts +9 -11
- package/Form/index.js +14 -384
- package/FormItem/compoments/defaultCompoments/index.d.ts +19 -0
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +8 -0
- package/FormItem/compoments/formFile/index.d.ts +38 -0
- package/FormItem/compoments/formRadioGroup/index.d.ts +8 -0
- package/FormItem/compoments/formSelect/index.d.ts +18 -0
- package/FormItem/errorTips.d.ts +12 -0
- package/FormItem/index.d.ts +152 -5
- package/FormItem/index.js +14 -81
- package/FormItem/itemType.d.ts +42 -0
- package/FormItem/validateFunction.d.ts +15 -0
- package/FunctionModal/dialog.d.ts +58 -0
- package/FunctionModal/index.d.ts +3 -14
- package/FunctionModal/index.js +14 -39
- package/FunctionModal/modalContext.d.ts +14 -0
- package/GlobalContext/componentsProps.d.ts +19 -0
- package/GlobalContext/confirmLocale.d.ts +7 -0
- package/GlobalContext/index.d.ts +8 -38
- package/GlobalContext/index.js +16 -41
- package/GlobalContext/intl.d.ts +34 -0
- package/GlobalContext/useFormatMessage.d.ts +3 -0
- package/Help/index.d.ts +10 -16
- package/Help/index.js +15 -39
- package/HelperText/index.d.ts +5 -11
- package/HelperText/index.js +15 -29
- package/Hooks/useGlobalProps.d.ts +1 -0
- package/InputLang/index.d.ts +7 -13
- package/InputLang/index.js +14 -270
- package/InputNumber/index.d.ts +10 -16
- package/InputNumber/index.js +14 -308
- package/Label/index.d.ts +6 -12
- package/Label/index.js +14 -81
- package/Loading/index.d.ts +6 -12
- package/Loading/index.js +15 -47
- package/Menu/footerExpansion.d.ts +9 -0
- package/Menu/index.d.ts +5 -123
- package/Menu/index.js +14 -1232
- package/Menu/interface.d.ts +139 -0
- package/Menu/logo.d.ts +9 -0
- package/Menu/verticalMenuList.d.ts +14 -0
- package/Message/index.d.ts +19 -11
- package/Message/index.js +15 -222
- package/Modal/Confirm/index.d.ts +66 -0
- package/Modal/index.d.ts +40 -142
- package/Modal/index.js +14 -443
- package/Modal/lang/en_US.d.ts +5 -0
- package/Modal/lang/index.d.ts +11 -0
- package/Modal/lang/zh_CN.d.ts +5 -0
- package/MultiBox/index.d.ts +7 -13
- package/MultiBox/index.js +14 -231
- package/Notification/index.d.ts +16 -22
- package/Notification/index.js +15 -266
- package/OperateBtn/index.d.ts +10 -16
- package/OperateBtn/index.js +14 -260
- package/OperateBtn/lang/en_US.d.ts +4 -0
- package/OperateBtn/lang/index.d.ts +9 -0
- package/OperateBtn/lang/zh_CN.d.ts +4 -0
- package/PageHeader/horizontalMeun.d.ts +9 -0
- package/PageHeader/horizontalMeunRight.d.ts +9 -0
- package/PageHeader/index.d.ts +5 -178
- package/PageHeader/index.js +14 -1171
- package/PageHeader/interface.d.ts +167 -0
- package/Pagination/index.d.ts +6 -12
- package/Pagination/index.js +14 -469
- package/Pagination/lang/en_US.d.ts +8 -0
- package/Pagination/lang/index.d.ts +17 -0
- package/Pagination/lang/zh_CN.d.ts +8 -0
- package/ParauiProvider/index.d.ts +8 -9
- package/ParauiProvider/index.js +15 -53
- package/PopConfirm/index.d.ts +10 -23
- package/PopConfirm/index.js +14 -189
- package/PopConfirm/lang/en_US.d.ts +5 -0
- package/PopConfirm/lang/index.d.ts +11 -0
- package/PopConfirm/lang/zh_CN.d.ts +5 -0
- package/Popover/index.d.ts +11 -18
- package/Popover/index.js +15 -66
- package/Popper/index.d.ts +13 -0
- package/Popper/index.js +16 -0
- package/Progress/Line.d.ts +47 -0
- package/Progress/Steps.d.ts +17 -0
- package/Progress/index.d.ts +12 -18
- package/Progress/index.js +20 -358
- package/Progress/utils.d.ts +6 -0
- package/Querying/images/index.d.ts +2 -0
- package/Querying/index.d.ts +9 -15
- package/Querying/index.js +14 -762
- package/Querying/lang/en_US.d.ts +4 -0
- package/Querying/lang/index.d.ts +9 -0
- package/Querying/lang/zh_CN.d.ts +4 -0
- package/README.md +506 -0
- package/Radio/index.d.ts +7 -13
- package/Radio/index.js +14 -94
- package/RadioGroup/index.d.ts +9 -15
- package/RadioGroup/index.js +14 -128
- package/Search/index.d.ts +12 -18
- package/Search/index.js +14 -220
- package/Select/index.d.ts +7 -13
- package/Select/index.js +14 -1288
- package/Select/lang/en_US.d.ts +5 -0
- package/Select/lang/index.d.ts +11 -0
- package/Select/lang/zh_CN.d.ts +5 -0
- package/SelectInput/index.d.ts +5 -11
- package/SelectInput/index.js +14 -51
- package/SingleBox/index.d.ts +7 -13
- package/SingleBox/index.js +14 -194
- package/Slider/index.d.ts +7 -104
- package/Slider/index.js +15 -125
- package/Slider/interface.d.ts +102 -0
- package/Split/index.d.ts +3 -8
- package/Split/index.js +15 -134
- package/Stepper/icons.d.ts +5 -0
- package/Stepper/index.d.ts +25 -41
- package/Stepper/index.js +15 -99
- package/Switch/index.d.ts +10 -16
- package/Switch/index.js +14 -73
- package/Table/index.d.ts +4 -12
- package/Table/index.js +14 -2725
- package/{_verture/interface-a9b7c716.js → Table/interface.d.ts} +28 -20
- package/Table/lang/en_US.d.ts +6 -0
- package/Table/lang/index.d.ts +13 -0
- package/Table/lang/zh_CN.d.ts +6 -0
- package/Table/tableBody.d.ts +9 -0
- package/Table/tableBodyElement/index.d.ts +15 -0
- package/Table/tableBodyInterface.d.ts +67 -0
- package/Table/tableContainer/index.d.ts +16 -0
- package/Table/tableElement/index.d.ts +17 -0
- package/Table/tableHead.d.ts +9 -0
- package/Table/tableHeadElement/index.d.ts +15 -0
- package/Table/tableHeadInterface.d.ts +30 -0
- package/Table/tablePagination.d.ts +9 -0
- package/Table/tablePaginationInterFace.d.ts +24 -0
- package/Table/tdElement/index.d.ts +15 -0
- package/Table/thElement/index.d.ts +15 -0
- package/Table/trElement/index.d.ts +15 -0
- package/Table/util.d.ts +16 -0
- package/Tabs/index.d.ts +29 -64
- package/Tabs/index.js +14 -218
- package/Tag/TagGroup.d.ts +66 -0
- package/Tag/index.d.ts +12 -78
- package/Tag/index.js +14 -286
- package/Test/index.d.ts +2 -3
- package/Test/index.js +16 -9
- package/TextField/index.d.ts +16 -22
- package/TextField/index.js +14 -686
- package/TimePicker/index.d.ts +10 -20
- package/TimePicker/index.js +14 -77
- package/TimePicker/locale/en_US.d.ts +3 -0
- package/TimePicker/locale/zh_CN.d.ts +3 -0
- package/TimePicker/style/index.d.ts +1 -0
- package/Timeline/index.d.ts +13 -49
- package/Timeline/index.js +15 -150
- package/ToggleButton/ToggleButtonGroup.d.ts +49 -0
- package/ToggleButton/index.d.ts +10 -61
- package/ToggleButton/index.js +14 -200
- package/Tooltip/index.d.ts +10 -12
- package/Tooltip/index.js +15 -335
- package/Transfer/index.d.ts +3 -8
- package/Transfer/index.js +14 -343
- package/Transfer/lang/en_US.d.ts +6 -0
- package/Transfer/lang/index.d.ts +13 -0
- package/Transfer/lang/zh_CN.d.ts +6 -0
- package/Tree/OperateBar/index.d.ts +13 -0
- package/Tree/Tree.d.ts +4 -0
- package/Tree/index.d.ts +5 -8
- package/Tree/index.js +14 -35
- package/{_verture/interface-128abdd3.js → Tree/interface.d.ts} +25 -15
- package/Tree/lang/en_US.d.ts +8 -0
- package/Tree/lang/index.d.ts +17 -0
- package/Tree/lang/zh_CN.d.ts +8 -0
- package/Tree/utils/closestPolyfill.d.ts +0 -0
- package/Tree/utils/tools.d.ts +26 -0
- package/Tree/utils/treeUtil.d.ts +15 -0
- package/Upload/Dragger/index.d.ts +10 -0
- package/Upload/ErroTip/index.d.ts +13 -0
- package/Upload/ImageUpload/index.d.ts +14 -0
- package/Upload/ImgCrop/EasyCrop.d.ts +17 -0
- package/Upload/ImgCrop/constants.d.ts +7 -0
- package/Upload/ImgCrop/index.d.ts +6 -0
- package/Upload/ImgCrop/interface.d.ts +24 -0
- package/Upload/UploadList/index.d.ts +5 -0
- package/Upload/index.d.ts +8 -179
- package/Upload/index.js +14 -1542
- package/Upload/interface.d.ts +134 -0
- package/Upload/lang/en_US.d.ts +12 -0
- package/Upload/lang/index.d.ts +25 -0
- package/Upload/lang/zh_CN.d.ts +12 -0
- package/cdn/AutoBox/index.js +29 -0
- package/cdn/AutoTips/index.js +40 -0
- package/cdn/Breadcrumbs/index.js +53 -0
- package/cdn/Button/index.js +79 -0
- package/cdn/ButtonGroup/index.js +79 -0
- package/cdn/Carousel/index.js +6 -0
- package/cdn/Cascader/index.js +42 -0
- package/cdn/Checkbox/index.js +53 -0
- package/cdn/CheckboxGroup/index.js +53 -0
- package/cdn/Collapse/index.js +27 -0
- package/cdn/CollapseBox/index.js +1 -0
- package/cdn/ColorPicker/index.js +1 -0
- package/cdn/ComboSelect/index.js +438 -0
- package/cdn/Container/index.js +1 -0
- package/cdn/DatePicker/index.js +185 -0
- package/cdn/Desktop/index.js +24 -0
- package/cdn/Drawer/index.js +84 -0
- package/cdn/Empty/index.js +1 -0
- package/cdn/Form/index.js +477 -0
- package/cdn/FormItem/index.js +477 -0
- package/cdn/FunctionModal/index.js +144 -0
- package/cdn/GlobalContext/index.js +1 -0
- package/cdn/Help/index.js +53 -0
- package/cdn/HelperText/index.js +1 -0
- package/cdn/InputLang/index.js +144 -0
- package/cdn/InputNumber/index.js +118 -0
- package/cdn/Label/index.js +53 -0
- package/cdn/Loading/index.js +14 -0
- package/cdn/Menu/index.js +40 -0
- package/cdn/Message/index.js +53 -0
- package/cdn/Modal/index.js +144 -0
- package/cdn/MultiBox/index.js +131 -0
- package/cdn/Notification/index.js +66 -0
- package/cdn/OperateBtn/index.js +92 -0
- package/cdn/PageHeader/index.js +92 -0
- package/cdn/Pagination/index.js +214 -0
- package/cdn/ParauiProvider/index.js +9 -0
- package/cdn/PopConfirm/index.js +131 -0
- package/cdn/Popover/index.js +16 -0
- package/cdn/Popper/index.js +26 -0
- package/cdn/Progress/index.js +58 -0
- package/cdn/Querying/index.js +1 -0
- package/cdn/Radio/index.js +53 -0
- package/cdn/RadioGroup/index.js +53 -0
- package/cdn/Search/index.js +144 -0
- package/cdn/Select/index.js +131 -0
- package/cdn/SelectInput/index.js +131 -0
- package/cdn/SingleBox/index.js +131 -0
- package/cdn/Slider/index.js +16 -0
- package/cdn/Split/index.js +1 -0
- package/cdn/Stepper/index.js +154 -0
- package/cdn/Switch/index.js +71 -0
- package/cdn/Table/index.js +292 -0
- package/cdn/Tabs/index.js +165 -0
- package/cdn/Tag/index.js +27 -0
- package/cdn/Test/index.js +1 -0
- package/cdn/TextField/index.js +105 -0
- package/cdn/TimePicker/index.js +185 -0
- package/cdn/Timeline/index.js +16 -0
- package/cdn/ToggleButton/index.js +79 -0
- package/cdn/Tooltip/index.js +40 -0
- package/cdn/Transfer/index.js +170 -0
- package/cdn/Tree/index.js +170 -0
- package/cdn/Upload/index.js +252 -0
- package/index.d.ts +128 -88
- package/index.js +19 -160
- package/package.json +22 -59
- package/style.css +72 -0
- package/Dropdown/index.d.ts +0 -29
- package/Dropdown/index.js +0 -67
- package/_verture/defineProperty-0590dc61.js +0 -16
- package/_verture/index-0d8e1d07.js +0 -4
- package/_verture/index-14a47097.js +0 -4
- package/_verture/index-342379c6.js +0 -391
- package/_verture/index-458032d7.js +0 -10
- package/_verture/index-46bfb2f0.js +0 -778
- package/_verture/index-50401de7.js +0 -4
- package/_verture/index-5b08df83.js +0 -4
- package/_verture/index-6190b129.js +0 -4
- package/_verture/index-7ef1e3b6.js +0 -1553
- package/_verture/index-a369ca3f.js +0 -4
- package/_verture/index-c60911dc.js +0 -39
- package/_verture/index-e2881a53.js +0 -16
- package/_verture/index-ff4c2a27.js +0 -200
- package/_verture/interface-a77a851e.js +0 -25
- package/_verture/intl-336570e4.js +0 -65
- package/_verture/modalContext-25890584.js +0 -228
- package/_verture/modalContext-639f2787.js +0 -58
- package/_verture/slicedToArray-d7722f4b.js +0 -62
- package/_verture/style-inject.es-300983ab.js +0 -28
- package/_verture/toConsumableArray-f8047a75.js +0 -19
- package/_verture/tslib.es6-55ed4bd2.js +0 -38
- package/_verture/typeof-498dd2b1.js +0 -11
- package/_verture/useFormatMessage-ac9d6acf.js +0 -20
- package/_verture/useGlobalProps-af9a2af6.js +0 -12
package/Notification/index.js
CHANGED
|
@@ -1,266 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
var defaultDuration = 4.5; //默认 4.5 秒后自动关闭,配置为 null 则不自动关闭
|
|
18
|
-
|
|
19
|
-
var defaultTop = 24;
|
|
20
|
-
var defaultBottom = 24;
|
|
21
|
-
var defaultPlacement = 'topRight';
|
|
22
|
-
var defaultGetContainer;
|
|
23
|
-
var defaultCloseIcon;
|
|
24
|
-
var rtl = false;
|
|
25
|
-
var maxCount; //设置全局配置
|
|
26
|
-
|
|
27
|
-
function setNotificationConfig(options) {
|
|
28
|
-
var duration = options.duration,
|
|
29
|
-
placement = options.placement,
|
|
30
|
-
bottom = options.bottom,
|
|
31
|
-
top = options.top,
|
|
32
|
-
getContainer = options.getContainer,
|
|
33
|
-
closeIcon = options.closeIcon;
|
|
34
|
-
|
|
35
|
-
if (duration !== undefined) {
|
|
36
|
-
defaultDuration = duration;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
if (placement !== undefined) {
|
|
40
|
-
defaultPlacement = placement;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (bottom !== undefined) {
|
|
44
|
-
defaultBottom = bottom;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
if (top !== undefined) {
|
|
48
|
-
defaultTop = top;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (getContainer !== undefined) {
|
|
52
|
-
defaultGetContainer = getContainer;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
if (closeIcon !== undefined) {
|
|
56
|
-
defaultCloseIcon = closeIcon;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (options.maxCount !== undefined) {
|
|
60
|
-
maxCount = options.maxCount;
|
|
61
|
-
}
|
|
62
|
-
} //获得位置样式
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
function getPlacementStyle(placement) {
|
|
66
|
-
var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultTop;
|
|
67
|
-
var bottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultBottom;
|
|
68
|
-
var style;
|
|
69
|
-
|
|
70
|
-
switch (placement) {
|
|
71
|
-
case 'topLeft':
|
|
72
|
-
style = {
|
|
73
|
-
left: 0,
|
|
74
|
-
top: top,
|
|
75
|
-
bottom: 'auto'
|
|
76
|
-
};
|
|
77
|
-
break;
|
|
78
|
-
|
|
79
|
-
case 'topRight':
|
|
80
|
-
style = {
|
|
81
|
-
right: 0,
|
|
82
|
-
top: top,
|
|
83
|
-
bottom: 'auto'
|
|
84
|
-
};
|
|
85
|
-
break;
|
|
86
|
-
|
|
87
|
-
case 'bottomLeft':
|
|
88
|
-
style = {
|
|
89
|
-
left: 0,
|
|
90
|
-
top: 'auto',
|
|
91
|
-
bottom: bottom
|
|
92
|
-
};
|
|
93
|
-
break;
|
|
94
|
-
|
|
95
|
-
default:
|
|
96
|
-
style = {
|
|
97
|
-
right: 0,
|
|
98
|
-
top: 'auto',
|
|
99
|
-
bottom: bottom
|
|
100
|
-
};
|
|
101
|
-
break;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
return style;
|
|
105
|
-
} //创建通知框实例
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
function getNotificationInstance(args, callback) {
|
|
109
|
-
var _args$placement = args.placement,
|
|
110
|
-
placement = _args$placement === void 0 ? defaultPlacement : _args$placement,
|
|
111
|
-
top = args.top,
|
|
112
|
-
bottom = args.bottom,
|
|
113
|
-
_args$getContainer = args.getContainer,
|
|
114
|
-
getContainer = _args$getContainer === void 0 ? defaultGetContainer : _args$getContainer,
|
|
115
|
-
_args$closeIcon = args.closeIcon,
|
|
116
|
-
closeIcon = _args$closeIcon === void 0 ? defaultCloseIcon : _args$closeIcon;
|
|
117
|
-
var prefixCls = 'paraui-notification';
|
|
118
|
-
var cacheKey = "".concat(prefixCls, "-").concat(placement);
|
|
119
|
-
var cacheInstance = notificationInstance[cacheKey];
|
|
120
|
-
|
|
121
|
-
if (cacheInstance) {
|
|
122
|
-
Promise.resolve(cacheInstance).then(function (instance) {
|
|
123
|
-
callback({
|
|
124
|
-
prefixCls: "".concat(prefixCls, "-notice"),
|
|
125
|
-
instance: instance
|
|
126
|
-
});
|
|
127
|
-
});
|
|
128
|
-
return;
|
|
129
|
-
} //close icon
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
var closeIconToRender = jsx("span", Object.assign({
|
|
133
|
-
className: "".concat(prefixCls, "-close-x")
|
|
134
|
-
}, {
|
|
135
|
-
children: closeIcon || jsx(CloseIcon, {
|
|
136
|
-
className: "".concat(prefixCls, "-close-icon")
|
|
137
|
-
})
|
|
138
|
-
})); //通知框cls
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
var notificationCls = clsx("".concat(prefixCls, "-").concat(placement), _defineProperty({}, "".concat(prefixCls, "-rtl"), rtl === true));
|
|
142
|
-
notificationInstance[cacheKey] = new Promise(function (resolve) {
|
|
143
|
-
Notification.newInstance({
|
|
144
|
-
prefixCls: prefixCls,
|
|
145
|
-
className: notificationCls,
|
|
146
|
-
style: getPlacementStyle(placement, top, bottom),
|
|
147
|
-
getContainer: getContainer,
|
|
148
|
-
closeIcon: closeIconToRender,
|
|
149
|
-
maxCount: maxCount
|
|
150
|
-
}, function (notification) {
|
|
151
|
-
resolve(notification);
|
|
152
|
-
callback({
|
|
153
|
-
prefixCls: "".concat(prefixCls, "-notice"),
|
|
154
|
-
instance: notification
|
|
155
|
-
});
|
|
156
|
-
});
|
|
157
|
-
});
|
|
158
|
-
} //通知框类型图标
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
var typeToIcon = {
|
|
162
|
-
success: SuccessOutlined,
|
|
163
|
-
info: WarningCircleF,
|
|
164
|
-
error: ErrorOutlined,
|
|
165
|
-
warning: WarningCircleF
|
|
166
|
-
}; //创建通知框内容配置
|
|
167
|
-
|
|
168
|
-
function getNoticeProps(args, prefixCls) {
|
|
169
|
-
var durationArg = args.duration,
|
|
170
|
-
icon = args.icon,
|
|
171
|
-
type = args.type,
|
|
172
|
-
description = args.description,
|
|
173
|
-
message = args.message,
|
|
174
|
-
btn = args.btn,
|
|
175
|
-
onClose = args.onClose,
|
|
176
|
-
onClick = args.onClick,
|
|
177
|
-
key = args.key,
|
|
178
|
-
style = args.style,
|
|
179
|
-
className = args.className;
|
|
180
|
-
var duration = durationArg === undefined ? defaultDuration : durationArg;
|
|
181
|
-
var iconNode = null;
|
|
182
|
-
|
|
183
|
-
if (icon) {
|
|
184
|
-
iconNode = jsx("span", Object.assign({
|
|
185
|
-
className: "".concat(prefixCls, "-icon")
|
|
186
|
-
}, {
|
|
187
|
-
children: icon
|
|
188
|
-
}));
|
|
189
|
-
} else if (type) {
|
|
190
|
-
iconNode = /*#__PURE__*/React__default.createElement(typeToIcon[type] || null, {
|
|
191
|
-
className: "".concat(prefixCls, "-icon ").concat(prefixCls, "-icon-").concat(type)
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
var autoMarginTag = !description && iconNode ? jsx("span", {
|
|
196
|
-
className: "".concat(prefixCls, "-message-single-line-auto-margin")
|
|
197
|
-
}) : null;
|
|
198
|
-
return {
|
|
199
|
-
content: jsxs("div", Object.assign({
|
|
200
|
-
className: iconNode ? "".concat(prefixCls, "-with-icon") : ''
|
|
201
|
-
}, {
|
|
202
|
-
children: [iconNode, jsxs("div", Object.assign({
|
|
203
|
-
className: "".concat(prefixCls, "-message")
|
|
204
|
-
}, {
|
|
205
|
-
children: [autoMarginTag, message]
|
|
206
|
-
})), jsx("div", Object.assign({
|
|
207
|
-
className: "".concat(prefixCls, "-description")
|
|
208
|
-
}, {
|
|
209
|
-
children: description
|
|
210
|
-
})), btn ? jsx("span", Object.assign({
|
|
211
|
-
className: "".concat(prefixCls, "-btn")
|
|
212
|
-
}, {
|
|
213
|
-
children: btn
|
|
214
|
-
})) : null]
|
|
215
|
-
})),
|
|
216
|
-
duration: duration,
|
|
217
|
-
closable: true,
|
|
218
|
-
onClose: onClose,
|
|
219
|
-
onClick: onClick,
|
|
220
|
-
key: key,
|
|
221
|
-
style: style || {},
|
|
222
|
-
className: clsx(className, _defineProperty({}, "".concat(prefixCls, "-").concat(type), !!type))
|
|
223
|
-
};
|
|
224
|
-
} //通知框调用方法
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
function notice(args) {
|
|
228
|
-
getNotificationInstance(args, function (_ref) {
|
|
229
|
-
var prefixCls = _ref.prefixCls,
|
|
230
|
-
instance = _ref.instance;
|
|
231
|
-
instance.notice(getNoticeProps(args, prefixCls));
|
|
232
|
-
});
|
|
233
|
-
} //通知框api method
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
var api = {
|
|
237
|
-
open: notice,
|
|
238
|
-
close: function close(key) {
|
|
239
|
-
Object.keys(notificationInstance).forEach(function (cacheKey) {
|
|
240
|
-
return Promise.resolve(notificationInstance[cacheKey]).then(function (instance) {
|
|
241
|
-
instance.removeNotice(key);
|
|
242
|
-
});
|
|
243
|
-
});
|
|
244
|
-
},
|
|
245
|
-
config: setNotificationConfig,
|
|
246
|
-
destroy: function destroy() {
|
|
247
|
-
Object.keys(notificationInstance).forEach(function (cacheKey) {
|
|
248
|
-
Promise.resolve(notificationInstance[cacheKey]).then(function (instance) {
|
|
249
|
-
instance.destroy();
|
|
250
|
-
});
|
|
251
|
-
delete notificationInstance[cacheKey];
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
}; //通知框预设类型 'success', 'info', 'warning', 'error'
|
|
255
|
-
|
|
256
|
-
['success', 'info', 'warning', 'error'].forEach(function (type) {
|
|
257
|
-
api[type] = function (args) {
|
|
258
|
-
return api.open(Object.assign(Object.assign({}, args), {
|
|
259
|
-
type: type
|
|
260
|
-
}));
|
|
261
|
-
};
|
|
262
|
-
}); //兼容warn、warning
|
|
263
|
-
|
|
264
|
-
api.warn = api.warning;
|
|
265
|
-
|
|
266
|
-
export { api as default };
|
|
1
|
+
!function(i,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("rc-notification"),require("@para-ui/icons/WarningCircleF"),require("@para-ui/icons/CheckCircleF"),require("@para-ui/icons/Close"),require("@para-ui/icons/CloseCircleF"),require("clsx")):"function"==typeof define&&define.amd?define(["react","rc-notification","@para-ui/icons/WarningCircleF","@para-ui/icons/CheckCircleF","@para-ui/icons/Close","@para-ui/icons/CloseCircleF","clsx"],t):"object"==typeof exports?exports.ParaUI=t(require("react"),require("rc-notification"),require("@para-ui/icons/WarningCircleF"),require("@para-ui/icons/CheckCircleF"),require("@para-ui/icons/Close"),require("@para-ui/icons/CloseCircleF"),require("clsx")):i.ParaUI=t(i.react,i["rc-notification"],i["@para-ui/icons/WarningCircleF"],i["@para-ui/icons/CheckCircleF"],i["@para-ui/icons/Close"],i["@para-ui/icons/CloseCircleF"],i.clsx)}(self,(function(i,t,n,o,e,a,r){return function(){var c={698:function(i,t,n){(t=n(3645)(!1)).push([i.id,'.paraui-notification{position:fixed;margin:0 24px 0 0;padding:0;color:#2e3743;font-size:14px;z-index:9999}.paraui-notification-topLeft,.paraui-notification-bottomLeft{margin-right:0;margin-left:24px}.paraui-notification-topLeft .paraui-notification-fade-enter.paraui-notification-fade-enter-active,.paraui-notification-bottomLeft .paraui-notification-fade-enter.paraui-notification-fade-enter-active,.paraui-notification-topLeft .paraui-notification-fade-appear.paraui-notification-fade-appear-active,.paraui-notification-bottomLeft .paraui-notification-fade-appear.paraui-notification-fade-appear-active{animation-name:NotificationLeftFadeIn}.paraui-notification-hook-holder,.paraui-notification-notice{position:relative;width:430px;max-width:calc(100vw - 48px);margin-bottom:16px;margin-left:auto;overflow:hidden;word-wrap:break-word;background:#fff;border-radius:4px;box-shadow:0px 2px 8px 0px rgba(171,176,185,.4)}.paraui-notification-topLeft .paraui-notification-hook-holder,.paraui-notification-topLeft .paraui-notification-notice,.paraui-notification-bottomLeft .paraui-notification-hook-holder,.paraui-notification-bottomLeft .paraui-notification-notice{margin-right:auto;margin-left:0}.paraui-notification-hook-holder>.paraui-notification-notice{margin-bottom:0;box-shadow:none}.paraui-notification-notice{padding:20px;line-height:1.5715}.paraui-notification-notice-content{position:relative}.paraui-notification-notice-message{margin-bottom:8px;color:#2e3743;font-size:14px;font-weight:700;line-height:24px}.paraui-notification-notice-message-single-line-auto-margin{display:block;width:calc(264px - 100%);max-width:4px;background-color:rgba(0,0,0,0);pointer-events:none}.paraui-notification-notice-message-single-line-auto-margin::before{display:block;content:""}.paraui-notification-notice-description{font-size:14px;font-weight:400}.paraui-notification-notice-closable .paraui-notification-notice-message{padding-right:24px}.paraui-notification-notice-with-icon .paraui-notification-notice-message{margin-bottom:4px;margin-left:24px}.paraui-notification-notice-with-icon .paraui-notification-notice-description{margin-left:24px}.paraui-notification .paraui-notification-notice-icon{position:absolute;top:4px;font-size:16px;line-height:24px}.paraui-notification .paraui-notification-notice-icon-success{color:#53c31b}.paraui-notification .paraui-notification-notice-icon-info{color:#3666d6}.paraui-notification .paraui-notification-notice-icon-warning{color:#ffa150}.paraui-notification .paraui-notification-notice-icon-error{color:#eb6054}.paraui-notification-notice-close{position:absolute;top:16px;right:22px;color:rgba(46,55,67,.7);outline:none}.paraui-notification-notice-close:hover{color:rgba(46,55,67,.7)}.paraui-notification .paraui-notification-close-icon{font-size:18px;cursor:pointer;color:rgba(46,55,67,.7)}.paraui-notification-notice-btn{float:right;margin-top:16px}.paraui-notification .notification-fade-effect{animation-duration:.24s;animation-timing-function:cubic-bezier(0.645, 0.045, 0.355, 1);animation-fill-mode:both}.paraui-notification-fade-enter,.paraui-notification-fade-appear{animation-duration:.24s;animation-timing-function:cubic-bezier(0.645, 0.045, 0.355, 1);animation-fill-mode:both;opacity:0;animation-play-state:paused}.paraui-notification-fade-leave{animation-duration:.24s;animation-timing-function:cubic-bezier(0.645, 0.045, 0.355, 1);animation-fill-mode:both;animation-play-state:paused}.paraui-notification-fade-enter.paraui-notification-fade-enter-active,.paraui-notification-fade-appear.paraui-notification-fade-appear-active{animation-name:NotificationFadeIn;animation-play-state:running}.paraui-notification-fade-leave.paraui-notification-fade-leave-active{animation-name:NotificationFadeOut;animation-play-state:running}@keyframes NotificationFadeIn{0%{left:430px;opacity:0}100%{left:0;opacity:1}}@keyframes NotificationLeftFadeIn{0%{right:430px;opacity:0}100%{right:0;opacity:1}}@keyframes NotificationFadeOut{0%{max-height:150px;margin-bottom:16px;opacity:1}100%{max-height:0;margin-bottom:0;padding-top:0;padding-bottom:0;opacity:0}}',""]),i.exports=t},3645:function(i){"use strict";i.exports=function(i){var t=[];return t.toString=function(){return this.map((function(t){var n=function(i,t){var n=i[1]||"",o=i[3];if(!o)return n;if(t&&"function"==typeof btoa){var e=(r=o,c=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(c),"/*# ".concat(s," */")),a=o.sources.map((function(i){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(i," */")}));return[n].concat(a).concat([e]).join("\n")}var r,c,s;return[n].join("\n")}(t,i);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(i,n,o){"string"==typeof i&&(i=[[null,i,""]]);var e={};if(o)for(var a=0;a<this.length;a++){var r=this[a][0];null!=r&&(e[r]=!0)}for(var c=0;c<i.length;c++){var s=[].concat(i[c]);o&&e[s[0]]||(n&&(s[2]?s[2]="".concat(n," and ").concat(s[2]):s[2]=n),t.push(s))}},t}},7418:function(i){"use strict";
|
|
2
|
+
/*
|
|
3
|
+
object-assign
|
|
4
|
+
(c) Sindre Sorhus
|
|
5
|
+
@license MIT
|
|
6
|
+
*/var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function e(i){if(null==i)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}i.exports=function(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de","5"===Object.getOwnPropertyNames(i)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(i){return t[i]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(i){o[i]=i})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(i){return!1}}()?Object.assign:function(i,a){for(var r,c,s=e(i),u=1;u<arguments.length;u++){for(var f in r=Object(arguments[u]))n.call(r,f)&&(s[f]=r[f]);if(t){c=t(r);for(var p=0;p<c.length;p++)o.call(r,c[p])&&(s[c[p]]=r[c[p]])}}return s}},5251:function(i,t,n){"use strict";
|
|
7
|
+
/** @license React v17.0.2
|
|
8
|
+
* react-jsx-runtime.production.min.js
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
n(7418);var o=n(8156),e=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var a=Symbol.for;e=a("react.element"),a("react.fragment")}var r=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function u(i,t,n){var o,a={},u=null,f=null;for(o in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(f=t.ref),t)c.call(t,o)&&!s.hasOwnProperty(o)&&(a[o]=t[o]);if(i&&i.defaultProps)for(o in t=i.defaultProps)void 0===a[o]&&(a[o]=t[o]);return{$$typeof:e,type:i,key:u,ref:f,props:a,_owner:r.current}}t.jsx=u,t.jsxs=u},5893:function(i,t,n){"use strict";i.exports=n(5251)},5567:function(i,t,n){var o=n(3379),e=n(698);"string"==typeof(e=e.__esModule?e.default:e)&&(e=[[i.id,e,""]]);var a={insert:("body","body"),singleton:!1};o(e,a);i.exports=e.locals||{}},3379:function(i,t,n){"use strict";var o,e=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},a=function(){var i={};return function(t){if(void 0===i[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(i){n=null}i[t]=n}return i[t]}}(),r=[];function c(i){for(var t=-1,n=0;n<r.length;n++)if(r[n].identifier===i){t=n;break}return t}function s(i,t){for(var n={},o=[],e=0;e<i.length;e++){var a=i[e],s=t.base?a[0]+t.base:a[0],u=n[s]||0,f="".concat(s," ").concat(u);n[s]=u+1;var p=c(f),l={css:a[1],media:a[2],sourceMap:a[3]};-1!==p?(r[p].references++,r[p].updater(l)):r.push({identifier:f,updater:b(l,t),references:1}),o.push(f)}return o}function u(i){var t=document.createElement("style"),o=i.attributes||{};if(void 0===o.nonce){var e=n.nc;e&&(o.nonce=e)}if(Object.keys(o).forEach((function(i){t.setAttribute(i,o[i])})),"function"==typeof i.insert)i.insert(t);else{var r=a(i.insert||"head");if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(t)}return t}var f,p=(f=[],function(i,t){return f[i]=t,f.filter(Boolean).join("\n")});function l(i,t,n,o){var e=n?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(i.styleSheet)i.styleSheet.cssText=p(t,e);else{var a=document.createTextNode(e),r=i.childNodes;r[t]&&i.removeChild(r[t]),r.length?i.insertBefore(a,r[t]):i.appendChild(a)}}function d(i,t,n){var o=n.css,e=n.media,a=n.sourceMap;if(e?i.setAttribute("media",e):i.removeAttribute("media"),a&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),i.styleSheet)i.styleSheet.cssText=o;else{for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(document.createTextNode(o))}}var m=null,g=0;function b(i,t){var n,o,e;if(t.singleton){var a=g++;n=m||(m=u(t)),o=l.bind(null,n,a,!1),e=l.bind(null,n,a,!0)}else n=u(t),o=d.bind(null,n,t),e=function(){!function(i){if(null===i.parentNode)return!1;i.parentNode.removeChild(i)}(n)};return o(i),function(t){if(t){if(t.css===i.css&&t.media===i.media&&t.sourceMap===i.sourceMap)return;o(i=t)}else e()}}i.exports=function(i,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=e());var n=s(i=i||[],t);return function(i){if(i=i||[],"[object Array]"===Object.prototype.toString.call(i)){for(var o=0;o<n.length;o++){var e=c(n[o]);r[e].references--}for(var a=s(i,t),u=0;u<n.length;u++){var f=c(n[u]);0===r[f].references&&(r[f].updater(),r.splice(f,1))}n=a}}}},1014:function(i){"use strict";i.exports=o},5927:function(i){"use strict";i.exports=e},6649:function(i){"use strict";i.exports=a},595:function(i){"use strict";i.exports=n},5744:function(i){"use strict";i.exports=r},6293:function(i){"use strict";i.exports=t},8156:function(t){"use strict";t.exports=i}},s={};function u(i){var t=s[i];if(void 0!==t)return t.exports;var n=s[i]={id:i,exports:{}};return c[i](n,n.exports,u),n.exports}u.n=function(i){var t=i&&i.__esModule?function(){return i.default}:function(){return i};return u.d(t,{a:t}),t},u.d=function(i,t){for(var n in t)u.o(t,n)&&!u.o(i,n)&&Object.defineProperty(i,n,{enumerable:!0,get:t[n]})},u.o=function(i,t){return Object.prototype.hasOwnProperty.call(i,t)},u.r=function(i){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},u.nc=void 0;var f={};return function(){"use strict";u.r(f);var i,t,n,o=u(5893),e=u(8156),a=u.n(e),r=u(6293),c=u.n(r),s=u(595),p=u.n(s),l=u(1014),d=u.n(l),m=u(5927),g=u.n(m),b=u(6649),v=u.n(b),h=u(5744),y=u.n(h),x=(u(5567),function(){return x=Object.assign||function(i){for(var t,n=1,o=arguments.length;n<o;n++)for(var e in t=arguments[n])Object.prototype.hasOwnProperty.call(t,e)&&(i[e]=t[e]);return i},x.apply(this,arguments)}),C={},w=4.5,j=24,O=24,k="topRight";function N(i,t,n){var o;switch(void 0===t&&(t=j),void 0===n&&(n=O),i){case"topLeft":o={left:0,top:t,bottom:"auto"};break;case"topRight":o={right:0,top:t,bottom:"auto"};break;case"bottomLeft":o={left:0,top:"auto",bottom:n};break;default:o={right:0,top:"auto",bottom:n}}return o}var S={success:d(),info:p(),error:v(),warning:p()};var _={open:function(e){!function(e,a){var r,s=e.placement,u=void 0===s?k:s,f=e.top,p=e.bottom,l=e.getContainer,d=void 0===l?i:l,m=e.closeIcon,b=void 0===m?t:m,v="paraui-notification",h="".concat(v,"-").concat(u),w=C[h];if(w)Promise.resolve(w).then((function(i){a({prefixCls:"".concat(v,"-notice"),instance:i})}));else{var j=(0,o.jsx)("span",x({className:"".concat(v,"-close-x")},{children:b||(0,o.jsx)(g(),{className:"".concat(v,"-close-icon")})})),O=y()("".concat(v,"-").concat(u),((r={})["".concat(v,"-rtl")]=!1,r));C[h]=new Promise((function(i){c().newInstance({prefixCls:v,className:O,style:N(u,f,p),getContainer:d,closeIcon:j,maxCount:n},(function(t){i(t),a({prefixCls:"".concat(v,"-notice"),instance:t})}))}))}}(e,(function(i){var t=i.prefixCls;i.instance.notice(function(i,t){var n,e=i.duration,r=i.icon,c=i.type,s=i.description,u=i.message,f=i.btn,p=i.onClose,l=i.onClick,d=i.key,m=i.style,g=i.className,b=void 0===e?w:e,v=null;r?v=(0,o.jsx)("span",x({className:"".concat(t,"-icon")},{children:r})):c&&(v=a().createElement(S[c]||null,{className:"".concat(t,"-icon ").concat(t,"-icon-").concat(c)}));var h=!s&&v?(0,o.jsx)("span",{className:"".concat(t,"-message-single-line-auto-margin")}):null;return{content:(0,o.jsxs)("div",x({className:v?"".concat(t,"-with-icon"):""},{children:[v,(0,o.jsxs)("div",x({className:"".concat(t,"-message")},{children:[h,u]})),(0,o.jsx)("div",x({className:"".concat(t,"-description")},{children:s})),f?(0,o.jsx)("span",x({className:"".concat(t,"-btn")},{children:f})):null]})),duration:b,closable:!0,onClose:p,onClick:l,key:d,style:m||{},className:y()(g,(n={},n["".concat(t,"-").concat(c)]=!!c,n))}}(e,t))}))},close:function(i){Object.keys(C).forEach((function(t){return Promise.resolve(C[t]).then((function(t){t.removeNotice(i)}))}))},config:function(o){var e=o.duration,a=o.placement,r=o.bottom,c=o.top,s=o.getContainer,u=o.closeIcon;void 0!==e&&(w=e),void 0!==a&&(k=a),void 0!==r&&(O=r),void 0!==c&&(j=c),void 0!==s&&(i=s),void 0!==u&&(t=u),void 0!==o.maxCount&&(n=o.maxCount)},destroy:function(){Object.keys(C).forEach((function(i){Promise.resolve(C[i]).then((function(i){i.destroy()})),delete C[i]}))}};["success","info","warning","error"].forEach((function(i){_[i]=function(t){return _.open(x(x({},t),{type:i}))}})),_.warn=_.warning,f.default=_}(),f}()}));
|
package/OperateBtn/index.d.ts
CHANGED
|
@@ -1,29 +1,24 @@
|
|
|
1
|
-
import React__default, { FunctionComponent } from 'react';
|
|
2
|
-
import styleInject from './node_modules/style-inject/dist/style-inject.es.js';
|
|
3
|
-
|
|
4
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2022/4/13 10:48 AM\n* @description 表格操作按钮\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-operate-btn {\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n display: flex;\n align-items: center;\n}\n.paraui-operate-btn > .paraui-operate-btn-line {\n display: inline-block;\n width: 1px;\n background-color: rgba(54, 102, 214, 0.2);\n margin: 0 12px;\n}\n.paraui-operate-btn.paraui-operate-btn-small > .paraui-operate-btn-line {\n height: 12px;\n}\n.paraui-operate-btn.paraui-operate-btn-small button svg {\n font-size: 18px;\n}\n.paraui-operate-btn.paraui-operate-btn-medium > .paraui-operate-btn-line {\n height: 14px;\n}\n.paraui-operate-btn.paraui-operate-btn-medium button svg {\n font-size: 24px;\n}\n.paraui-operate-btn.paraui-operate-btn-large > .paraui-operate-btn-line {\n height: 16px;\n}\n.paraui-operate-btn.paraui-operate-btn-large button > svg {\n font-size: 28px;\n}\n\n.paraui-operate-btn-popover .paraui-operate-btn-list {\n padding: 8px 0;\n}\n.paraui-operate-btn-popover .paraui-operate-btn-list > .paraui-operate-btn-list-item {\n padding: 0 12px;\n max-width: 120px;\n cursor: pointer;\n color: rgb(46, 55, 67);\n line-height: 36px;\n text-align: left;\n}\n.paraui-operate-btn-popover .paraui-operate-btn-list > .paraui-operate-btn-list-item:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-operate-btn-popover .paraui-operate-btn-list > .paraui-operate-btn-list-item-disabled {\n cursor: not-allowed;\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-operate-btn-popover .paraui-operate-btn-list > .paraui-operate-btn-list-item-danger {\n color: rgb(235, 96, 84);\n}";
|
|
5
|
-
styleInject(css_248z);
|
|
6
|
-
|
|
7
1
|
/**
|
|
8
2
|
* @author linhd
|
|
9
3
|
* @date 2022/4/13 10:49 AM
|
|
10
4
|
* @description 表格操作按钮
|
|
11
5
|
*/
|
|
12
|
-
|
|
6
|
+
import React, { FunctionComponent } from 'react';
|
|
7
|
+
import './index.scss';
|
|
13
8
|
/** 按钮配置 */
|
|
14
|
-
interface OperateBtnListProps {
|
|
9
|
+
export interface OperateBtnListProps {
|
|
15
10
|
/** 样式class */
|
|
16
11
|
className?: string;
|
|
17
12
|
/** style */
|
|
18
|
-
style?:
|
|
13
|
+
style?: React.CSSProperties;
|
|
19
14
|
/** key 表示唯一值 */
|
|
20
15
|
key?: string;
|
|
21
16
|
/** 显示名 */
|
|
22
|
-
label?:
|
|
17
|
+
label?: React.ReactNode;
|
|
23
18
|
/** 鼠标移上去显示的内容 */
|
|
24
|
-
toolTipTitle?:
|
|
19
|
+
toolTipTitle?: React.ReactNode;
|
|
25
20
|
/** 图标 */
|
|
26
|
-
icon?:
|
|
21
|
+
icon?: React.ReactNode;
|
|
27
22
|
/** 定位方向 */
|
|
28
23
|
placement?: "top-start" | "bottom-end" | "bottom-start" | "bottom" | "left-end" | "left-start" | "left" | "right-end" | "right-start" | "right" | "top-end" | "top";
|
|
29
24
|
/** 是否禁用 */
|
|
@@ -34,11 +29,11 @@ interface OperateBtnListProps {
|
|
|
34
29
|
onClick?: (item: OperateBtnListProps, e: any) => void | Promise<boolean | any>;
|
|
35
30
|
[name: string]: any;
|
|
36
31
|
}
|
|
37
|
-
interface OperateBtnProps {
|
|
32
|
+
export interface OperateBtnProps {
|
|
38
33
|
/** 样式class */
|
|
39
34
|
className?: string;
|
|
40
35
|
/** style */
|
|
41
|
-
style?:
|
|
36
|
+
style?: React.CSSProperties;
|
|
42
37
|
/** listItem索引下标 */
|
|
43
38
|
key?: string;
|
|
44
39
|
/** 大小 */
|
|
@@ -61,5 +56,4 @@ interface OperateBtnProps {
|
|
|
61
56
|
onClick?: (item: OperateBtnListProps, e: any) => void | Promise<boolean | any>;
|
|
62
57
|
}
|
|
63
58
|
declare const OperateBtn: FunctionComponent<OperateBtnProps>;
|
|
64
|
-
|
|
65
|
-
export { OperateBtnListProps, OperateBtnProps, OperateBtn as default };
|
|
59
|
+
export default OperateBtn;
|