@para-ui/core 3.0.53 → 3.0.55
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/README.md +24 -0
- package/package.json +1 -1
- package/AutoBox/index.d.ts +0 -34
- package/AutoBox/index.js +0 -277
- package/AutoBox/protal.d.ts +0 -17
- package/AutoTips/autoTipsMultiline/index.d.ts +0 -18
- package/AutoTips/index.d.ts +0 -35
- package/AutoTips/index.js +0 -271
- package/Breadcrumbs/index.d.ts +0 -53
- package/Breadcrumbs/index.js +0 -266
- package/Breadcrumbs/lang/en_US.d.ts +0 -4
- package/Breadcrumbs/lang/index.d.ts +0 -9
- package/Breadcrumbs/lang/zh_CN.d.ts +0 -4
- package/Button/SplitButton.d.ts +0 -64
- package/Button/index.d.ts +0 -79
- package/Button/index.js +0 -376
- package/Button/lang/en_US.d.ts +0 -4
- package/Button/lang/index.d.ts +0 -9
- package/Button/lang/zh_CN.d.ts +0 -4
- package/ButtonGroup/index.d.ts +0 -33
- package/ButtonGroup/index.js +0 -124
- package/Carousel/index.d.ts +0 -38
- package/Carousel/index.js +0 -78
- package/Cascader/index.d.ts +0 -54
- package/Cascader/index.js +0 -159
- package/Cascader/lang/en_US.d.ts +0 -4
- package/Cascader/lang/index.d.ts +0 -9
- package/Cascader/lang/zh_CN.d.ts +0 -4
- package/Checkbox/index.d.ts +0 -40
- package/Checkbox/index.js +0 -109
- package/CheckboxGroup/index.d.ts +0 -45
- package/CheckboxGroup/index.js +0 -142
- package/Collapse/collapsePanel.d.ts +0 -30
- package/Collapse/index.d.ts +0 -57
- package/Collapse/index.js +0 -152
- package/Collapse/motion.d.ts +0 -5
- package/Collapse/util.d.ts +0 -11
- package/CollapseBox/index.d.ts +0 -27
- package/CollapseBox/index.js +0 -148
- package/CollapseBox/util.d.ts +0 -5
- package/CollapseLayout/index.d.ts +0 -53
- package/CollapseLayout/index.js +0 -176
- package/ColorPicker/index.d.ts +0 -4
- package/ColorPicker/index.js +0 -4
- package/ComboSelect/index.d.ts +0 -6
- package/ComboSelect/index.js +0 -1049
- package/ComboSelect/interface.d.ts +0 -146
- package/ComboSelect/lang/en_US.d.ts +0 -9
- package/ComboSelect/lang/index.d.ts +0 -19
- package/ComboSelect/lang/zh_CN.d.ts +0 -9
- package/ComboSelect/utils.d.ts +0 -9
- package/Container/index.d.ts +0 -77
- package/Container/index.js +0 -232
- package/DatePicker/PickerButton.d.ts +0 -3
- package/DatePicker/PickerTag.d.ts +0 -3
- package/DatePicker/generatePicker/generateRangePicker.d.ts +0 -4
- package/DatePicker/generatePicker/generateSinglePicker.d.ts +0 -11
- package/DatePicker/generatePicker/index.d.ts +0 -95
- package/DatePicker/index.d.ts +0 -18
- package/DatePicker/index.js +0 -633
- package/DatePicker/lang/en_US.d.ts +0 -3
- package/DatePicker/lang/index.d.ts +0 -7
- package/DatePicker/lang/zh_CN.d.ts +0 -3
- package/DatePicker/util.d.ts +0 -22
- package/Desktop/index.d.ts +0 -57
- package/Desktop/index.js +0 -746
- package/DragVerify/index.d.ts +0 -36
- package/DragVerify/index.js +0 -385
- package/DragVerify/lang/en_US.d.ts +0 -5
- package/DragVerify/lang/index.d.ts +0 -11
- package/DragVerify/lang/zh_CN.d.ts +0 -5
- package/Drawer/index.d.ts +0 -11
- package/Drawer/index.js +0 -235
- package/Drawer/interface.d.ts +0 -92
- package/Drawer/lang/en_US.d.ts +0 -5
- package/Drawer/lang/index.d.ts +0 -11
- package/Drawer/lang/zh_CN.d.ts +0 -5
- package/Dropdown/index.d.ts +0 -40
- package/Dropdown/index.js +0 -10
- package/DynamicMultiBox/formItem.d.ts +0 -14
- package/DynamicMultiBox/index.d.ts +0 -5
- package/DynamicMultiBox/index.js +0 -1313
- package/DynamicMultiBox/interface.d.ts +0 -161
- package/DynamicMultiBox/rowForm.d.ts +0 -24
- package/Empty/images/index.d.ts +0 -3
- package/Empty/index.d.ts +0 -30
- package/Empty/index.js +0 -642
- package/Empty/lang/en_US.d.ts +0 -6
- package/Empty/lang/index.d.ts +0 -13
- package/Empty/lang/zh_CN.d.ts +0 -6
- package/Form/index.d.ts +0 -187
- package/Form/index.js +0 -355
- package/FormItem/compoments/defaultCompoments/index.d.ts +0 -19
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +0 -8
- package/FormItem/compoments/formFile/index.d.ts +0 -38
- package/FormItem/compoments/formRadioGroup/index.d.ts +0 -8
- package/FormItem/compoments/formSelect/index.d.ts +0 -18
- package/FormItem/errorTips.d.ts +0 -12
- package/FormItem/index.d.ts +0 -152
- package/FormItem/index.js +0 -78
- package/FormItem/itemType.d.ts +0 -42
- package/FormItem/validateFunction.d.ts +0 -15
- package/FunctionModal/dialog.d.ts +0 -58
- package/FunctionModal/index.d.ts +0 -8
- package/FunctionModal/index.js +0 -43
- package/FunctionModal/modalContext.d.ts +0 -15
- package/GlobalContext/componentsProps.d.ts +0 -21
- package/GlobalContext/confirmLocale.d.ts +0 -7
- package/GlobalContext/constant.d.ts +0 -8
- package/GlobalContext/index.d.ts +0 -28
- package/GlobalContext/index.js +0 -41
- package/GlobalContext/intl.d.ts +0 -34
- package/GlobalContext/useFormatMessage.d.ts +0 -3
- package/GlobalContext/usePopupContainer.d.ts +0 -4
- package/Help/index.d.ts +0 -24
- package/Help/index.js +0 -41
- package/HelperText/index.d.ts +0 -27
- package/HelperText/index.js +0 -34
- package/Hooks/useGlobalProps.d.ts +0 -1
- package/InputLang/index.d.ts +0 -46
- package/InputLang/index.js +0 -247
- package/InputNumber/index.d.ts +0 -71
- package/InputNumber/index.js +0 -277
- package/Label/index.d.ts +0 -37
- package/Label/index.js +0 -85
- package/Loading/index.d.ts +0 -17
- package/Loading/index.js +0 -47
- package/Menu/footerExpansion.d.ts +0 -9
- package/Menu/index.d.ts +0 -10
- package/Menu/index.js +0 -1105
- package/Menu/interface.d.ts +0 -141
- package/Menu/logo.d.ts +0 -9
- package/Menu/verticalMenuList.d.ts +0 -14
- package/Message/index.d.ts +0 -99
- package/Message/index.js +0 -246
- package/Modal/Confirm/index.d.ts +0 -65
- package/Modal/index.d.ts +0 -99
- package/Modal/index.js +0 -421
- package/Modal/lang/en_US.d.ts +0 -5
- package/Modal/lang/index.d.ts +0 -11
- package/Modal/lang/zh_CN.d.ts +0 -5
- package/MultiBox/index.d.ts +0 -58
- package/MultiBox/index.js +0 -272
- package/MultiBox/lang/en_US.d.ts +0 -4
- package/MultiBox/lang/index.d.ts +0 -9
- package/MultiBox/lang/zh_CN.d.ts +0 -4
- package/Notification/index.d.ts +0 -74
- package/Notification/index.js +0 -252
- package/OperateBtn/index.d.ts +0 -59
- package/OperateBtn/index.js +0 -237
- package/OperateBtn/lang/en_US.d.ts +0 -4
- package/OperateBtn/lang/index.d.ts +0 -9
- package/OperateBtn/lang/zh_CN.d.ts +0 -4
- package/PageHeader/horizontalMeun.d.ts +0 -9
- package/PageHeader/horizontalMeunRight.d.ts +0 -9
- package/PageHeader/index.d.ts +0 -10
- package/PageHeader/index.js +0 -1050
- package/PageHeader/interface.d.ts +0 -169
- package/Pagination/index.d.ts +0 -46
- package/Pagination/index.js +0 -461
- package/Pagination/lang/en_US.d.ts +0 -8
- package/Pagination/lang/index.d.ts +0 -17
- package/Pagination/lang/zh_CN.d.ts +0 -8
- package/ParauiProvider/index.d.ts +0 -8
- package/ParauiProvider/index.js +0 -52
- package/PasswordRules/index.d.ts +0 -46
- package/PasswordRules/index.js +0 -113
- package/PopConfirm/index.d.ts +0 -61
- package/PopConfirm/index.js +0 -194
- package/PopConfirm/lang/en_US.d.ts +0 -5
- package/PopConfirm/lang/index.d.ts +0 -11
- package/PopConfirm/lang/zh_CN.d.ts +0 -5
- package/Popover/index.d.ts +0 -16
- package/Popover/index.js +0 -59
- package/Progress/Line.d.ts +0 -47
- package/Progress/Steps.d.ts +0 -17
- package/Progress/index.d.ts +0 -83
- package/Progress/index.js +0 -323
- package/Progress/utils.d.ts +0 -6
- package/Querying/images/index.d.ts +0 -3
- package/Querying/index.d.ts +0 -26
- package/Querying/index.js +0 -760
- package/Querying/lang/en_US.d.ts +0 -4
- package/Querying/lang/index.d.ts +0 -9
- package/Querying/lang/zh_CN.d.ts +0 -4
- package/Radio/index.d.ts +0 -38
- package/Radio/index.js +0 -97
- package/RadioGroup/index.d.ts +0 -46
- package/RadioGroup/index.js +0 -134
- package/Search/index.d.ts +0 -57
- package/Search/index.js +0 -208
- package/Select/index.d.ts +0 -93
- package/Select/index.js +0 -1146
- package/Select/lang/en_US.d.ts +0 -5
- package/Select/lang/index.d.ts +0 -11
- package/Select/lang/zh_CN.d.ts +0 -5
- package/SelectInput/index.d.ts +0 -12
- package/SelectInput/index.js +0 -55
- package/Selector/index.d.ts +0 -11
- package/Selector/index.js +0 -2175
- package/Selector/interface.d.ts +0 -432
- package/Selector/lang/en_US.d.ts +0 -11
- package/Selector/lang/index.d.ts +0 -23
- package/Selector/lang/zh_CN.d.ts +0 -11
- package/Selector/selectorData/index.d.ts +0 -10
- package/Selector/selectorMain/index.d.ts +0 -10
- package/Selector/selectorNode/index.d.ts +0 -10
- package/Selector/util.d.ts +0 -15
- package/SelectorPicker/index.d.ts +0 -53
- package/SelectorPicker/index.js +0 -444
- package/SelectorPicker/lang/en_US.d.ts +0 -5
- package/SelectorPicker/lang/index.d.ts +0 -11
- package/SelectorPicker/lang/zh_CN.d.ts +0 -5
- package/SingleBox/index.d.ts +0 -44
- package/SingleBox/index.js +0 -224
- package/SingleBox/lang/en_US.d.ts +0 -4
- package/SingleBox/lang/index.d.ts +0 -9
- package/SingleBox/lang/zh_CN.d.ts +0 -4
- package/Slider/index.d.ts +0 -14
- package/Slider/index.js +0 -119
- package/Slider/interface.d.ts +0 -102
- package/Split/index.d.ts +0 -7
- package/Split/index.js +0 -123
- package/Status/index.d.ts +0 -21
- package/Status/index.js +0 -37
- package/Stepper/icons.d.ts +0 -5
- package/Stepper/index.d.ts +0 -59
- package/Stepper/index.js +0 -97
- package/Switch/index.d.ts +0 -78
- package/Switch/index.js +0 -71
- package/Table/index.d.ts +0 -10
- package/Table/index.js +0 -2999
- package/Table/interface.d.ts +0 -346
- package/Table/lang/en_US.d.ts +0 -8
- package/Table/lang/index.d.ts +0 -17
- package/Table/lang/zh_CN.d.ts +0 -8
- package/Table/tableBody.d.ts +0 -9
- package/Table/tableBodyElement/index.d.ts +0 -15
- package/Table/tableBodyInterface.d.ts +0 -73
- package/Table/tableContainer/index.d.ts +0 -16
- package/Table/tableElement/index.d.ts +0 -17
- package/Table/tableHead.d.ts +0 -9
- package/Table/tableHeadElement/index.d.ts +0 -15
- package/Table/tableHeadInterface.d.ts +0 -37
- package/Table/tablePagination.d.ts +0 -9
- package/Table/tablePaginationInterface.d.ts +0 -27
- package/Table/tdElement/index.d.ts +0 -15
- package/Table/thElement/index.d.ts +0 -28
- package/Table/trElement/index.d.ts +0 -15
- package/Table/util.d.ts +0 -34
- package/Tabs/index.d.ts +0 -69
- package/Tabs/index.js +0 -205
- package/Tabs/lang/en_US.d.ts +0 -4
- package/Tabs/lang/index.d.ts +0 -9
- package/Tabs/lang/zh_CN.d.ts +0 -4
- package/Tag/TagGroup.d.ts +0 -66
- package/Tag/index.d.ts +0 -34
- package/Tag/index.js +0 -259
- package/TextEditor/common.d.ts +0 -11
- package/TextEditor/index.d.ts +0 -127
- package/TextEditor/index.js +0 -286
- package/TextField/index.d.ts +0 -90
- package/TextField/index.js +0 -611
- package/TimePicker/index.d.ts +0 -22
- package/TimePicker/index.js +0 -80
- package/TimePicker/locale/en_US.d.ts +0 -3
- package/TimePicker/locale/zh_CN.d.ts +0 -3
- package/TimePicker/style/index.d.ts +0 -1
- package/Timeline/TimelineItem.d.ts +0 -30
- package/Timeline/index.d.ts +0 -32
- package/Timeline/index.js +0 -148
- package/Title/index.d.ts +0 -30
- package/Title/index.js +0 -50
- package/ToggleButton/ToggleButtonGroup.d.ts +0 -49
- package/ToggleButton/index.d.ts +0 -49
- package/ToggleButton/index.js +0 -193
- package/Tooltip/index.d.ts +0 -11
- package/Tooltip/index.js +0 -368
- package/Tooltip/interface.d.ts +0 -35
- package/Tooltip/utils.d.ts +0 -18
- package/Transfer/box.d.ts +0 -38
- package/Transfer/index.d.ts +0 -32
- package/Transfer/index.js +0 -611
- package/Transfer/lang/en_US.d.ts +0 -10
- package/Transfer/lang/index.d.ts +0 -21
- package/Transfer/lang/zh_CN.d.ts +0 -10
- package/Transfer/useClick.d.ts +0 -3
- package/Tree/OperateBar/index.d.ts +0 -13
- package/Tree/Tree.d.ts +0 -4
- package/Tree/index.d.ts +0 -5
- package/Tree/index.js +0 -38
- package/Tree/interface.d.ts +0 -210
- package/Tree/lang/en_US.d.ts +0 -8
- package/Tree/lang/index.d.ts +0 -17
- package/Tree/lang/zh_CN.d.ts +0 -8
- package/Tree/utils/closestPolyfill.d.ts +0 -0
- package/Tree/utils/tools.d.ts +0 -25
- package/Tree/utils/treeUtil.d.ts +0 -15
- package/Upload/Dragger/index.d.ts +0 -10
- package/Upload/ErroTip/index.d.ts +0 -13
- package/Upload/ImageUpload/index.d.ts +0 -16
- package/Upload/ImgCrop/EasyCrop.d.ts +0 -17
- package/Upload/ImgCrop/constants.d.ts +0 -7
- package/Upload/ImgCrop/index.d.ts +0 -6
- package/Upload/ImgCrop/interface.d.ts +0 -48
- package/Upload/UploadList/index.d.ts +0 -5
- package/Upload/index.d.ts +0 -15
- package/Upload/index.js +0 -1446
- package/Upload/interface.d.ts +0 -136
- package/Upload/lang/en_US.d.ts +0 -12
- package/Upload/lang/index.d.ts +0 -25
- package/Upload/lang/zh_CN.d.ts +0 -12
- package/_verture/constant-66aa48a1.js +0 -10
- package/_verture/defineProperty-62acccfc.js +0 -34
- package/_verture/index-74f820ba.js +0 -1355
- package/_verture/index-77f9e0fb.js +0 -236
- package/_verture/index-9fd86055.js +0 -711
- package/_verture/index-a369ca3f.js +0 -4
- package/_verture/index-beef914f.js +0 -340
- package/_verture/index-e2881a53.js +0 -16
- package/_verture/intl-5cbb940c.js +0 -57
- package/_verture/modalContext-92bb0e16.js +0 -201
- package/_verture/slicedToArray-76060636.js +0 -43
- package/_verture/sortable.esm-49896035.js +0 -3791
- package/_verture/style-inject.es-300983ab.js +0 -28
- package/_verture/toConsumableArray-81040c9e.js +0 -19
- package/_verture/tslib.es6-55ed4bd2.js +0 -38
- package/_verture/typeof-498dd2b1.js +0 -11
- package/_verture/unsupportedIterableToArray-cb478f24.js +0 -16
- package/_verture/useFormatMessage-703f8b20.js +0 -20
- package/_verture/useGlobalProps-1b846a65.js +0 -11
- package/_verture/usePopupContainer-87febeb9.js +0 -68
- package/_verture/util-7e1fb1e2.js +0 -18
- package/index.d.ts +0 -144
- package/index.js +0 -180
- package/umd/AutoBox.js +0 -43
- package/umd/AutoTips.js +0 -15
- package/umd/Breadcrumbs.js +0 -42
- package/umd/Button.js +0 -43
- package/umd/ButtonGroup.js +0 -43
- package/umd/Carousel.js +0 -6
- package/umd/Cascader.js +0 -43
- package/umd/Checkbox.js +0 -42
- package/umd/CheckboxGroup.js +0 -42
- package/umd/Collapse.js +0 -43
- package/umd/CollapseBox.js +0 -1
- package/umd/CollapseLayout.js +0 -29
- package/umd/ColorPicker.js +0 -1
- package/umd/ComboSelect.js +0 -42
- package/umd/Container.js +0 -1
- package/umd/DatePicker.js +0 -42
- package/umd/Desktop.js +0 -42
- package/umd/DragVerify.js +0 -28
- package/umd/Drawer.js +0 -43
- package/umd/Dropdown.js +0 -15
- package/umd/DynamicMultiBox.js +0 -54
- package/umd/Empty.js +0 -15
- package/umd/Form.js +0 -42
- package/umd/FormItem.js +0 -42
- package/umd/FunctionModal.js +0 -42
- package/umd/GlobalContext.js +0 -1
- package/umd/Help.js +0 -42
- package/umd/HelperText.js +0 -1
- package/umd/InputLang.js +0 -42
- package/umd/InputNumber.js +0 -42
- package/umd/Label.js +0 -42
- package/umd/Loading.js +0 -29
- package/umd/Menu.js +0 -29
- package/umd/Message.js +0 -30
- package/umd/Modal.js +0 -42
- package/umd/MultiBox.js +0 -42
- package/umd/Notification.js +0 -43
- package/umd/OperateBtn.js +0 -42
- package/umd/PageHeader.js +0 -42
- package/umd/Pagination.js +0 -42
- package/umd/ParauiProvider.js +0 -15
- package/umd/PasswordRules.js +0 -29
- package/umd/PopConfirm.js +0 -42
- package/umd/Popover.js +0 -15
- package/umd/Progress.js +0 -35
- package/umd/Querying.js +0 -15
- package/umd/Radio.js +0 -42
- package/umd/RadioGroup.js +0 -42
- package/umd/Search.js +0 -42
- package/umd/Select.js +0 -42
- package/umd/SelectInput.js +0 -42
- package/umd/Selector.js +0 -42
- package/umd/SelectorPicker.js +0 -42
- package/umd/SingleBox.js +0 -42
- package/umd/Slider.js +0 -15
- package/umd/Split.js +0 -1
- package/umd/Status.js +0 -1
- package/umd/Stepper.js +0 -42
- package/umd/Switch.js +0 -42
- package/umd/Table.js +0 -42
- package/umd/Tabs.js +0 -42
- package/umd/Tag.js +0 -43
- package/umd/TextEditor.js +0 -205
- package/umd/TextField.js +0 -42
- package/umd/TimePicker.js +0 -42
- package/umd/Timeline.js +0 -1
- package/umd/Title.js +0 -1
- package/umd/ToggleButton.js +0 -43
- package/umd/Tooltip.js +0 -15
- package/umd/Transfer.js +0 -49
- package/umd/Tree.js +0 -42
- package/umd/Upload.js +0 -56
package/Menu/interface.d.ts
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author linhd
|
|
3
|
-
* @date 2021/8/10 14:24
|
|
4
|
-
* @description 菜单参数
|
|
5
|
-
*/
|
|
6
|
-
import React, { ReactNode } from 'react';
|
|
7
|
-
/** 菜单类型 */
|
|
8
|
-
export type MenuListTypeType = 'redirect' | 'router' | "iframe" | "snack" | "snackPage";
|
|
9
|
-
/** color类型 */
|
|
10
|
-
export type ColorType = 'deep' | 'light';
|
|
11
|
-
/** logo参数 */
|
|
12
|
-
export interface LogoProps {
|
|
13
|
-
/** 展开 / 收起 */
|
|
14
|
-
expansion?: boolean;
|
|
15
|
-
/** 自定义内容 */
|
|
16
|
-
render?: ReactNode;
|
|
17
|
-
/** 样式class */
|
|
18
|
-
className?: string;
|
|
19
|
-
}
|
|
20
|
-
/** 菜单列表项参数 */
|
|
21
|
-
export interface MenuChildrenProps {
|
|
22
|
-
/** 样式class */
|
|
23
|
-
className?: string;
|
|
24
|
-
/** 菜单名 */
|
|
25
|
-
label?: ReactNode;
|
|
26
|
-
/** 菜单类型 */
|
|
27
|
-
type?: MenuListTypeType;
|
|
28
|
-
/** 菜单路径 */
|
|
29
|
-
path?: string;
|
|
30
|
-
/** href a标签地址 */
|
|
31
|
-
href?: string;
|
|
32
|
-
/** 菜单图标 */
|
|
33
|
-
icon?: ReactNode;
|
|
34
|
-
/** 菜单组件 */
|
|
35
|
-
component?: any;
|
|
36
|
-
/** 子菜单 */
|
|
37
|
-
children?: MenuChildrenProps[];
|
|
38
|
-
/** 菜单最后一层所有上下级 一条线 */
|
|
39
|
-
idMenuLast?: any;
|
|
40
|
-
/** 当前选中菜单 */
|
|
41
|
-
selectMenu?: string;
|
|
42
|
-
/** 点击菜单 */
|
|
43
|
-
onClickMenu?: (item: MenuChildrenProps | false) => void;
|
|
44
|
-
/** 选中菜单,是否收起其他展开项 */
|
|
45
|
-
shrinkOthers?: boolean;
|
|
46
|
-
/** 唯一值,内部属性,自动生成 */
|
|
47
|
-
_paraui_menu_id?: string;
|
|
48
|
-
/** 是否第一级 */
|
|
49
|
-
_paraui_menu_first?: boolean;
|
|
50
|
-
[name: string]: any;
|
|
51
|
-
}
|
|
52
|
-
/** 菜单列表参数 */
|
|
53
|
-
export interface MenuListProps {
|
|
54
|
-
/** 颜色 */
|
|
55
|
-
color?: ColorType;
|
|
56
|
-
/** 展开 / 收起 */
|
|
57
|
-
expansion?: boolean;
|
|
58
|
-
/** 菜单列表参数 */
|
|
59
|
-
list?: MenuChildrenProps[];
|
|
60
|
-
/** 当前选中菜单 */
|
|
61
|
-
selectMenu?: string;
|
|
62
|
-
/** 点击菜单 */
|
|
63
|
-
onClickMenu?: (item: MenuChildrenProps | false) => void;
|
|
64
|
-
/** 样式class */
|
|
65
|
-
className?: string;
|
|
66
|
-
/** 选中菜单,是否收起其他展开项 */
|
|
67
|
-
shrinkOthers?: boolean;
|
|
68
|
-
[name: string]: any;
|
|
69
|
-
}
|
|
70
|
-
/** 弹出菜单 */
|
|
71
|
-
export interface MenuItemPopoverProps {
|
|
72
|
-
/** 打开 */
|
|
73
|
-
open?: boolean;
|
|
74
|
-
/** 定位元素, 自定义属性 paraui-menu-id */
|
|
75
|
-
anchorEl?: string;
|
|
76
|
-
/** 菜单列表 */
|
|
77
|
-
list?: MenuChildrenProps[];
|
|
78
|
-
/** 菜单最后一层所有上下级 一条线 */
|
|
79
|
-
idMenuLast?: any;
|
|
80
|
-
/** 当前选中菜单 */
|
|
81
|
-
selectMenu?: string;
|
|
82
|
-
/** 点击菜单 */
|
|
83
|
-
onClickMenu?: (item: MenuChildrenProps | false) => void;
|
|
84
|
-
/** 层级 */
|
|
85
|
-
level?: number;
|
|
86
|
-
/** 鼠标移入 */
|
|
87
|
-
onMouseEnter?: Function;
|
|
88
|
-
/** 鼠标移出 */
|
|
89
|
-
onMouseLeave: Function;
|
|
90
|
-
onMouseEnterBus?: Function;
|
|
91
|
-
onMouseLeaveBus?: Function;
|
|
92
|
-
/** 主题色 */
|
|
93
|
-
color?: ColorType;
|
|
94
|
-
className?: string;
|
|
95
|
-
[name: string]: any;
|
|
96
|
-
}
|
|
97
|
-
/** 尾部展开 */
|
|
98
|
-
export interface FooterExpansionProps {
|
|
99
|
-
/** 是否展开 */
|
|
100
|
-
expansion?: boolean;
|
|
101
|
-
/** 展开图标 */
|
|
102
|
-
expandIcon?: ReactNode;
|
|
103
|
-
/** 收起图标 */
|
|
104
|
-
shrinkIcon?: ReactNode;
|
|
105
|
-
/** 自定义尾部 */
|
|
106
|
-
render?: ReactNode;
|
|
107
|
-
/** 样式class */
|
|
108
|
-
className?: string;
|
|
109
|
-
/** 展开事件 */
|
|
110
|
-
clickExpansion?: (bol: boolean) => void;
|
|
111
|
-
/** 版本号 */
|
|
112
|
-
version?: ReactNode;
|
|
113
|
-
[name: string]: any;
|
|
114
|
-
}
|
|
115
|
-
/** 菜单参数 */
|
|
116
|
-
export interface MenuProps {
|
|
117
|
-
/** 样式class */
|
|
118
|
-
className?: string;
|
|
119
|
-
/** style */
|
|
120
|
-
style?: React.CSSProperties;
|
|
121
|
-
/** 颜色 */
|
|
122
|
-
color?: ColorType;
|
|
123
|
-
/** 展开 / 收起 */
|
|
124
|
-
expansion?: boolean;
|
|
125
|
-
/** 当前选中菜单 */
|
|
126
|
-
selectMenu?: string;
|
|
127
|
-
/** 选中菜单,是否收起其他展开项 */
|
|
128
|
-
shrinkOthers?: boolean;
|
|
129
|
-
/** 显示收缩按钮 */
|
|
130
|
-
showExpansion?: boolean;
|
|
131
|
-
/** logo配置 */
|
|
132
|
-
logoProps?: LogoProps;
|
|
133
|
-
/** 菜单配置 */
|
|
134
|
-
menuListProps?: MenuListProps;
|
|
135
|
-
/** 尾部展开参数 */
|
|
136
|
-
footerExpansionProps?: FooterExpansionProps;
|
|
137
|
-
/** 展开事件 */
|
|
138
|
-
onClickExpansion?: (bol: boolean) => void;
|
|
139
|
-
/** 点击菜单 */
|
|
140
|
-
onClickMenu?: (item: MenuChildrenProps | false) => void;
|
|
141
|
-
}
|
package/Menu/logo.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author linhd
|
|
3
|
-
* @date 2021/8/10 17:54
|
|
4
|
-
* @description 竖向菜单
|
|
5
|
-
*/
|
|
6
|
-
import { FunctionComponent } from 'react';
|
|
7
|
-
import { MenuListProps } from './interface';
|
|
8
|
-
/** 上下箭头 */
|
|
9
|
-
export type FlipDisable = {
|
|
10
|
-
prev: boolean;
|
|
11
|
-
next: boolean;
|
|
12
|
-
};
|
|
13
|
-
export declare const VerticalMenuList: FunctionComponent<MenuListProps>;
|
|
14
|
-
export default VerticalMenuList;
|
package/Message/index.d.ts
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Hanz
|
|
3
|
-
* @date 2021/8/5 下午8:04
|
|
4
|
-
* @description message 全局提示
|
|
5
|
-
*/
|
|
6
|
-
import React from 'react';
|
|
7
|
-
import './index.scss';
|
|
8
|
-
type MsgType = 'info' | 'warn' | 'error' | 'success';
|
|
9
|
-
interface InternalMsgConfig {
|
|
10
|
-
/** 消息id */
|
|
11
|
-
id?: string;
|
|
12
|
-
/** 是否启用html渲染内容 */
|
|
13
|
-
html?: boolean;
|
|
14
|
-
/** 是否强制显示关闭按钮,默认自动当延迟关闭事件为0或null时自动显示 */
|
|
15
|
-
close?: boolean;
|
|
16
|
-
/** 消息文本 */
|
|
17
|
-
text: string;
|
|
18
|
-
/** 图标 */
|
|
19
|
-
icon?: any;
|
|
20
|
-
/** 内部消息类型 */
|
|
21
|
-
type: MsgType;
|
|
22
|
-
/** 最大显示数 */
|
|
23
|
-
maxCount?: number;
|
|
24
|
-
/** 描述 */
|
|
25
|
-
desc?: string;
|
|
26
|
-
/** 是否隐藏图标 */
|
|
27
|
-
hideIcon?: boolean;
|
|
28
|
-
/** 样式类名 */
|
|
29
|
-
className?: string;
|
|
30
|
-
/** 样式 */
|
|
31
|
-
style?: React.CSSProperties;
|
|
32
|
-
}
|
|
33
|
-
interface MsgGlobalConfig {
|
|
34
|
-
/**
|
|
35
|
-
* 最大显示数
|
|
36
|
-
*/
|
|
37
|
-
maxCount?: number;
|
|
38
|
-
/**
|
|
39
|
-
* 时长
|
|
40
|
-
*/
|
|
41
|
-
duration?: number;
|
|
42
|
-
}
|
|
43
|
-
export declare const MessageBar: React.FC<InternalMsgConfig>;
|
|
44
|
-
declare const _default: () => JSX.Element;
|
|
45
|
-
export default _default;
|
|
46
|
-
export type MsgTypeProps = {
|
|
47
|
-
/**是否启用html渲染内容*/
|
|
48
|
-
html?: boolean;
|
|
49
|
-
/**是否强制显示关闭按钮,默认自动当延迟关闭事件为0或null时自动显示*/
|
|
50
|
-
close?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* 消息文本
|
|
53
|
-
*/
|
|
54
|
-
text?: string;
|
|
55
|
-
/**
|
|
56
|
-
* 图标
|
|
57
|
-
*/
|
|
58
|
-
icon?: any;
|
|
59
|
-
/**
|
|
60
|
-
* 最大显示数
|
|
61
|
-
*/
|
|
62
|
-
maxCount?: number;
|
|
63
|
-
/**
|
|
64
|
-
* 描述
|
|
65
|
-
*/
|
|
66
|
-
desc?: string;
|
|
67
|
-
/**
|
|
68
|
-
* 隐藏默认图标
|
|
69
|
-
*/
|
|
70
|
-
hideIcon?: boolean;
|
|
71
|
-
/**
|
|
72
|
-
* cls
|
|
73
|
-
*/
|
|
74
|
-
className?: string;
|
|
75
|
-
/**
|
|
76
|
-
* style
|
|
77
|
-
*/
|
|
78
|
-
style?: React.CSSProperties;
|
|
79
|
-
};
|
|
80
|
-
interface MsgPorps {
|
|
81
|
-
(config: string | MsgTypeProps, duration?: number): void;
|
|
82
|
-
}
|
|
83
|
-
export interface MessageObject {
|
|
84
|
-
/**信息*/
|
|
85
|
-
info: MsgPorps;
|
|
86
|
-
/**警告*/
|
|
87
|
-
warn: MsgPorps;
|
|
88
|
-
/**错误*/
|
|
89
|
-
error: MsgPorps;
|
|
90
|
-
/**成功*/
|
|
91
|
-
success: MsgPorps;
|
|
92
|
-
/** 清除所有 */
|
|
93
|
-
clear?: () => void;
|
|
94
|
-
/** 销毁所有,兼容写法 */
|
|
95
|
-
destroyAll?: () => void;
|
|
96
|
-
/** 全局配置 */
|
|
97
|
-
config?: (config: MsgGlobalConfig) => void;
|
|
98
|
-
}
|
|
99
|
-
export declare const Message: MessageObject;
|
package/Message/index.js
DELETED
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
import { _ as _typeof } from '../_verture/typeof-498dd2b1.js';
|
|
2
|
-
import { _ as _toConsumableArray } from '../_verture/toConsumableArray-81040c9e.js';
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
import { useEffect } from 'react';
|
|
5
|
-
import ReactDOM from 'react-dom';
|
|
6
|
-
import WarningCircleF from '@para-ui/icons/WarningCircleF';
|
|
7
|
-
import CompleteIcon from '@para-ui/icons/CheckCircleF';
|
|
8
|
-
import CloseIcon from '@para-ui/icons/Close';
|
|
9
|
-
import CloseCircleFilled from '@para-ui/icons/CloseCircleF';
|
|
10
|
-
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
11
|
-
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
12
|
-
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
13
|
-
|
|
14
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/1 下午5:48\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-message-box {\n /*从上到下进入*/\n /*从上到下*/\n}\n.paraui-v3-message-box--message-float {\n position: fixed;\n top: 3%;\n left: 0;\n z-index: 9999;\n text-align: center;\n width: 100%;\n pointer-events: none;\n}\n.paraui-v3-message-box .msg-item .msg-wrapper {\n position: relative;\n display: inline-block;\n margin: 10px auto;\n min-height: 44px;\n padding: 12px 16px;\n border-radius: 4px;\n font-size: 14px;\n text-align: left;\n}\n.paraui-v3-message-box .msg-item .msg-icon {\n position: absolute;\n top: 15px;\n left: 16px;\n line-height: 0;\n}\n.paraui-v3-message-box .msg-item .msg-icon svg {\n font-size: 14px;\n color: currentColor;\n}\n.paraui-v3-message-box .msg-item .msg-text {\n display: inline-block;\n max-width: 60vw;\n word-wrap: break-word;\n margin-right: 32px;\n margin-left: 22px;\n line-height: 20px;\n word-break: break-all;\n}\n.paraui-v3-message-box .msg-item .msg-text--title {\n font-weight: 700;\n}\n.paraui-v3-message-box .msg-item .msg-text--noicon {\n margin-left: 0;\n}\n.paraui-v3-message-box .msg-item .msg-text .msg-desc {\n display: block;\n margin-top: 8px;\n font-weight: 400;\n word-wrap: break-word;\n}\n.paraui-v3-message-box .msg-item .msg-close {\n position: absolute;\n right: 16px;\n top: 15px;\n cursor: pointer;\n line-height: 0;\n pointer-events: auto;\n}\n.paraui-v3-message-box .msg-item .msg-close svg {\n font-size: 14px;\n color: currentColor;\n}\n.paraui-v3-message-box .msg-item-fill .msg-wrapper {\n width: 100%;\n}\n.paraui-v3-message-box .msg-info {\n background-color: rgb(243, 246, 252);\n color: rgb(54, 102, 214);\n}\n.paraui-v3-message-box .msg-info .msg-close {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-message-box .msg-warn {\n background-color: rgb(254, 249, 245);\n color: rgb(255, 161, 80);\n}\n.paraui-v3-message-box .msg-warn .msg-close {\n color: rgb(255, 161, 80);\n}\n.paraui-v3-message-box .msg-error {\n background-color: rgb(253, 246, 245);\n color: rgb(235, 96, 84);\n}\n.paraui-v3-message-box .msg-error .msg-close {\n color: rgb(235, 96, 84);\n}\n.paraui-v3-message-box .msg-success {\n background-color: rgb(245, 251, 242);\n color: rgb(83, 195, 27);\n}\n.paraui-v3-message-box .msg-success .msg-close {\n color: rgb(83, 195, 27);\n}\n.paraui-v3-message-box .message-fadeInDown {\n animation-duration: 0.5s;\n animation-name: messageFadeInDown;\n}\n@keyframes messageFadeInDown {\n from {\n opacity: 0;\n transform: translate(0, -50px); /* 标准语法 */\n }\n to {\n opacity: 1;\n transform: translate(0, 0); /* 标准语法 */\n }\n}";
|
|
15
|
-
styleInject(css_248z);
|
|
16
|
-
|
|
17
|
-
//图标map
|
|
18
|
-
var iconMapping = {
|
|
19
|
-
'info': jsx(WarningCircleF, {}),
|
|
20
|
-
'warn': jsx(WarningCircleF, {}),
|
|
21
|
-
'error': jsx(CloseCircleFilled, {}),
|
|
22
|
-
'success': jsx(CompleteIcon, {})
|
|
23
|
-
};
|
|
24
|
-
//获取window
|
|
25
|
-
var getMsgWindow = function getMsgWindow() {
|
|
26
|
-
return window === window.top ? window : window.top;
|
|
27
|
-
};
|
|
28
|
-
//消息内容模板
|
|
29
|
-
var template = function template(_ref) {
|
|
30
|
-
var icon = _ref.icon,
|
|
31
|
-
text = _ref.text,
|
|
32
|
-
id = _ref.id,
|
|
33
|
-
type = _ref.type,
|
|
34
|
-
html = _ref.html,
|
|
35
|
-
close = _ref.close,
|
|
36
|
-
desc = _ref.desc,
|
|
37
|
-
hideIcon = _ref.hideIcon;
|
|
38
|
-
var item = document.createElement('div');
|
|
39
|
-
item.className = "msg-item";
|
|
40
|
-
item.id = id || "";
|
|
41
|
-
item.innerHTML = "<div class=\"msg-wrapper message-fadeInDown msg-".concat(type, "\">\n ").concat(icon ? "<div class=\"msg-icon\"></div>" : '', "\n <div class=\"msg-text\"></div>\n ").concat(close ? "<div class=\"msg-close\"></div>" : '', "\n </div>\n ");
|
|
42
|
-
var msgBox = item.querySelector('.msg-text');
|
|
43
|
-
if (!msgBox) return item;
|
|
44
|
-
if (html) msgBox.innerHTML = text;else msgBox.textContent = text;
|
|
45
|
-
//描述
|
|
46
|
-
if (desc) {
|
|
47
|
-
var span = document.createElement('span');
|
|
48
|
-
span.className = 'msg-desc';
|
|
49
|
-
span.textContent = desc || '';
|
|
50
|
-
msgBox.classList.add('msg-text--title');
|
|
51
|
-
msgBox.appendChild(span);
|
|
52
|
-
}
|
|
53
|
-
if (hideIcon) {
|
|
54
|
-
msgBox.classList.add('msg-text--noicon');
|
|
55
|
-
}
|
|
56
|
-
var msgClose = item.querySelector('.msg-close');
|
|
57
|
-
if (msgClose) msgClose.addEventListener('click', function () {
|
|
58
|
-
var _a;
|
|
59
|
-
var hasNode = document.querySelector("#".concat(id));
|
|
60
|
-
if (hasNode) {
|
|
61
|
-
(_a = item === null || item === void 0 ? void 0 : item.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(item);
|
|
62
|
-
item = null;
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
return item;
|
|
66
|
-
};
|
|
67
|
-
var MessageBar = function MessageBar(props) {
|
|
68
|
-
var className = props.className,
|
|
69
|
-
style = props.style,
|
|
70
|
-
type = props.type;
|
|
71
|
-
var pId = createParentId();
|
|
72
|
-
var mId = getMsgId();
|
|
73
|
-
var cls = getParentClassName(props.className || "");
|
|
74
|
-
if (className) cls += " ".concat(className);
|
|
75
|
-
useEffect(function () {
|
|
76
|
-
var parent = document.getElementById(pId);
|
|
77
|
-
renderContent(parent, Object.assign(Object.assign({}, props), {
|
|
78
|
-
id: mId,
|
|
79
|
-
icon: iconMapping[type]
|
|
80
|
-
}), 0, false, true);
|
|
81
|
-
return function () {
|
|
82
|
-
var hasNode = document.querySelector("#".concat(mId));
|
|
83
|
-
if (hasNode) {
|
|
84
|
-
parent === null || parent === void 0 ? void 0 : parent.removeChild(hasNode);
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
}, _toConsumableArray(Object.values(props)));
|
|
88
|
-
return jsx("div", {
|
|
89
|
-
id: pId,
|
|
90
|
-
className: cls,
|
|
91
|
-
style: style
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
|
-
var createParentId = function createParentId() {
|
|
95
|
-
return "msgbox_" + String(Math.random() * 100000 | 0 + new Date().getTime());
|
|
96
|
-
};
|
|
97
|
-
//消息box id
|
|
98
|
-
var parentId = createParentId();
|
|
99
|
-
//message mountNode
|
|
100
|
-
var index = (function () {
|
|
101
|
-
return jsx("div", {
|
|
102
|
-
className: "".concat($prefixCls, "-message-box"),
|
|
103
|
-
id: parentId
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
//渲染msg 内容
|
|
107
|
-
var renderContent = function renderContent(box, _ref2, removeTime, autoClose, fill) {
|
|
108
|
-
var icon = _ref2.icon,
|
|
109
|
-
text = _ref2.text,
|
|
110
|
-
id = _ref2.id,
|
|
111
|
-
type = _ref2.type,
|
|
112
|
-
html = _ref2.html,
|
|
113
|
-
close = _ref2.close,
|
|
114
|
-
desc = _ref2.desc,
|
|
115
|
-
hideIcon = _ref2.hideIcon;
|
|
116
|
-
var item = template({
|
|
117
|
-
id: id,
|
|
118
|
-
text: text,
|
|
119
|
-
icon: icon,
|
|
120
|
-
type: type,
|
|
121
|
-
html: html,
|
|
122
|
-
close: close,
|
|
123
|
-
desc: desc,
|
|
124
|
-
hideIcon: hideIcon
|
|
125
|
-
});
|
|
126
|
-
if (fill && item) item.classList.add("msg-item-fill");
|
|
127
|
-
box === null || box === void 0 ? void 0 : box.appendChild(item);
|
|
128
|
-
var iconDom = document.querySelector("#".concat(id, " .msg-icon"));
|
|
129
|
-
if (iconDom && icon && !hideIcon) ReactDOM.render(icon, iconDom);
|
|
130
|
-
var closeDom = document.querySelector("#".concat(id, " .msg-close"));
|
|
131
|
-
if (closeDom) ReactDOM.render(jsx(CloseIcon, {}), closeDom);
|
|
132
|
-
if (!autoClose) return;
|
|
133
|
-
setTimeout(function () {
|
|
134
|
-
var hasNode = document.querySelector("#".concat(item.id));
|
|
135
|
-
if (hasNode) box === null || box === void 0 ? void 0 : box.removeChild(item);
|
|
136
|
-
}, removeTime);
|
|
137
|
-
};
|
|
138
|
-
//message 构造方法
|
|
139
|
-
var Msg = function Msg(config, removeTime, type, parentId) {
|
|
140
|
-
var _a, _b;
|
|
141
|
-
var getMsgConf = function getMsgConf() {
|
|
142
|
-
var _win = getMsgWindow();
|
|
143
|
-
return _win['__msg_conf__'] || {};
|
|
144
|
-
};
|
|
145
|
-
var icon = iconMapping[type],
|
|
146
|
-
text = '',
|
|
147
|
-
desc = '',
|
|
148
|
-
html = false,
|
|
149
|
-
close,
|
|
150
|
-
hideIcon = false,
|
|
151
|
-
maxCount = (_a = getMsgConf().maxCount) !== null && _a !== void 0 ? _a : Infinity,
|
|
152
|
-
duration = (_b = getMsgConf().duration) !== null && _b !== void 0 ? _b : removeTime,
|
|
153
|
-
className = '';
|
|
154
|
-
var autoClose = !isNaN(duration) && duration > 0;
|
|
155
|
-
if (typeof config === "string") text = config;else if (_typeof(config) === "object") {
|
|
156
|
-
text = config.text || '';
|
|
157
|
-
desc = config.desc;
|
|
158
|
-
icon = config.icon || iconMapping[type];
|
|
159
|
-
html = config.html || false;
|
|
160
|
-
hideIcon = config.hideIcon || false;
|
|
161
|
-
if (config.maxCount > 0) maxCount = config.maxCount || Infinity;
|
|
162
|
-
}
|
|
163
|
-
if (_typeof(config) === "object" && typeof config.close === "boolean") close = config.close;else close = !autoClose;
|
|
164
|
-
var parent = document.getElementById(parentId);
|
|
165
|
-
if (!parent) {
|
|
166
|
-
parent = document.createElement('div');
|
|
167
|
-
parent.id = parentId;
|
|
168
|
-
document.body.appendChild(parent);
|
|
169
|
-
}
|
|
170
|
-
parent.className = getParentClassName(className);
|
|
171
|
-
parent.className += ' ' + "".concat($prefixCls, "-message-box--message-float");
|
|
172
|
-
var id = getMsgId();
|
|
173
|
-
renderContent(parent, {
|
|
174
|
-
id: id,
|
|
175
|
-
text: text,
|
|
176
|
-
icon: icon,
|
|
177
|
-
type: type,
|
|
178
|
-
html: html,
|
|
179
|
-
close: close,
|
|
180
|
-
desc: desc,
|
|
181
|
-
hideIcon: hideIcon
|
|
182
|
-
}, duration, autoClose);
|
|
183
|
-
dropEleWhenExceedLimit(parent, maxCount);
|
|
184
|
-
};
|
|
185
|
-
var getParentClassName = function getParentClassName(className) {
|
|
186
|
-
return "".concat($prefixCls, "-message-box").concat(className ? ' ' + className : '');
|
|
187
|
-
};
|
|
188
|
-
var getMsgId = function getMsgId() {
|
|
189
|
-
return 'msgitem_' + String(Math.random() * 100000 | 0 + new Date().getTime());
|
|
190
|
-
};
|
|
191
|
-
//超出maxCount 删除之前元素
|
|
192
|
-
var dropEleWhenExceedLimit = function dropEleWhenExceedLimit(parent, maxCount) {
|
|
193
|
-
var _a, _b;
|
|
194
|
-
if (!parent || !((_a = parent.children) === null || _a === void 0 ? void 0 : _a.length)) return;
|
|
195
|
-
var child = parent.children;
|
|
196
|
-
var len = child.length;
|
|
197
|
-
if (len > maxCount) {
|
|
198
|
-
for (var i = 0; i < len; i++) {
|
|
199
|
-
if (i < maxCount && child[i]) {
|
|
200
|
-
(_b = child[i].parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(child[i]);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
//清除所有msg
|
|
206
|
-
var clearFunc = function clearFunc(parentId) {
|
|
207
|
-
var parent = document.getElementById(parentId);
|
|
208
|
-
if (!parent) return;
|
|
209
|
-
parent.innerHTML = '';
|
|
210
|
-
};
|
|
211
|
-
//msg 全局配置
|
|
212
|
-
var msgConfig = function msgConfig() {
|
|
213
|
-
var conf = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
214
|
-
var _win = getMsgWindow();
|
|
215
|
-
_win.__msg_conf__ = conf;
|
|
216
|
-
};
|
|
217
|
-
//message
|
|
218
|
-
var Message = {
|
|
219
|
-
info: function info(config) {
|
|
220
|
-
var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
|
|
221
|
-
return Msg(config, duration, 'info', parentId);
|
|
222
|
-
},
|
|
223
|
-
warn: function warn(config) {
|
|
224
|
-
var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
|
|
225
|
-
return Msg(config, duration, 'warn', parentId);
|
|
226
|
-
},
|
|
227
|
-
error: function error(config) {
|
|
228
|
-
var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
|
|
229
|
-
return Msg(config, duration, 'error', parentId);
|
|
230
|
-
},
|
|
231
|
-
success: function success(config) {
|
|
232
|
-
var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
|
|
233
|
-
return Msg(config, duration, 'success', parentId);
|
|
234
|
-
},
|
|
235
|
-
clear: function clear() {
|
|
236
|
-
return clearFunc(parentId);
|
|
237
|
-
},
|
|
238
|
-
destroyAll: function destroyAll() {
|
|
239
|
-
return clearFunc(parentId);
|
|
240
|
-
},
|
|
241
|
-
config: function config(_config) {
|
|
242
|
-
return msgConfig(_config);
|
|
243
|
-
}
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
export { Message, MessageBar, index as default };
|
package/Modal/Confirm/index.d.ts
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
import { ButtonProps } from "../../Button";
|
|
3
|
-
import './index.scss';
|
|
4
|
-
type ConfirmType = "success" | "info" | "error" | "warn" | "warning";
|
|
5
|
-
interface ConfirmDialogProps {
|
|
6
|
-
/**图标类型*/
|
|
7
|
-
type?: ConfirmType;
|
|
8
|
-
/**打开*/
|
|
9
|
-
open?: boolean;
|
|
10
|
-
/**标题*/
|
|
11
|
-
title?: ReactNode;
|
|
12
|
-
/**内容*/
|
|
13
|
-
content?: ReactNode;
|
|
14
|
-
/**自定义图标*/
|
|
15
|
-
icon?: ReactNode;
|
|
16
|
-
/**ok文本*/
|
|
17
|
-
okText?: string;
|
|
18
|
-
/**cancel文本*/
|
|
19
|
-
cancelText?: string;
|
|
20
|
-
/**底部操作栏*/
|
|
21
|
-
actions?: ReactNode;
|
|
22
|
-
/**是否显示actions*/
|
|
23
|
-
showActions?: boolean;
|
|
24
|
-
/**确定回调*/
|
|
25
|
-
onOk?: Function;
|
|
26
|
-
/**取消回调*/
|
|
27
|
-
onCancel?: Function;
|
|
28
|
-
/**cls*/
|
|
29
|
-
className?: string;
|
|
30
|
-
/**confirm 宽度*/
|
|
31
|
-
width?: string | number;
|
|
32
|
-
/**显示取消按钮*/
|
|
33
|
-
showCancel?: boolean;
|
|
34
|
-
/**显示关闭按钮*/
|
|
35
|
-
closable?: boolean;
|
|
36
|
-
/**禁用backdrop点击*/
|
|
37
|
-
disableBackdropClick?: boolean;
|
|
38
|
-
/**禁用esc键*/
|
|
39
|
-
disableEscapeKeyDown?: boolean;
|
|
40
|
-
/**确定按钮属性*/
|
|
41
|
-
okButtonProps?: ButtonProps;
|
|
42
|
-
/**取消按钮属性*/
|
|
43
|
-
cancelButtonProps?: ButtonProps;
|
|
44
|
-
/**promise resolve*/
|
|
45
|
-
resolveFn?: Function;
|
|
46
|
-
/**确定时回调*/
|
|
47
|
-
callback?: Function;
|
|
48
|
-
/**销毁方法*/
|
|
49
|
-
destroy?: Function;
|
|
50
|
-
}
|
|
51
|
-
type ConfirmProps = Omit<ConfirmDialogProps, 'open' | 'resolveFn' | 'destroy' | 'callback'> & {
|
|
52
|
-
uuid?: string;
|
|
53
|
-
};
|
|
54
|
-
interface ConfirmFn {
|
|
55
|
-
(config: ConfirmProps | string, callback?: Function): void | Promise<any>;
|
|
56
|
-
}
|
|
57
|
-
export interface ConfirmObject {
|
|
58
|
-
info: ConfirmFn;
|
|
59
|
-
warn: ConfirmFn;
|
|
60
|
-
error: ConfirmFn;
|
|
61
|
-
success: ConfirmFn;
|
|
62
|
-
destroyAll?: (uuid?: string) => void;
|
|
63
|
-
}
|
|
64
|
-
export declare const Confirm: ConfirmObject;
|
|
65
|
-
export {};
|
package/Modal/index.d.ts
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
import { ButtonProps } from '../Button';
|
|
3
|
-
import { Confirm, ConfirmObject } from "./Confirm";
|
|
4
|
-
import './index.scss';
|
|
5
|
-
type ModalSize = 'sm' | 'md' | 'lg' | 'auto' | 'fullScreen';
|
|
6
|
-
export interface ModalProps {
|
|
7
|
-
/** 对话框是否可见 */
|
|
8
|
-
visible?: boolean;
|
|
9
|
-
/** 打开 */
|
|
10
|
-
open?: boolean;
|
|
11
|
-
/** 确定按钮 loading */
|
|
12
|
-
confirmLoading?: boolean;
|
|
13
|
-
/** 标题 */
|
|
14
|
-
title?: ReactNode;
|
|
15
|
-
/** 内容 */
|
|
16
|
-
children?: ReactNode;
|
|
17
|
-
/** 对话框头部 */
|
|
18
|
-
header?: ReactNode;
|
|
19
|
-
/** 隐藏对话框头部 */
|
|
20
|
-
hideHeader?: boolean;
|
|
21
|
-
/** 底部操作栏 */
|
|
22
|
-
actions?: ((buttons: ReactNode[]) => ReactNode[]) | ReactNode;
|
|
23
|
-
/** 底部内容 */
|
|
24
|
-
footer?: ((buttons: ReactNode[]) => ReactNode[]) | ReactNode;
|
|
25
|
-
/** 是否显示actions */
|
|
26
|
-
showActions?: boolean;
|
|
27
|
-
/** 显示取消按钮 */
|
|
28
|
-
showCancel?: boolean;
|
|
29
|
-
/** 是否显示右上角的关闭按钮 */
|
|
30
|
-
closable?: boolean;
|
|
31
|
-
/** 点击确定回调 */
|
|
32
|
-
onOk?: (e?: React.MouseEvent<HTMLElement>) => void;
|
|
33
|
-
/** 点击模态框右上角叉、取消按钮,return false 不关闭 */
|
|
34
|
-
onCancel?: (e?: React.MouseEvent<HTMLElement>) => boolean | void;
|
|
35
|
-
afterClose?: () => void;
|
|
36
|
-
/** 大小 */
|
|
37
|
-
size?: ModalSize;
|
|
38
|
-
/** 垂直居中 */
|
|
39
|
-
centered?: boolean;
|
|
40
|
-
/** 宽度 */
|
|
41
|
-
width?: string | number;
|
|
42
|
-
/** 确认按钮文字 */
|
|
43
|
-
okText?: ReactNode;
|
|
44
|
-
/** 确认按钮类型 */
|
|
45
|
-
okType?: string;
|
|
46
|
-
/** 取消按钮文字 */
|
|
47
|
-
cancelText?: ReactNode;
|
|
48
|
-
/** 点击蒙层是否允许关闭 */
|
|
49
|
-
maskClosable?: boolean;
|
|
50
|
-
disableBackdropClick?: boolean;
|
|
51
|
-
/** 强制渲染 Modal */
|
|
52
|
-
forceRender?: boolean;
|
|
53
|
-
/** 确定按钮属性 */
|
|
54
|
-
okButtonProps?: ButtonProps;
|
|
55
|
-
/** 取消按钮属性 */
|
|
56
|
-
cancelButtonProps?: ButtonProps;
|
|
57
|
-
/** 关闭时是否销毁 */
|
|
58
|
-
destroyOnClose?: boolean;
|
|
59
|
-
/** style */
|
|
60
|
-
style?: React.CSSProperties;
|
|
61
|
-
/** 包裹classname */
|
|
62
|
-
wrapClassName?: string;
|
|
63
|
-
/** cls */
|
|
64
|
-
className?: string;
|
|
65
|
-
/** 渲染容器 */
|
|
66
|
-
getContainer?: string | HTMLElement | (() => HTMLElement) | false;
|
|
67
|
-
/** 设置z-index */
|
|
68
|
-
zIndex?: number;
|
|
69
|
-
/** body样式 */
|
|
70
|
-
bodyStyle?: React.CSSProperties;
|
|
71
|
-
/** mask样式 */
|
|
72
|
-
maskStyle?: React.CSSProperties;
|
|
73
|
-
/** 是否显示遮罩 */
|
|
74
|
-
mask?: boolean;
|
|
75
|
-
/** 是否支持键盘esc关闭 */
|
|
76
|
-
keyboard?: boolean;
|
|
77
|
-
disableEscapeKeyDown?: boolean;
|
|
78
|
-
/** 右上角关闭图标 */
|
|
79
|
-
closeIcon?: ReactNode;
|
|
80
|
-
/** 自定义渲染对话框 */
|
|
81
|
-
modalRender?: (node: ReactNode) => ReactNode;
|
|
82
|
-
/** 对话框关闭后是否需要聚焦触发元素 */
|
|
83
|
-
focusTriggerAfterClose?: boolean;
|
|
84
|
-
/** 是否全屏 */
|
|
85
|
-
fullScreen?: boolean;
|
|
86
|
-
/** 自定义大小 */
|
|
87
|
-
customizeSize?: React.CSSProperties;
|
|
88
|
-
/** 内容宽度 */
|
|
89
|
-
contentWidth?: number | string;
|
|
90
|
-
/** 内容高度 */
|
|
91
|
-
contentHeight?: number | string;
|
|
92
|
-
/** 内容样式 */
|
|
93
|
-
contentStyle?: React.CSSProperties;
|
|
94
|
-
[name: string]: any;
|
|
95
|
-
}
|
|
96
|
-
export declare const Modal: React.FC<ModalProps>;
|
|
97
|
-
export { Confirm };
|
|
98
|
-
export type { ConfirmObject };
|
|
99
|
-
export default Modal;
|