@para-ui/core 4.0.0-beta → 4.0.0-rc.1
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 +1 -1
- package/AutoBox/index.js +12 -12
- package/AutoTips/autoTipsMultiline/index.d.ts +1 -1
- package/AutoTips/index.d.ts +2 -2
- package/AutoTips/index.js +17 -17
- package/Badge/index.d.ts +23 -0
- package/Badge/index.js +54 -0
- package/Breadcrumbs/index.js +8 -8
- package/Button/SplitButton.d.ts +1 -1
- package/Button/index.d.ts +1 -1
- package/Button/index.js +4 -4
- package/Carousel/index.d.ts +6 -6
- package/Carousel/index.js +5 -5
- package/Cascader/Cascader.d.ts +10 -10
- package/Cascader/OptionList/Column.d.ts +3 -3
- package/Cascader/OptionList/index.d.ts +2 -2
- package/Cascader/index.d.ts +1 -1
- package/Cascader/index.js +5 -3
- package/Cascader/lang/en_US.d.ts +5 -0
- package/Cascader/lang/index.d.ts +11 -0
- package/Cascader/lang/zh_CN.d.ts +5 -0
- package/Cascader/utils/treeUtil.d.ts +1 -1
- package/Checkbox/index.d.ts +1 -1
- package/Checkbox/index.js +5 -5
- package/CheckboxGroup/index.d.ts +2 -2
- package/CheckboxGroup/index.js +3 -3
- package/Collapse/index.js +4 -4
- package/CollapseBox/index.js +12 -20
- package/CollapseLayout/index.js +20 -20
- package/ColorPicker/index.js +2 -2
- package/ComboSelect/index.js +53 -63
- package/ComboSelect/interface.d.ts +3 -3
- package/ComboSelect/utils.d.ts +5 -0
- package/Container/index.d.ts +3 -3
- package/Container/index.js +56 -56
- package/CopyText/index.d.ts +2 -2
- package/CopyText/index.js +2 -2
- package/DatePicker/generatePicker/index.d.ts +22 -22
- package/DatePicker/index.js +10 -8
- package/DatePicker/util.d.ts +1 -1
- package/Desktop/index.d.ts +1 -1
- package/Desktop/index.js +19 -14
- package/DragVerify/index.d.ts +1 -1
- package/DragVerify/index.js +15 -15
- package/Drawer/index.d.ts +2 -2
- package/Drawer/index.js +118 -17
- package/Drawer/interface.d.ts +10 -2
- package/Drawer/util.d.ts +6 -0
- package/Dropdown/index.d.ts +1 -1
- package/DynamicMultiBox/formItem.d.ts +1 -1
- package/DynamicMultiBox/index.d.ts +7 -2
- package/DynamicMultiBox/index.js +42 -39
- package/DynamicMultiBox/interface.d.ts +8 -8
- package/DynamicMultiBox/rowForm.d.ts +3 -1
- package/Empty/index.d.ts +1 -1
- package/Empty/index.js +2 -2
- package/Form/index.d.ts +12 -13
- package/Form/index.js +14 -12
- package/FormItem/compoments/defaultCompoments/index.d.ts +4 -4
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +1 -1
- package/FormItem/compoments/formFile/index.d.ts +2 -2
- package/FormItem/compoments/formRadioGroup/index.d.ts +1 -1
- package/FormItem/compoments/formSelect/index.d.ts +7 -7
- package/FormItem/errorTips.d.ts +3 -3
- package/FormItem/index.d.ts +5 -5
- package/FormItem/index.js +7 -6
- package/FormItem/lang/en_US.d.ts +10 -0
- package/FormItem/lang/index.d.ts +21 -0
- package/FormItem/lang/zh_CN.d.ts +10 -0
- package/FormItem/validateFunction.d.ts +1 -1
- package/FunctionModal/dialog.d.ts +26 -26
- package/FunctionModal/index.d.ts +6 -6
- package/FunctionModal/index.js +9 -9
- package/FunctionModal/modalContext.d.ts +3 -3
- package/GlobalContext/componentsProps.d.ts +7 -7
- package/GlobalContext/index.d.ts +2 -2
- package/GlobalContext/index.js +1 -1
- package/GlobalContext/useFormatMessage.d.ts +1 -1
- package/Help/index.js +2 -2
- package/HelperText/index.js +1 -1
- package/InputLang/index.d.ts +2 -2
- package/InputLang/index.js +8 -8
- package/InputNumber/index.d.ts +2 -2
- package/InputNumber/index.js +4 -4
- package/Label/index.js +2 -2
- package/Loading/index.js +1 -1
- package/Menu/index.js +14 -14
- package/Menu/interface.d.ts +1 -1
- package/Message/index.js +12 -12
- package/Modal/Confirm/index.d.ts +3 -3
- package/Modal/index.d.ts +1 -1
- package/Modal/index.js +7 -7
- package/MultiBox/index.d.ts +2 -2
- package/MultiBox/index.js +11 -7
- package/Notification/index.js +2 -2
- package/OperateBtn/index.d.ts +2 -2
- package/OperateBtn/index.js +42 -37
- package/PageHeader/index.js +31 -31
- package/PageHeader/interface.d.ts +1 -1
- package/Pagination/index.d.ts +1 -1
- package/Pagination/index.js +17 -17
- package/ParauiProvider/index.js +1 -1
- package/PasswordRules/index.js +8 -8
- package/PopConfirm/index.js +4 -4
- package/Progress/Line.d.ts +10 -10
- package/Progress/Steps.d.ts +2 -2
- package/Progress/index.d.ts +12 -12
- package/Progress/index.js +40 -40
- package/Progress/utils.d.ts +4 -4
- package/Querying/index.d.ts +1 -1
- package/Querying/index.js +2 -2
- package/README.md +3 -0
- package/Radio/index.d.ts +1 -1
- package/Radio/index.js +5 -5
- package/RadioGroup/index.d.ts +2 -2
- package/RadioGroup/index.js +3 -3
- package/Search/index.js +2 -2
- package/Select/index.d.ts +3 -3
- package/Select/index.js +43 -43
- package/SelectInput/index.js +2 -2
- package/Selector/index.js +19 -19
- package/Selector/interface.d.ts +6 -6
- package/SelectorPicker/index.d.ts +4 -4
- package/SelectorPicker/index.js +12 -12
- package/SingleBox/index.d.ts +2 -2
- package/SingleBox/index.js +3 -3
- package/Slider/interface.d.ts +1 -1
- package/Status/index.d.ts +6 -4
- package/Status/index.js +21 -9
- package/Stepper/index.d.ts +5 -5
- package/Stepper/index.js +24 -24
- package/Styles/scrollbar.scss +66 -66
- package/Styles/theme.scss +62 -61
- package/Switch/index.d.ts +7 -7
- package/Switch/index.js +24 -6
- package/Switch/lang/en_US.d.ts +4 -0
- package/Switch/lang/index.d.ts +9 -0
- package/Switch/lang/zh_CN.d.ts +4 -0
- package/Table/index.js +36 -36
- package/Table/interface.d.ts +4 -4
- package/Table/tableBodyElement/index.d.ts +1 -1
- package/Table/tableBodyInterface.d.ts +2 -2
- package/Table/tableContainer/index.d.ts +1 -1
- package/Table/tableElement/index.d.ts +1 -1
- package/Table/tableHeadElement/index.d.ts +1 -1
- package/Table/tableHeadInterface.d.ts +1 -1
- package/Table/tablePaginationInterface.d.ts +6 -6
- package/Table/tdElement/index.d.ts +1 -1
- package/Table/thElement/index.d.ts +2 -2
- package/Table/trElement/index.d.ts +1 -1
- package/Table/util.d.ts +1 -1
- package/Tabs/index.d.ts +1 -1
- package/Tabs/index.js +26 -18
- package/Tag/TagGroup.d.ts +5 -5
- package/Tag/index.d.ts +7 -7
- package/Tag/index.js +33 -1207
- package/TextEditor/index.d.ts +2 -2
- package/TextEditor/index.js +45 -27
- package/TextEditor/lang/en_US.d.ts +4 -0
- package/TextEditor/lang/index.d.ts +9 -0
- package/TextEditor/lang/zh_CN.d.ts +4 -0
- package/TextField/index.d.ts +1 -1
- package/TextField/index.js +13 -13
- package/TimePicker/index.d.ts +1 -1
- package/TimePicker/index.js +2 -1
- package/Timeline/TimelineItem.d.ts +1 -1
- package/Timeline/index.d.ts +5 -5
- package/Timeline/index.js +14 -14
- package/Title/index.d.ts +6 -4
- package/Title/index.js +9 -5
- package/ToggleButton/ToggleButtonGroup.d.ts +1 -1
- package/ToggleButton/index.d.ts +5 -1
- package/ToggleButton/index.js +17 -10
- package/Tooltip/index.js +1 -1
- package/Transfer/box.d.ts +6 -6
- package/Transfer/index.js +27 -27
- package/Tree/OperateBar/index.d.ts +2 -2
- package/Tree/Tree.d.ts +2 -2
- package/Tree/index.js +4 -4
- package/Tree/interface.d.ts +8 -4
- package/Tree/utils/tools.d.ts +1 -1
- package/Upload/Dragger/index.d.ts +2 -2
- package/Upload/ErroTip/index.d.ts +1 -1
- package/Upload/index.d.ts +2 -2
- package/Upload/index.js +13 -13
- package/Upload/interface.d.ts +1 -1
- package/_verture/{index-5c77417d.js → index-0f315bca.js} +4 -4
- package/_verture/{index-e2881a53.js → index-19947788.js} +2 -2
- package/_verture/{index-d63bd287.js → index-232d890b.js} +1 -1
- package/_verture/{index-68db2bc3.js → index-92e406f4.js} +50 -26
- package/_verture/{index-7ec72724.js → index-bc461491.js} +45 -38
- package/_verture/{index-e6f85fd5.js → index-d251967e.js} +104 -47
- package/_verture/{modalContext-c12ca3e8.js → modalContext-9299acc9.js} +26 -26
- package/_verture/tinycolor-ece3542d.js +1180 -0
- package/_verture/{utils-f0e81540.js → utils-06d86594.js} +3 -6
- package/index.d.ts +2 -0
- package/index.js +14 -13
- package/locale/en-US.d.ts +19 -0
- package/locale/index.d.ts +38 -0
- package/locale/index.js +41 -3
- package/locale/zh-CN.d.ts +19 -0
- package/package.json +53 -8
- package/umd/AutoBox.js +2 -2
- package/umd/AutoTips.js +4 -4
- package/umd/Badge.js +1 -0
- package/umd/Breadcrumbs.js +2 -2
- package/umd/Button.js +2 -2
- package/umd/ButtonGroup.js +4 -4
- package/umd/Cascader.js +4 -4
- package/umd/Checkbox.js +5 -5
- package/umd/CheckboxGroup.js +5 -5
- package/umd/Collapse.js +1 -1
- package/umd/CollapseBox.js +1 -1
- package/umd/CollapseLayout.js +4 -4
- package/umd/ColorPicker.js +1 -1
- package/umd/ComboSelect.js +6 -6
- package/umd/CopyText.js +2 -2
- package/umd/DatePicker.js +2 -2
- package/umd/Desktop.js +2 -2
- package/umd/DragVerify.js +4 -4
- package/umd/Drawer.js +4 -4
- package/umd/DynamicMultiBox.js +4 -4
- package/umd/Form.js +4 -4
- package/umd/FormItem.js +4 -4
- package/umd/FunctionModal.js +2 -2
- package/umd/GlobalContext.js +1 -1
- package/umd/Help.js +2 -2
- package/umd/HelperText.js +1 -1
- package/umd/InputLang.js +4 -4
- package/umd/InputNumber.js +2 -2
- package/umd/Label.js +2 -2
- package/umd/Loading.js +1 -1
- package/umd/Menu.js +2 -2
- package/umd/Message.js +1 -1
- package/umd/Modal.js +2 -2
- package/umd/MultiBox.js +7 -7
- package/umd/Notification.js +2 -2
- package/umd/OperateBtn.js +2 -2
- package/umd/PageHeader.js +2 -2
- package/umd/Pagination.js +4 -4
- package/umd/ParauiProvider.js +1 -1
- package/umd/PasswordRules.js +3 -3
- package/umd/PopConfirm.js +2 -2
- package/umd/Popover.js +1 -1
- package/umd/Progress.js +1 -1
- package/umd/Radio.js +2 -2
- package/umd/RadioGroup.js +2 -2
- package/umd/Search.js +7 -7
- package/umd/Select.js +2 -2
- package/umd/SelectInput.js +2 -2
- package/umd/Selector.js +2 -2
- package/umd/SelectorPicker.js +2 -2
- package/umd/SingleBox.js +2 -2
- package/umd/Status.js +4 -4
- package/umd/Stepper.js +2 -2
- package/umd/Switch.js +5 -5
- package/umd/Table.js +6 -6
- package/umd/Tabs.js +4 -4
- package/umd/Tag.js +2 -2
- package/umd/TextEditor.js +3 -3
- package/umd/TextField.js +7 -7
- package/umd/TimePicker.js +2 -2
- package/umd/Title.js +2 -2
- package/umd/ToggleButton.js +4 -4
- package/umd/Tooltip.js +1 -1
- package/umd/Transfer.js +5 -5
- package/umd/Tree.js +7 -7
- package/umd/Upload.js +2 -2
- package/umd/locale.js +1 -1
- /package/_verture/{typeof-b240b062.js → typeof-c310ee4a.js} +0 -0
package/Drawer/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
|
|
2
2
|
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
3
3
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
4
|
-
import
|
|
4
|
+
import { useState, useRef, useEffect } from 'react';
|
|
5
|
+
import clsx from 'clsx';
|
|
5
6
|
import RcDrawer from 'rc-drawer';
|
|
6
7
|
import { Button } from '../Button/index.js';
|
|
7
8
|
import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
|
|
@@ -11,7 +12,6 @@ import { isIE } from '@paraview/lib';
|
|
|
11
12
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
12
13
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
13
14
|
import '../_verture/typeof-adeedc13.js';
|
|
14
|
-
import 'clsx';
|
|
15
15
|
import '@para-ui/icons/LoadingF';
|
|
16
16
|
import '@para-ui/icons/Forbid';
|
|
17
17
|
import '../Tooltip/index.js';
|
|
@@ -39,13 +39,33 @@ var localeJson = {
|
|
|
39
39
|
en: en
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
/**
|
|
43
|
+
* 查找元素
|
|
44
|
+
* @param el 当前元素
|
|
45
|
+
* @param selector 查找元素class
|
|
46
|
+
*/
|
|
47
|
+
var closest = function closest(el, selector) {
|
|
48
|
+
var matchesSelector = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector;
|
|
49
|
+
while (el) {
|
|
50
|
+
if (matchesSelector.call(el, selector)) {
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
el = el.parentElement;
|
|
54
|
+
}
|
|
55
|
+
return el;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/8 下午2:51\n* @description drawer样式\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-drawer {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1000;\n pointer-events: none;\n}\n\n.paraui-v4-drawer-inline {\n position: absolute;\n}\n\n.paraui-v4-drawer-mask {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1000;\n background: rgba(29, 33, 38, 0.9);\n pointer-events: auto;\n}\n\n.paraui-v4-drawer-content-wrapper {\n position: absolute;\n z-index: 1000;\n transition: all 0.3s;\n}\n\n.paraui-v4-drawer-resizing .paraui-v4-drawer-content-wrapper {\n transition: none;\n}\n\n.paraui-v4-drawer-content-wrapper-hidden {\n display: none;\n}\n\n.paraui-v4-drawer-left > .paraui-v4-drawer-content-wrapper {\n top: 0;\n bottom: 0;\n left: 0;\n box-shadow: 6px 0 16px -8px rgba(0, 0, 0, 0.08), 9px 0 28px 0 rgba(0, 0, 0, 0.05), 12px 0 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v4-drawer-right > .paraui-v4-drawer-content-wrapper {\n top: 0;\n right: 0;\n bottom: 0;\n box-shadow: -6px 0 16px -8px rgba(0, 0, 0, 0.08), -9px 0 28px 0 rgba(0, 0, 0, 0.05), -12px 0 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v4-drawer-top > .paraui-v4-drawer-content-wrapper {\n top: 0;\n right: 0;\n left: 0;\n box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.08), 0 9px 28px 0 rgba(0, 0, 0, 0.05), 0 12px 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v4-drawer-bottom > .paraui-v4-drawer-content-wrapper {\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 0 -6px 16px -8px rgba(0, 0, 0, 0.08), 0 -9px 28px 0 rgba(0, 0, 0, 0.05), 0 -12px 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v4-drawer-content {\n width: 100%;\n height: 100%;\n overflow: auto;\n background: rgb(255, 255, 255);\n pointer-events: auto;\n position: relative;\n}\n.paraui-v4-drawer-content .drawer-handle {\n position: absolute;\n z-index: 999;\n user-select: none;\n}\n.paraui-v4-drawer-content .drawer-handle .drawer-handle-icon {\n background: #2e65e6;\n width: 100%;\n height: 100%;\n opacity: 0;\n transition: opacity 0.3s;\n}\n.paraui-v4-drawer-content .drawer-handle:hover .drawer-handle-icon {\n opacity: 1;\n}\n.paraui-v4-drawer-content .drawer-content-body {\n display: flex;\n flex-flow: column nowrap;\n width: 100%;\n height: 100%;\n}\n.paraui-v4-drawer-content .drawer-content-body .drawer-body-header {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex: none;\n height: 50px;\n padding: 0 20px;\n font-size: 16px;\n font-weight: 700;\n color: rgb(29, 33, 38);\n border-bottom: 1px solid rgb(234, 236, 241);\n}\n.paraui-v4-drawer-content .drawer-content-body .drawer-body-header .drawer-header-title {\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: space-between;\n}\n.paraui-v4-drawer-content .drawer-content-body .drawer-body-header .drawer-header-title-ellipsis {\n overflow: hidden;\n}\n.paraui-v4-drawer-content .drawer-content-body .drawer-body-header .drawer-header-extra {\n margin-left: 30px;\n flex-shrink: 0;\n white-space: nowrap;\n text-align: right;\n}\n.paraui-v4-drawer-content .drawer-content-body .drawer-body-header .drawer-header-extra button + button {\n margin-left: 16px;\n}\n.paraui-v4-drawer-content .drawer-content-body .drawer-body-content {\n flex: 1;\n padding: 20px;\n overflow: auto;\n word-wrap: break-word;\n position: relative;\n}\n.paraui-v4-drawer-content .drawer-content-body .drawer-body-footer {\n display: flex;\n align-items: center;\n flex: none;\n padding: 20px;\n font-size: 16px;\n color: rgb(29, 33, 38);\n border-top: 1px solid rgb(234, 236, 241);\n}\n\n.paraui-v4-drawer-left .drawer-handle,\n.paraui-v4-drawer-right .drawer-handle {\n top: 0;\n width: 6px;\n height: 100%;\n cursor: e-resize;\n}\n\n.paraui-v4-drawer-left .drawer-handle {\n right: 0;\n padding: 0 0 0 4px;\n}\n\n.paraui-v4-drawer-right .drawer-handle {\n left: 0;\n padding: 0 4px 0 0;\n}\n\n.paraui-v4-drawer-top .drawer-handle,\n.paraui-v4-drawer-bottom .drawer-handle {\n left: 0;\n height: 6px;\n width: 100%;\n cursor: n-resize;\n}\n\n.paraui-v4-drawer-top .drawer-handle {\n bottom: 0;\n padding: 4px 0 0 0;\n}\n\n.paraui-v4-drawer-bottom .drawer-handle {\n top: 0;\n padding: 0 0 4px 0;\n}\n\n.panel-motion-enter-start,\n.panel-motion-appear-start,\n.panel-motion-leave-start {\n transition: none;\n}\n\n.panel-motion-enter-active,\n.panel-motion-appear-active,\n.panel-motion-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v4-drawer-mask-motion-enter-active,\n.paraui-v4-drawer-mask-motion-appear-active,\n.paraui-v4-drawer-mask-motion-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v4-drawer-mask-motion-enter,\n.paraui-v4-drawer-mask-motion-appear {\n opacity: 0;\n}\n\n.paraui-v4-drawer-mask-motion-enter-active,\n.paraui-v4-drawer-mask-motion-appear-active {\n opacity: 1;\n}\n\n.paraui-v4-drawer-mask-motion-leave {\n opacity: 1;\n}\n\n.paraui-v4-drawer-mask-motion-leave-active {\n opacity: 0;\n}\n\n.paraui-v4-drawer-panel-motion-left-enter-start,\n.paraui-v4-drawer-panel-motion-left-appear-start,\n.paraui-v4-drawer-panel-motion-left-leave-start {\n transition: none;\n}\n\n.paraui-v4-drawer-panel-motion-left-enter-active,\n.paraui-v4-drawer-panel-motion-left-appear-active,\n.paraui-v4-drawer-panel-motion-left-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v4-drawer-panel-motion-left-enter-start,\n.paraui-v4-drawer-panel-motion-left-appear-start {\n transform: translateX(-100%) !important;\n}\n\n.paraui-v4-drawer-panel-motion-left-enter-active,\n.paraui-v4-drawer-panel-motion-left-appear-active {\n transform: translateX(0);\n}\n\n.paraui-v4-drawer-panel-motion-left-leave {\n transform: translateX(0);\n}\n\n.paraui-v4-drawer-panel-motion-left-leave-active {\n transform: translateX(-100%);\n}\n\n.paraui-v4-drawer-panel-motion-right-enter-start,\n.paraui-v4-drawer-panel-motion-right-appear-start,\n.paraui-v4-drawer-panel-motion-right-leave-start {\n transition: none;\n}\n\n.paraui-v4-drawer-panel-motion-right-enter-active,\n.paraui-v4-drawer-panel-motion-right-appear-active,\n.paraui-v4-drawer-panel-motion-right-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v4-drawer-panel-motion-right-enter-start,\n.paraui-v4-drawer-panel-motion-right-appear-start {\n transform: translateX(100%) !important;\n}\n\n.paraui-v4-drawer-panel-motion-right-enter-active,\n.paraui-v4-drawer-panel-motion-right-appear-active {\n transform: translateX(0);\n}\n\n.paraui-v4-drawer-panel-motion-right-leave {\n transform: translateX(0);\n}\n\n.paraui-v4-drawer-panel-motion-right-leave-active {\n transform: translateX(100%);\n}\n\n.paraui-v4-drawer-panel-motion-top-enter-start,\n.paraui-v4-drawer-panel-motion-top-appear-start,\n.paraui-v4-drawer-panel-motion-top-leave-start {\n transition: none;\n}\n\n.paraui-v4-drawer-panel-motion-top-enter-active,\n.paraui-v4-drawer-panel-motion-top-appear-active,\n.paraui-v4-drawer-panel-motion-top-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v4-drawer-panel-motion-top-enter-start,\n.paraui-v4-drawer-panel-motion-top-appear-start {\n transform: translateY(-100%) !important;\n}\n\n.paraui-v4-drawer-panel-motion-top-enter-active,\n.paraui-v4-drawer-panel-motion-top-appear-active {\n transform: translateY(0);\n}\n\n.paraui-v4-drawer-panel-motion-top-leave {\n transform: translateY(0);\n}\n\n.paraui-v4-drawer-panel-motion-top-leave-active {\n transform: translateY(-100%);\n}\n\n.paraui-v4-drawer-panel-motion-bottom-enter-start,\n.paraui-v4-drawer-panel-motion-bottom-appear-start,\n.paraui-v4-drawer-panel-motion-bottom-leave-start {\n transition: none;\n}\n\n.paraui-v4-drawer-panel-motion-bottom-enter-active,\n.paraui-v4-drawer-panel-motion-bottom-appear-active,\n.paraui-v4-drawer-panel-motion-bottom-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v4-drawer-panel-motion-bottom-enter-start,\n.paraui-v4-drawer-panel-motion-bottom-appear-start {\n transform: translateY(100%) !important;\n}\n\n.paraui-v4-drawer-panel-motion-bottom-enter-active,\n.paraui-v4-drawer-panel-motion-bottom-appear-active {\n transform: translateY(0);\n}\n\n.paraui-v4-drawer-panel-motion-bottom-leave {\n transform: translateY(0);\n}\n\n.paraui-v4-drawer-panel-motion-bottom-leave-active {\n transform: translateY(100%);\n}";
|
|
43
59
|
styleInject(css_248z);
|
|
44
60
|
|
|
45
61
|
//drawer 抽屉
|
|
46
62
|
var Drawer = function Drawer(props) {
|
|
47
|
-
|
|
48
|
-
|
|
63
|
+
var _a;
|
|
64
|
+
var className = props.className,
|
|
65
|
+
resizable = props.resizable,
|
|
66
|
+
_props$resizeMinimum = props.resizeMinimum,
|
|
67
|
+
resizeMinimum = _props$resizeMinimum === void 0 ? 400 : _props$resizeMinimum,
|
|
68
|
+
onClose = props.onClose,
|
|
49
69
|
_props$destroyOnClose = props.destroyOnClose,
|
|
50
70
|
destroyOnClose = _props$destroyOnClose === void 0 ? false : _props$destroyOnClose,
|
|
51
71
|
style = props.style,
|
|
@@ -66,21 +86,38 @@ var Drawer = function Drawer(props) {
|
|
|
66
86
|
push = _props$push === void 0 ? {
|
|
67
87
|
distance: 100
|
|
68
88
|
} : _props$push,
|
|
69
|
-
restProps = __rest(props, ["className", "onClose", "destroyOnClose", "style", "title", "extra", "showExtra", "footer", "children", "size", "onOk", "onCancel", "afterVisibleChange", "okButtonProps", "cancelButtonProps", "push"]);
|
|
89
|
+
restProps = __rest(props, ["className", "resizable", "resizeMinimum", "onClose", "destroyOnClose", "style", "title", "extra", "showExtra", "footer", "children", "size", "onOk", "onCancel", "afterVisibleChange", "okButtonProps", "cancelButtonProps", "push"]);
|
|
70
90
|
var intl = useFormatMessage('Drawer', localeJson);
|
|
71
|
-
var
|
|
72
|
-
|
|
73
|
-
setRefresh =
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
|
|
91
|
+
var _useState = useState(0),
|
|
92
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
93
|
+
setRefresh = _useState2[1];
|
|
94
|
+
var _useState3 = useState({}),
|
|
95
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
96
|
+
offsetStyle = _useState4[0],
|
|
97
|
+
setOffsetStyle = _useState4[1];
|
|
98
|
+
var _useState5 = useState(false),
|
|
99
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
100
|
+
isResizing = _useState6[0],
|
|
101
|
+
setIsResizing = _useState6[1];
|
|
102
|
+
var destroyCloseRef = useRef(false); //销毁标识
|
|
103
|
+
var timerRef = useRef();
|
|
104
|
+
var isHorizontal = ['left', 'right'].includes((_a = props.placement) !== null && _a !== void 0 ? _a : 'right');
|
|
105
|
+
var startRef = useRef(0);
|
|
106
|
+
var rootEleSize = useRef(0);
|
|
107
|
+
var contentEleSize = useRef(0);
|
|
108
|
+
useEffect(function () {
|
|
77
109
|
return function () {
|
|
78
110
|
// 销毁时销毁timer
|
|
79
111
|
if (!timerRef.current) return;
|
|
80
112
|
clearTimeout(timerRef.current);
|
|
81
113
|
timerRef.current = null;
|
|
114
|
+
window.removeEventListener('mouseup', onHandlerMouseUp);
|
|
115
|
+
window.removeEventListener('mousemove', onHandlerMouseMove);
|
|
82
116
|
};
|
|
83
117
|
}, []);
|
|
118
|
+
useEffect(function () {
|
|
119
|
+
setOffsetStyle(getOffsetStyle);
|
|
120
|
+
}, [props.open, props.placement, props.width, props.height, size]);
|
|
84
121
|
//设置drawer width、height
|
|
85
122
|
var getOffsetStyle = function getOffsetStyle() {
|
|
86
123
|
if (!props.open) {
|
|
@@ -117,6 +154,63 @@ var Drawer = function Drawer(props) {
|
|
|
117
154
|
var handleCancel = function handleCancel() {
|
|
118
155
|
onCancel === null || onCancel === void 0 ? void 0 : onCancel();
|
|
119
156
|
};
|
|
157
|
+
var onHandlerMouseDown = function onHandlerMouseDown(e) {
|
|
158
|
+
var _a, _b;
|
|
159
|
+
setIsResizing(true);
|
|
160
|
+
startRef.current = isHorizontal ? e.clientX : e.clientY;
|
|
161
|
+
var rootEle = (_a = closest(e.target, ".".concat($prefixCls, "-drawer-open"))) !== null && _a !== void 0 ? _a : document.body;
|
|
162
|
+
var contentCls = ".".concat($prefixCls, "-drawer-content-wrapper");
|
|
163
|
+
var contentEle = (_b = closest(e.target, contentCls)) !== null && _b !== void 0 ? _b : rootEle.querySelector(contentCls);
|
|
164
|
+
rootEleSize.current = isHorizontal ? rootEle.offsetWidth : rootEle.offsetHeight;
|
|
165
|
+
contentEleSize.current = isHorizontal ? contentEle.offsetWidth : contentEle.offsetHeight;
|
|
166
|
+
document.addEventListener('mousemove', onHandlerMouseMove);
|
|
167
|
+
document.addEventListener('mouseup', onHandlerMouseUp);
|
|
168
|
+
};
|
|
169
|
+
var onHandlerMouseUp = function onHandlerMouseUp() {
|
|
170
|
+
setIsResizing(false);
|
|
171
|
+
document.removeEventListener('mousemove', onHandlerMouseMove);
|
|
172
|
+
document.removeEventListener('mouseup', onHandlerMouseUp);
|
|
173
|
+
};
|
|
174
|
+
var onHandlerMouseMove = function onHandlerMouseMove(e) {
|
|
175
|
+
switch (props.placement) {
|
|
176
|
+
case 'left':
|
|
177
|
+
{
|
|
178
|
+
var newWidth = contentEleSize.current + (e.clientX - startRef.current);
|
|
179
|
+
if (newWidth + 100 >= rootEleSize.current || newWidth < resizeMinimum) return;
|
|
180
|
+
setOffsetStyle({
|
|
181
|
+
width: newWidth
|
|
182
|
+
});
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
case 'right':
|
|
186
|
+
{
|
|
187
|
+
var _newWidth = contentEleSize.current - (e.clientX - startRef.current);
|
|
188
|
+
if (_newWidth + 100 >= rootEleSize.current || _newWidth < resizeMinimum) return;
|
|
189
|
+
setOffsetStyle({
|
|
190
|
+
width: _newWidth
|
|
191
|
+
});
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
case 'top':
|
|
195
|
+
{
|
|
196
|
+
var newHeight = contentEleSize.current + (e.clientY - startRef.current);
|
|
197
|
+
if (newHeight + 100 >= rootEleSize.current || newHeight < resizeMinimum) return;
|
|
198
|
+
setOffsetStyle({
|
|
199
|
+
height: newHeight
|
|
200
|
+
});
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
case 'bottom':
|
|
204
|
+
{
|
|
205
|
+
var _newHeight = contentEleSize.current - (e.clientY - startRef.current);
|
|
206
|
+
if (_newHeight + 100 >= rootEleSize.current || _newHeight < resizeMinimum) return;
|
|
207
|
+
setOffsetStyle({
|
|
208
|
+
height: _newHeight
|
|
209
|
+
});
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
};
|
|
120
214
|
var handleTitle = function handleTitle(title) {
|
|
121
215
|
if (typeof title === 'string') {
|
|
122
216
|
return jsx("div", Object.assign({
|
|
@@ -187,7 +281,7 @@ var Drawer = function Drawer(props) {
|
|
|
187
281
|
return null;
|
|
188
282
|
}
|
|
189
283
|
var maskMotion = {
|
|
190
|
-
motionName: $prefixCls
|
|
284
|
+
motionName: "".concat($prefixCls, "-drawer-mask-motion"),
|
|
191
285
|
motionAppear: true,
|
|
192
286
|
motionEnter: true,
|
|
193
287
|
motionLeave: true,
|
|
@@ -195,20 +289,20 @@ var Drawer = function Drawer(props) {
|
|
|
195
289
|
};
|
|
196
290
|
var panelMotion = function panelMotion(motionPlacement) {
|
|
197
291
|
return {
|
|
198
|
-
motionName: $prefixCls
|
|
292
|
+
motionName: "".concat($prefixCls, "-drawer-panel-motion-").concat(motionPlacement),
|
|
199
293
|
motionAppear: true,
|
|
200
294
|
motionEnter: true,
|
|
201
295
|
motionLeave: true,
|
|
202
296
|
motionDeadline: isIE() ? 0 : 100
|
|
203
297
|
};
|
|
204
298
|
};
|
|
205
|
-
return
|
|
299
|
+
return jsxs(RcDrawer, Object.assign({}, restProps, offsetStyle, {
|
|
206
300
|
style: style,
|
|
207
301
|
maskMotion: maskMotion,
|
|
208
302
|
motion: panelMotion,
|
|
209
303
|
push: push,
|
|
210
304
|
prefixCls: "".concat($prefixCls, "-drawer"),
|
|
211
|
-
rootClassName:
|
|
305
|
+
rootClassName: clsx(className, isResizing && "".concat($prefixCls, "-drawer-resizing")),
|
|
212
306
|
onClose: handleClose,
|
|
213
307
|
afterOpenChange: function afterOpenChange(open) {
|
|
214
308
|
if (open) {
|
|
@@ -222,7 +316,14 @@ var Drawer = function Drawer(props) {
|
|
|
222
316
|
afterVisibleChange === null || afterVisibleChange === void 0 ? void 0 : afterVisibleChange(open);
|
|
223
317
|
}
|
|
224
318
|
}, {
|
|
225
|
-
children:
|
|
319
|
+
children: [resizable && jsx("div", Object.assign({
|
|
320
|
+
className: "drawer-handle",
|
|
321
|
+
onMouseDown: onHandlerMouseDown
|
|
322
|
+
}, {
|
|
323
|
+
children: jsx("div", {
|
|
324
|
+
className: "drawer-handle-icon"
|
|
325
|
+
})
|
|
326
|
+
})), renderContent()]
|
|
226
327
|
}));
|
|
227
328
|
};
|
|
228
329
|
Drawer.defaultProps = {
|
package/Drawer/interface.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { ButtonProps } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonProps } from '../Button';
|
|
3
3
|
/**
|
|
4
4
|
* @author Hanz
|
|
5
5
|
* @date 2021/11/8 下午3:07
|
|
@@ -8,6 +8,10 @@ import { ButtonProps } from "../Button";
|
|
|
8
8
|
type GetContainer = string | HTMLElement | (() => HTMLElement) | false;
|
|
9
9
|
type ILevelMove = number | [number, number];
|
|
10
10
|
type IPlacement = 'left' | 'top' | 'right' | 'bottom';
|
|
11
|
+
export interface IOffsetStyle {
|
|
12
|
+
width?: string | number;
|
|
13
|
+
height?: string | number;
|
|
14
|
+
}
|
|
11
15
|
export interface DrawerProps {
|
|
12
16
|
/** 类名 */
|
|
13
17
|
className?: string;
|
|
@@ -15,6 +19,10 @@ export interface DrawerProps {
|
|
|
15
19
|
width?: string | number;
|
|
16
20
|
/** 高度 */
|
|
17
21
|
height?: string | number;
|
|
22
|
+
/** 可拖拽边线调整大小 */
|
|
23
|
+
resizable?: boolean;
|
|
24
|
+
/** 拖拽最小尺寸,抽屉方向为纵向时表示最小高度,横向时表示最小宽度,默认400 */
|
|
25
|
+
resizeMinimum?: number;
|
|
18
26
|
/** 打开 */
|
|
19
27
|
open?: boolean;
|
|
20
28
|
/** 默认打开 */
|
package/Drawer/util.d.ts
ADDED
package/Dropdown/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import React, { FC } from 'react';
|
|
7
7
|
import './index.scss';
|
|
8
|
-
export type Placement =
|
|
8
|
+
export type Placement = 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight';
|
|
9
9
|
export interface DropdownProps {
|
|
10
10
|
/** 触发下拉的行为 */
|
|
11
11
|
trigger?: ('click' | 'hover' | 'contextMenu')[];
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @author luohq
|
|
3
|
+
* @date 2022/11/7 10:32 AM
|
|
4
|
+
* @description 多值框组件
|
|
5
|
+
*/
|
|
6
|
+
import { FunctionComponent } from 'react';
|
|
2
7
|
import { IMultiValueProps } from './interface';
|
|
3
8
|
import './index.scss';
|
|
4
|
-
declare const DynamicMultiBox:
|
|
9
|
+
declare const DynamicMultiBox: FunctionComponent<IMultiValueProps>;
|
|
5
10
|
export default DynamicMultiBox;
|
package/DynamicMultiBox/index.js
CHANGED
|
@@ -56,9 +56,8 @@ import 'rc-input-number';
|
|
|
56
56
|
import '@para-ui/icons/Up';
|
|
57
57
|
import '../MultiBox/index.js';
|
|
58
58
|
import '@para-ui/icons/Internet';
|
|
59
|
-
import '../_verture/index-
|
|
60
|
-
import '../_verture/typeof-
|
|
61
|
-
import '@para-ui/icons/CloseCircle';
|
|
59
|
+
import '../_verture/index-232d890b.js';
|
|
60
|
+
import '../_verture/typeof-c310ee4a.js';
|
|
62
61
|
import '../Table/index.js';
|
|
63
62
|
import '../Button/index.js';
|
|
64
63
|
import '@para-ui/icons/ScreenF';
|
|
@@ -74,17 +73,19 @@ import 'rc-pagination';
|
|
|
74
73
|
import '@para-ui/icons/Right';
|
|
75
74
|
import '@para-ui/icons/DoubleLeft';
|
|
76
75
|
import '@para-ui/icons/DoubleRight';
|
|
77
|
-
import '../_verture/index-
|
|
76
|
+
import '../_verture/index-bc461491.js';
|
|
78
77
|
import 'rc-tree';
|
|
79
78
|
import '@para-ui/icons/Document';
|
|
80
79
|
import 'react-dom';
|
|
81
80
|
import '@para-ui/icons/EditFile';
|
|
82
81
|
import '@para-ui/icons/PlusCircle';
|
|
83
82
|
import '@para-ui/icons/MoreCircle';
|
|
84
|
-
import '../_verture/utils-
|
|
83
|
+
import '../_verture/utils-06d86594.js';
|
|
84
|
+
import '../Search/index.js';
|
|
85
85
|
import 'rc-picker/es/generate/dayjs';
|
|
86
86
|
import '../Tag/index.js';
|
|
87
87
|
import '@para-ui/icons/EditOutline';
|
|
88
|
+
import '../_verture/tinycolor-ece3542d.js';
|
|
88
89
|
import '@para-ui/icons/Plus';
|
|
89
90
|
import 'rc-picker';
|
|
90
91
|
import '@para-ui/icons/Calendar';
|
|
@@ -180,7 +181,7 @@ var FormItem = function FormItem(props) {
|
|
|
180
181
|
var getTextField = function getTextField() {
|
|
181
182
|
return jsx(TextField, Object.assign({}, rest, {
|
|
182
183
|
required: false,
|
|
183
|
-
label:
|
|
184
|
+
label: "",
|
|
184
185
|
disabled: disabled,
|
|
185
186
|
onChange: function onChange(e) {
|
|
186
187
|
return inputChange(e.target.value);
|
|
@@ -196,7 +197,7 @@ var FormItem = function FormItem(props) {
|
|
|
196
197
|
return jsx(Select, Object.assign({}, rest, {
|
|
197
198
|
list: selectList,
|
|
198
199
|
required: false,
|
|
199
|
-
label:
|
|
200
|
+
label: "",
|
|
200
201
|
disabled: disabled,
|
|
201
202
|
onChange: function onChange(value) {
|
|
202
203
|
return inputChange(value);
|
|
@@ -242,7 +243,7 @@ var FormItem = function FormItem(props) {
|
|
|
242
243
|
var getInputNumber = function getInputNumber() {
|
|
243
244
|
return jsx(InputNumber, Object.assign({}, rest, {
|
|
244
245
|
required: false,
|
|
245
|
-
label:
|
|
246
|
+
label: "",
|
|
246
247
|
disabled: disabled,
|
|
247
248
|
onChange: function onChange(value) {
|
|
248
249
|
return inputChange(value);
|
|
@@ -256,7 +257,7 @@ var FormItem = function FormItem(props) {
|
|
|
256
257
|
var getInputLang = function getInputLang() {
|
|
257
258
|
return jsx(InputLang, Object.assign({}, rest, {
|
|
258
259
|
required: false,
|
|
259
|
-
label:
|
|
260
|
+
label: "",
|
|
260
261
|
onChange: function onChange(value) {
|
|
261
262
|
return inputChange(value);
|
|
262
263
|
}
|
|
@@ -269,7 +270,7 @@ var FormItem = function FormItem(props) {
|
|
|
269
270
|
var getDatePicker = function getDatePicker() {
|
|
270
271
|
return jsx(DatePicker, Object.assign({}, rest, {
|
|
271
272
|
required: false,
|
|
272
|
-
label:
|
|
273
|
+
label: "",
|
|
273
274
|
disabled: disabled,
|
|
274
275
|
onChange: onDatePickerChange,
|
|
275
276
|
getPopupContainer: function getPopupContainer() {
|
|
@@ -284,7 +285,7 @@ var FormItem = function FormItem(props) {
|
|
|
284
285
|
var getComboSelect = function getComboSelect() {
|
|
285
286
|
return jsx(ComboSelect, Object.assign({}, rest, {
|
|
286
287
|
required: false,
|
|
287
|
-
label:
|
|
288
|
+
label: "",
|
|
288
289
|
disabled: disabled,
|
|
289
290
|
onChange: function onChange(options) {
|
|
290
291
|
return inputChange(options);
|
|
@@ -306,7 +307,9 @@ var FormItem = function FormItem(props) {
|
|
|
306
307
|
};
|
|
307
308
|
|
|
308
309
|
var RowForm = function RowForm(props) {
|
|
309
|
-
var _props$
|
|
310
|
+
var _props$rowKey = props.rowKey,
|
|
311
|
+
rowKey = _props$rowKey === void 0 ? 'id' : _props$rowKey,
|
|
312
|
+
_props$valueList = props.valueList,
|
|
310
313
|
valueList = _props$valueList === void 0 ? [] : _props$valueList,
|
|
311
314
|
rowError = props.rowError,
|
|
312
315
|
_props$errors = props.errors,
|
|
@@ -339,13 +342,13 @@ var RowForm = function RowForm(props) {
|
|
|
339
342
|
othersData = __rest(data, ["style"]);
|
|
340
343
|
var formItemProps = (data === null || data === void 0 ? void 0 : data.inputType) !== 'Switch' ? Object.assign({
|
|
341
344
|
rowIndex: rowIndex,
|
|
342
|
-
id: rowValue
|
|
345
|
+
id: rowValue[rowKey],
|
|
343
346
|
value: rowValue === null || rowValue === void 0 ? void 0 : rowValue[data.name || ''],
|
|
344
347
|
error: !!(rowError === null || rowError === void 0 ? void 0 : rowError[data.name || '']),
|
|
345
348
|
helperText: rowError === null || rowError === void 0 ? void 0 : rowError[data.name || '']
|
|
346
349
|
}, othersData) : Object.assign({
|
|
347
350
|
rowIndex: rowIndex,
|
|
348
|
-
id: rowValue
|
|
351
|
+
id: rowValue[rowKey],
|
|
349
352
|
checked: rowValue === null || rowValue === void 0 ? void 0 : rowValue[data.name || '']
|
|
350
353
|
}, othersData);
|
|
351
354
|
return jsxs("div", Object.assign({
|
|
@@ -926,11 +929,13 @@ var localeJson = {
|
|
|
926
929
|
en: en
|
|
927
930
|
};
|
|
928
931
|
|
|
929
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-dynamic-multi-box {\n width: 100%;\n}\n.paraui-v4-dynamic-multi-box svg {\n overflow: hidden;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content {\n width: 100%;\n position: relative;\n overflow-x: auto;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config {\n width: 100%;\n display: flex;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config .title-config-row {\n display: flex;\n flex: 1;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config .title-config-row .title-config-row-item {\n display: flex;\n align-items: center;\n min-width: 180px;\n margin-right: 10px;\n flex-shrink: 0;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config .title-config-row .row-form-switch {\n flex: 0;\n min-width: 80px;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 {\n width: 32px;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 32px;\n height: 32px;\n cursor: pointer;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel .svg-box {\n height: 24px;\n width: 24px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgb(247, 248, 250);\n border-radius: 2px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel .svg-box svg {\n font-size: 20px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel .svg-box svg:hover {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 32px;\n height: 32px;\n cursor: pointer;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon svg {\n font-size: 20px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon:hover {\n background: rgb(247, 248, 250);\n border-radius: 4px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon:hover svg {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .hidden-icon {\n display: none;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .center-line {\n width: 1px;\n height: 12px;\n background-color: rgb(212, 218, 227);\n margin: 0 3px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-80 {\n width: 72px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form {\n width: 100%;\n display: flex;\n align-items: flex-start;\n min-height: 42px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .paraui-v4-select {\n overflow: hidden;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .form-item {\n display: flex;\n align-items: flex-start;\n min-width: 180px;\n margin-right: 10px;\n flex-shrink: 0;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .form-item-icon {\n margin-left: 10px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .row-form-switch {\n flex: 0;\n box-sizing: content-box;\n align-items: center;\n height: 32px;\n min-width: 80px;\n}\n.paraui-v4-dynamic-multi-box .add-button {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 32px;\n background: rgb(247, 248, 250);\n border: 1px dashed rgb(212, 218, 227);\n border-radius: 4px;\n}\n.paraui-v4-dynamic-multi-box .add-button .text {\n font-size: 14px;\n margin-left: 10px;\n}\n.paraui-v4-dynamic-multi-box .add-button.add-button-scroll {\n margin-top: 14px;\n}\n.paraui-v4-dynamic-multi-box .add-button.normal-button {\n cursor: pointer;\n}\n.paraui-v4-dynamic-multi-box .add-button.normal-button .text {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-dynamic-multi-box .add-button.normal-button:hover {\n background: rgb(240, 245, 255);\n border: 1px dashed rgb(87, 131, 235);\n}\n.paraui-v4-dynamic-multi-box .add-button.disabled-add {\n cursor: not-allowed;\n}\n.paraui-v4-dynamic-multi-box .add-button.disabled-add .text {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-dynamic-multi-box .add-button.disabled-add svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-dynamic-multi-box .paraui-v4-comboselect,\n.paraui-v4-dynamic-multi-box .paraui-v4-picker-wrapper {\n width: 100%;\n}\n.paraui-v4-dynamic-multi-box .multi-value-switch {\n width: 100%;\n display: flex;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-switch .switch-text {\n color: rgb(161, 168, 179);\n margin-right: 4px;\n overflow: hidden;\n}\n.paraui-v4-dynamic-multi-box .multi-value-switch .switch {\n flex: 1;\n}\n\n.paraui-v4-dynamic-multi-box-popover .filter-config {\n width: 140px;\n padding-top: 4px;\n}\n.paraui-v4-dynamic-multi-box-popover .filter-config .check-list .title {\n font-size: 12px;\n color: rgb(161, 168, 179);\n line-height: 30px;\n padding: 0 10px;\n}\n.paraui-v4-dynamic-multi-box-popover .filter-config .check-list .paraui-v4-checkbox-group {\n max-height: 320px;\n overflow-y: auto;\n}\n.paraui-v4-dynamic-multi-box-popover .filter-config .check-list .paraui-v4-checkbox-group.paraui-v4-checkbox-group-column .checkbox-group-content > span {\n padding: 0 10px;\n margin-bottom: 0;\n line-height: 30px;\n}\n.paraui-v4-dynamic-multi-box-popover .filter-config .restore-default {\n display: flex;\n justify-content: center;\n align-items: center;\n height:
|
|
932
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-dynamic-multi-box {\n width: 100%;\n}\n.paraui-v4-dynamic-multi-box svg {\n overflow: hidden;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content {\n width: 100%;\n position: relative;\n overflow-x: auto;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config {\n width: 100%;\n display: flex;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config .title-config-row {\n display: flex;\n flex: 1;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config .title-config-row .title-config-row-item {\n display: flex;\n align-items: center;\n min-width: 180px;\n margin-right: 10px;\n flex-shrink: 0;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .title-config .title-config-row .row-form-switch {\n flex: 0;\n min-width: 80px;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 {\n width: 32px;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 32px;\n height: 32px;\n cursor: pointer;\n margin-right: 1px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel .svg-box {\n height: 24px;\n width: 24px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgb(247, 248, 250);\n border-radius: 2px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel .svg-box svg {\n font-size: 20px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon-panel .svg-box svg:hover {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 32px;\n height: 32px;\n cursor: pointer;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon svg {\n font-size: 20px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon:hover {\n background: rgb(247, 248, 250);\n border-radius: 4px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .operator-column-icon:hover svg {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .hidden-icon {\n display: none;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-40 .center-line {\n width: 1px;\n height: 12px;\n background-color: rgb(212, 218, 227);\n margin: 0 3px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .operator-column-80 {\n width: 72px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form {\n width: 100%;\n display: flex;\n align-items: flex-start;\n min-height: 42px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .paraui-v4-select {\n overflow: hidden;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .form-item {\n display: flex;\n align-items: flex-start;\n min-width: 180px;\n margin-right: 10px;\n flex-shrink: 0;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .form-item-icon {\n margin-left: 10px;\n}\n.paraui-v4-dynamic-multi-box .multi-value-content .content-row-form .row-form-switch {\n flex: 0;\n box-sizing: content-box;\n align-items: center;\n height: 32px;\n min-width: 80px;\n}\n.paraui-v4-dynamic-multi-box .add-button {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 32px;\n background: rgb(247, 248, 250);\n border: 1px dashed rgb(212, 218, 227);\n border-radius: 4px;\n}\n.paraui-v4-dynamic-multi-box .add-button .text {\n font-size: 14px;\n margin-left: 10px;\n}\n.paraui-v4-dynamic-multi-box .add-button.add-button-scroll {\n margin-top: 14px;\n}\n.paraui-v4-dynamic-multi-box .add-button.normal-button {\n cursor: pointer;\n}\n.paraui-v4-dynamic-multi-box .add-button.normal-button .text {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-dynamic-multi-box .add-button.normal-button:hover {\n background: rgb(240, 245, 255);\n border: 1px dashed rgb(87, 131, 235);\n}\n.paraui-v4-dynamic-multi-box .add-button.disabled-add {\n cursor: not-allowed;\n}\n.paraui-v4-dynamic-multi-box .add-button.disabled-add .text {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-dynamic-multi-box .add-button.disabled-add svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-dynamic-multi-box .paraui-v4-comboselect,\n.paraui-v4-dynamic-multi-box .paraui-v4-picker-wrapper {\n width: 100%;\n}\n.paraui-v4-dynamic-multi-box .multi-value-switch {\n width: 100%;\n display: flex;\n align-items: center;\n}\n.paraui-v4-dynamic-multi-box .multi-value-switch .switch-text {\n color: rgb(161, 168, 179);\n margin-right: 4px;\n overflow: hidden;\n}\n.paraui-v4-dynamic-multi-box .multi-value-switch .switch {\n flex: 1;\n}\n\n.paraui-v4-dynamic-multi-box-popover .filter-config {\n width: 140px;\n padding-top: 4px;\n}\n.paraui-v4-dynamic-multi-box-popover .filter-config .check-list .title {\n font-size: 12px;\n color: rgb(161, 168, 179);\n line-height: 30px;\n padding: 0 10px;\n}\n.paraui-v4-dynamic-multi-box-popover .filter-config .check-list .paraui-v4-checkbox-group {\n max-height: 320px;\n overflow-y: auto;\n}\n.paraui-v4-dynamic-multi-box-popover .filter-config .check-list .paraui-v4-checkbox-group.paraui-v4-checkbox-group-column .checkbox-group-content > span {\n padding: 0 10px;\n margin-bottom: 0;\n line-height: 30px;\n}\n.paraui-v4-dynamic-multi-box-popover .filter-config .restore-default {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 36px;\n color: rgb(46, 101, 230);\n cursor: pointer;\n border-top: 1px solid rgb(247, 248, 250);\n}\n.paraui-v4-dynamic-multi-box-popover .no-other-property {\n width: 200px;\n padding: 16px 0;\n text-align: center;\n font-size: 12px;\n color: rgb(161, 168, 179);\n}";
|
|
930
933
|
styleInject(css_248z);
|
|
931
934
|
|
|
932
935
|
var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
933
|
-
var
|
|
936
|
+
var _props$rowKey = props.rowKey,
|
|
937
|
+
rowKey = _props$rowKey === void 0 ? 'id' : _props$rowKey,
|
|
938
|
+
valueList = props.valueList,
|
|
934
939
|
_props$config = props.config,
|
|
935
940
|
config = _props$config === void 0 ? [] : _props$config,
|
|
936
941
|
_props$errors = props.errors,
|
|
@@ -1140,8 +1145,8 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
|
1140
1145
|
});
|
|
1141
1146
|
};
|
|
1142
1147
|
var popoverHandClass = function popoverHandClass() {
|
|
1143
|
-
var str = $prefixCls
|
|
1144
|
-
if (popoverClassName) str +=
|
|
1148
|
+
var str = "".concat($prefixCls, "-dynamic-multi-box-popover");
|
|
1149
|
+
if (popoverClassName) str += " ".concat(popoverClassName);
|
|
1145
1150
|
return str;
|
|
1146
1151
|
};
|
|
1147
1152
|
/**
|
|
@@ -1161,20 +1166,21 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
|
1161
1166
|
required = item.required,
|
|
1162
1167
|
className = item.className,
|
|
1163
1168
|
inputType = item.inputType,
|
|
1164
|
-
style = item.style
|
|
1169
|
+
style = item.style,
|
|
1170
|
+
labelProps = item.labelProps;
|
|
1165
1171
|
var str = 'title-config-row-item';
|
|
1166
1172
|
if (inputType === 'Switch') str += ' row-form-switch';
|
|
1167
|
-
if (className) str +=
|
|
1173
|
+
if (className) str += " ".concat(className);
|
|
1168
1174
|
var styleCom = Object.assign({}, style);
|
|
1169
1175
|
if (!(style === null || style === void 0 ? void 0 : style.width) && !(style === null || style === void 0 ? void 0 : style.flex)) styleCom.flex = 1;
|
|
1170
1176
|
return jsx("div", Object.assign({
|
|
1171
1177
|
className: str,
|
|
1172
1178
|
style: styleCom
|
|
1173
1179
|
}, {
|
|
1174
|
-
children: jsx(Label, {
|
|
1180
|
+
children: jsx(Label, Object.assign({
|
|
1175
1181
|
required: required,
|
|
1176
1182
|
label: label
|
|
1177
|
-
})
|
|
1183
|
+
}, labelProps))
|
|
1178
1184
|
}), index);
|
|
1179
1185
|
})
|
|
1180
1186
|
})) : titleMode === 'single' ? jsx(Label, {
|
|
@@ -1206,7 +1212,7 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
|
1206
1212
|
}))]
|
|
1207
1213
|
}))]
|
|
1208
1214
|
}));
|
|
1209
|
-
}, [titleMode, fixedConfig, selectedConfig, isSort, isFilter, checked, onCheckChange, onRestoreDefault]);
|
|
1215
|
+
}, [titleMode, fixedConfig, selectedConfig, isSort, isFilter, checked, onCheckChange, onRestoreDefault, rowKey]);
|
|
1210
1216
|
/**
|
|
1211
1217
|
* 判断是否全部隐藏删除
|
|
1212
1218
|
* 默认全部隐藏
|
|
@@ -1218,7 +1224,7 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
|
1218
1224
|
return false;
|
|
1219
1225
|
}
|
|
1220
1226
|
for (var i = 0, l = valueList === null || valueList === void 0 ? void 0 : valueList.length; i < l; i++) {
|
|
1221
|
-
var id = (_a = valueList[i]) === null || _a === void 0 ? void 0 : _a
|
|
1227
|
+
var id = (_a = valueList[i]) === null || _a === void 0 ? void 0 : _a[rowKey];
|
|
1222
1228
|
if (id && deleteDisable.indexOf(id) === -1) {
|
|
1223
1229
|
bol = false;
|
|
1224
1230
|
break;
|
|
@@ -1237,9 +1243,9 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
|
1237
1243
|
return jsx(Fragment, {
|
|
1238
1244
|
children: valueList.map(function (item, rowIndex) {
|
|
1239
1245
|
var _a;
|
|
1240
|
-
var id = item
|
|
1246
|
+
var id = item[rowKey];
|
|
1241
1247
|
var rowError = (_a = errors === null || errors === void 0 ? void 0 : errors.filter(function (item) {
|
|
1242
|
-
return item
|
|
1248
|
+
return item[rowKey] === id;
|
|
1243
1249
|
})) === null || _a === void 0 ? void 0 : _a[0];
|
|
1244
1250
|
return jsxs("div", Object.assign({
|
|
1245
1251
|
className: 'content-row-form'
|
|
@@ -1280,7 +1286,7 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
|
1280
1286
|
})
|
|
1281
1287
|
});
|
|
1282
1288
|
}
|
|
1283
|
-
}, [valueList, isSort, isFilter, errors, fixedConfig, selectedConfig, keepLastItem, deleteRender]);
|
|
1289
|
+
}, [valueList, isSort, isFilter, errors, fixedConfig, selectedConfig, keepLastItem, deleteRender, rowKey]);
|
|
1284
1290
|
/**
|
|
1285
1291
|
* @desc 删除事件
|
|
1286
1292
|
* */
|
|
@@ -1321,12 +1327,8 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
|
1321
1327
|
var id = UUID();
|
|
1322
1328
|
// 取出已经筛选的配置数据
|
|
1323
1329
|
var configArr = [].concat(_toConsumableArray(fixedConfig), _toConsumableArray(selectedConfig));
|
|
1324
|
-
valueArr.push(Object.assign(Object.assign({}, getNewItem(configArr, 'value')), {
|
|
1325
|
-
|
|
1326
|
-
}));
|
|
1327
|
-
errorArr.push(Object.assign(Object.assign({}, getNewItem(configArr, 'error')), {
|
|
1328
|
-
id: id
|
|
1329
|
-
}));
|
|
1330
|
+
valueArr.push(Object.assign(Object.assign({}, getNewItem(configArr, 'value')), _defineProperty({}, rowKey, id)));
|
|
1331
|
+
errorArr.push(Object.assign(Object.assign({}, getNewItem(configArr, 'error')), _defineProperty({}, rowKey, id)));
|
|
1330
1332
|
onAdd && onAdd(valueArr, errorArr);
|
|
1331
1333
|
};
|
|
1332
1334
|
/**
|
|
@@ -1346,12 +1348,12 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
|
1346
1348
|
var onDragSort = function onDragSort(newValueList) {
|
|
1347
1349
|
// 获取排序后 id映射下标集合
|
|
1348
1350
|
var idMapIndex = newValueList.reduce(function (acc, cur, index) {
|
|
1349
|
-
return Object.assign(Object.assign({}, acc), _defineProperty({}, cur
|
|
1351
|
+
return Object.assign(Object.assign({}, acc), _defineProperty({}, cur[rowKey], index));
|
|
1350
1352
|
}, {});
|
|
1351
1353
|
// 需要交换的下标集合
|
|
1352
1354
|
var swapIds = [];
|
|
1353
1355
|
valueList.forEach(function (item, idx) {
|
|
1354
|
-
if (idx !== idMapIndex[item
|
|
1356
|
+
if (idx !== idMapIndex[item[rowKey]]) swapIds.push(idx);
|
|
1355
1357
|
});
|
|
1356
1358
|
onSort && onSort(newValueList, swapIds);
|
|
1357
1359
|
};
|
|
@@ -1369,8 +1371,8 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
|
1369
1371
|
* @desc 处理className
|
|
1370
1372
|
* */
|
|
1371
1373
|
var handClass = function handClass() {
|
|
1372
|
-
var str = $prefixCls
|
|
1373
|
-
if (className) str +=
|
|
1374
|
+
var str = "".concat($prefixCls, "-dynamic-multi-box");
|
|
1375
|
+
if (className) str += " ".concat(className);
|
|
1374
1376
|
return str;
|
|
1375
1377
|
};
|
|
1376
1378
|
return jsxs("div", Object.assign({
|
|
@@ -1380,14 +1382,15 @@ var DynamicMultiBox = function DynamicMultiBox(props) {
|
|
|
1380
1382
|
children: [jsxs("div", Object.assign({
|
|
1381
1383
|
className: "multi-value-content"
|
|
1382
1384
|
}, {
|
|
1383
|
-
children: [renderTitle, jsx(dist.exports.ReactSortable, Object.assign({
|
|
1385
|
+
children: [renderTitle, isSort ? jsx(dist.exports.ReactSortable, Object.assign({
|
|
1386
|
+
id: rowKey,
|
|
1384
1387
|
list: valueList,
|
|
1385
1388
|
handle: '.sort-handler',
|
|
1386
1389
|
animation: 150,
|
|
1387
1390
|
setList: onDragSort
|
|
1388
1391
|
}, {
|
|
1389
1392
|
children: renderContent
|
|
1390
|
-
}))]
|
|
1393
|
+
})) : renderContent]
|
|
1391
1394
|
})), jsxs("div", Object.assign({
|
|
1392
1395
|
className: "add-button ".concat(disabledAdd ? 'disabled-add' : 'normal-button'),
|
|
1393
1396
|
onClick: onAddEvent
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* @date 2022/11/7 10:32 AM
|
|
4
4
|
* @description 多值框组件接口定义
|
|
5
5
|
*/
|
|
6
|
-
import { ReactNode } from
|
|
7
|
-
import { TextFieldProps, SelectProps, SwitchProps, InputNumberProps, InputLangProps, ComboSelectProps, DatePickerProps } from
|
|
6
|
+
import { ReactNode } from 'react';
|
|
7
|
+
import { TextFieldProps, SelectProps, SwitchProps, InputNumberProps, InputLangProps, ComboSelectProps, DatePickerProps } from '@para-ui/core';
|
|
8
|
+
import { LabelProps } from "../Label";
|
|
8
9
|
/**组件类型:输入框,下拉框,开关,数字输入框,国际化输入框,日期框,时间选择框,组合选择器,自定义组件*/
|
|
9
10
|
export type IInputType = 'TextField' | 'Select' | 'Switch' | 'InputNumber' | 'InputLang' | 'ComboSelect' | 'DatePicker' | 'custom';
|
|
10
11
|
/** 配置项*/
|
|
@@ -27,31 +28,28 @@ export type IConfig = {
|
|
|
27
28
|
list?: ((rowIndex: number, id: string, name: string, valueList: IValueList[]) => any[]) | any[];
|
|
28
29
|
/** 样式 */
|
|
29
30
|
style?: React.CSSProperties;
|
|
31
|
+
/** 标题样式 */
|
|
32
|
+
labelProps?: LabelProps;
|
|
30
33
|
/** 其他*/
|
|
31
34
|
[name: string]: any;
|
|
32
35
|
} & (TextFieldProps | SelectProps | SwitchProps | InputNumberProps | InputLangProps | ComboSelectProps | DatePickerProps);
|
|
33
36
|
/** value集合*/
|
|
34
37
|
export interface IValueList {
|
|
35
|
-
/** id*/
|
|
36
|
-
id: string;
|
|
37
38
|
/** 每行value值集合, name映射configItem中的name*/
|
|
38
39
|
[name: string]: any;
|
|
39
40
|
}
|
|
40
41
|
export interface IErrors {
|
|
41
|
-
/** id*/
|
|
42
|
-
id: string;
|
|
43
42
|
/** 每行错误集合,name映射configItem中的name*/
|
|
44
43
|
[name: string]: any;
|
|
45
44
|
}
|
|
46
45
|
export interface ICurrentItem {
|
|
47
46
|
/** 表单名*/
|
|
48
47
|
name?: string;
|
|
49
|
-
/** 表单所处行id*/
|
|
50
|
-
id: string;
|
|
51
48
|
/** 表单值*/
|
|
52
49
|
value?: any;
|
|
53
50
|
/** 表单所处下标*/
|
|
54
51
|
rowIndex?: number;
|
|
52
|
+
[name: string]: any;
|
|
55
53
|
}
|
|
56
54
|
/** 过滤回调出参*/
|
|
57
55
|
export interface IFilterParams {
|
|
@@ -66,6 +64,8 @@ export interface IFilterParams {
|
|
|
66
64
|
}
|
|
67
65
|
/** 主体接口定义*/
|
|
68
66
|
export interface IMultiValueProps {
|
|
67
|
+
/** 指定每行key */
|
|
68
|
+
rowKey?: string;
|
|
69
69
|
/**
|
|
70
70
|
* 组件配置项
|
|
71
71
|
*/
|