fan-standard-comp 3.2.0 → 3.2.2
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 +1 -33
- package/dist/09cd8e9be7081f2166444cce393fe968.svg +54 -0
- package/dist/e3378c145b7db195ad068735e15fb28a.svg +165 -0
- package/dist/fan-standard-comp.umd.js +166 -444
- package/dist/fonts/iconfont.ttf +0 -0
- package/dist/fonts/iconfont.woff +0 -0
- package/dist/fonts/lg.ttf +0 -0
- package/dist/fonts/lg.woff +0 -0
- package/dist/fonts/lg.woff2 +0 -0
- package/es/ButtonGroup/ButtonList.d.ts +2 -1
- package/es/ButtonGroup/ButtonMenu.d.ts +2 -1
- package/es/ButtonGroup/PopConfirmTitle.js +5 -5
- package/es/ButtonGroup/index.d.ts +3 -1
- package/es/ButtonGroup/index.js +147 -178
- package/es/ButtonGroup/style/index.less +4 -1
- package/es/CalendarCoordPicker/CalendarMonthPicker.d.ts +5 -0
- package/es/CalendarCoordPicker/CalendarMonthPicker.js +26 -0
- package/es/CalendarCoordPicker/index.d.ts +8 -0
- package/es/CalendarCoordPicker/index.js +296 -0
- package/es/CalendarCoordPicker/index.less +31 -0
- package/es/ConfigContext/index.d.ts +7 -0
- package/es/ConfigContext/index.js +12 -0
- package/es/DragContent/index.d.ts +1 -1
- package/es/DragContent/index.js +5 -5
- package/es/FormComp/ChunkUploader/api.js +14 -14
- package/es/FormComp/ChunkUploader/index.js +132 -139
- package/es/FormComp/ChunkUploader/lib.js +21 -21
- package/es/FormComp/ChunkUploader/upload-queue.class.js +64 -66
- package/es/FormComp/EditButton/index.d.ts +1 -1
- package/es/FormComp/EditButton/index.js +15 -17
- package/es/FormComp/FieldComponent/ReUpload.d.ts +1 -1
- package/es/FormComp/FieldComponent/ReUpload.js +37 -23
- package/es/FormComp/FieldComponent/RefactorTextarea.js +32 -0
- package/es/FormComp/FieldComponent/RefactorTreeSelect.js +72 -19
- package/es/FormComp/FieldComponent/TitleNode.d.ts +2 -1
- package/es/FormComp/FieldComponent/index.d.ts +1 -1
- package/es/FormComp/FieldComponent/index.js +33 -23
- package/es/FormComp/FieldComponent/setReadonlyValues.js +6 -6
- package/es/FormComp/RenderItemGroup/index.js +24 -8
- package/es/FormComp/Uploader/index.d.ts +3 -1
- package/es/FormComp/Uploader/index.js +243 -119
- package/es/FormComp/VarTemplate/index.js +57 -64
- package/es/ImageGallery/ImagePreview.d.ts +13 -0
- package/es/ImageGallery/ImagePreview.js +168 -0
- package/es/ImageGallery/PreviewStyles/ImagePreview.less +730 -0
- package/es/ImageGallery/PreviewStyles/fonts/lg.svg +54 -0
- package/es/ImageGallery/PreviewStyles/fonts/lg.ttf +0 -0
- package/es/ImageGallery/PreviewStyles/fonts/lg.woff +0 -0
- package/es/ImageGallery/PreviewStyles/fonts/lg.woff2 +0 -0
- package/es/ImageGallery/PreviewStyles/lg-thumbnail.css +108 -0
- package/es/ImageGallery/PreviewStyles/lg-video.css +144 -0
- package/es/ImageGallery/PreviewStyles/lg-zoom.css +116 -0
- package/es/ImageGallery/PreviewStyles/lightgallery.css +728 -0
- package/es/ImageGallery/SliderContent.d.ts +7 -0
- package/es/ImageGallery/SliderContent.js +699 -0
- package/es/ImageGallery/Thumbnail.d.ts +3 -0
- package/es/ImageGallery/Thumbnail.js +296 -0
- package/es/ImageGallery/hook/uniqueId.d.ts +1 -0
- package/es/ImageGallery/hook/uniqueId.js +10 -0
- package/es/ImageGallery/index.d.ts +4 -0
- package/es/ImageGallery/index.js +29 -0
- package/es/ImageGallery/style/index.less +5 -0
- package/es/ImageGallery/types.d.ts +5 -0
- package/es/ImageGallery/types.js +1 -0
- package/es/NavLeafScroll/index.js +94 -50
- package/es/RefactorTree/index.d.ts +1 -1
- package/es/RefactorTree/index.js +6 -6
- package/es/RefactorTree/indexTreeNode.d.ts +1 -1
- package/es/RefactorTree/indexTreeNode.js +19 -17
- package/es/RefactorTree/util.js +18 -18
- package/es/SpecIcon/fonts/demo_index.html +559 -5
- package/es/SpecIcon/fonts/iconfont.css +101 -3
- package/es/SpecIcon/fonts/iconfont.js +34 -27
- package/es/SpecIcon/fonts/iconfont.json +168 -0
- package/es/SpecIcon/fonts/iconfont.svg +163 -171
- package/es/SpecIcon/fonts/iconfont.ttf +0 -0
- package/es/SpecIcon/fonts/iconfont.woff +0 -0
- package/es/SpecIcon/fonts/iconfont.woff2 +0 -0
- package/es/SpecIcon/style/iconfont.less +106 -11
- package/es/SplitterLayout/Pane.d.ts +1 -1
- package/es/SplitterLayout/index.js +25 -26
- package/es/StandardContent/SplitterLayout/Pane.js +3 -3
- package/es/StandardContent/SplitterLayout/index.js +25 -26
- package/es/StandardContent/SubfieldContent.d.ts +1 -1
- package/es/StandardContent/WrapperContent.d.ts +1 -1
- package/es/StandardDragModal/index.d.ts +11 -3
- package/es/StandardDragModal/index.js +25 -3
- package/es/StandardFilter/index.d.ts +5 -16
- package/es/StandardFilter/index.js +212 -200
- package/es/StandardFilter/indexClass.d.ts +37 -0
- package/es/StandardFilter/indexClass.js +217 -0
- package/es/StandardFilter/style/index.less +82 -9
- package/es/StandardForm/StepForm.d.ts +1 -1
- package/es/StandardForm/StepForm.js +28 -22
- package/es/StandardForm/TabForm.d.ts +1 -1
- package/es/StandardForm/TabForm.js +41 -43
- package/es/StandardForm/index.d.ts +1 -1
- package/es/StandardForm/index.js +5 -5
- package/es/StandardModal/UpdateFormRef.js +0 -1
- package/es/StandardModal/index.d.ts +2 -1
- package/es/StandardModal/index.js +25 -39
- package/es/StandardPanel/index.d.ts +1 -1
- package/es/StandardPanel/index.js +7 -7
- package/es/StandardTable/index.d.ts +1 -0
- package/es/StandardTable/index.js +44 -26
- package/es/components/IconNode/index.d.ts +1 -1
- package/es/components/IconNode/index.js +0 -1
- package/es/data/general.config.js +31 -0
- package/es/index.d.ts +3 -1
- package/es/index.js +6 -2
- package/es/utils/filterPermission.js +7 -10
- package/es/utils/getParentNodes.js +101 -26
- package/es/utils/index.js +2 -3
- package/es/utils/urlUtils.js +76 -0
- package/lib/ButtonGroup/ButtonList.d.ts +2 -1
- package/lib/ButtonGroup/ButtonList.js +2 -3
- package/lib/ButtonGroup/ButtonMenu.d.ts +2 -1
- package/lib/ButtonGroup/ButtonMenu.js +2 -3
- package/lib/ButtonGroup/PopConfirmTitle.js +7 -8
- package/lib/ButtonGroup/index.d.ts +3 -1
- package/lib/ButtonGroup/index.js +151 -183
- package/lib/ButtonGroup/style/index.less +4 -1
- package/lib/CalendarCoordPicker/CalendarMonthPicker.d.ts +5 -0
- package/lib/CalendarCoordPicker/CalendarMonthPicker.js +36 -0
- package/lib/CalendarCoordPicker/index.d.ts +8 -0
- package/lib/CalendarCoordPicker/index.js +305 -0
- package/lib/CalendarCoordPicker/index.less +31 -0
- package/lib/ConfigContext/index.d.ts +7 -0
- package/lib/ConfigContext/index.js +17 -0
- package/lib/DragContent/DragBar.js +2 -3
- package/lib/DragContent/index.d.ts +1 -1
- package/lib/DragContent/index.js +9 -10
- package/lib/FormComp/ChunkUploader/api.js +15 -15
- package/lib/FormComp/ChunkUploader/index.js +135 -142
- package/lib/FormComp/ChunkUploader/lib.js +22 -22
- package/lib/FormComp/ChunkUploader/upload-queue.class.js +66 -69
- package/lib/FormComp/ChunkUploader/worker.js +1 -1
- package/lib/FormComp/EditButton/index.d.ts +1 -1
- package/lib/FormComp/EditButton/index.js +19 -22
- package/lib/FormComp/FieldComponent/ReUpload.d.ts +1 -1
- package/lib/FormComp/FieldComponent/ReUpload.js +40 -28
- package/lib/FormComp/FieldComponent/RefactorTextarea.js +42 -0
- package/lib/FormComp/FieldComponent/RefactorTreeSelect.js +75 -23
- package/lib/FormComp/FieldComponent/TitleNode.d.ts +2 -1
- package/lib/FormComp/FieldComponent/TitleNode.js +2 -3
- package/lib/FormComp/FieldComponent/index.d.ts +1 -1
- package/lib/FormComp/FieldComponent/index.js +38 -26
- package/lib/FormComp/FieldComponent/setReadonlyValues.js +15 -20
- package/lib/FormComp/RenderItemGroup/index.js +26 -11
- package/lib/FormComp/Uploader/index.d.ts +3 -1
- package/lib/FormComp/Uploader/index.js +244 -123
- package/lib/FormComp/VarTemplate/index.js +63 -71
- package/lib/FormComp/index.js +1 -1
- package/lib/ImageGallery/ImagePreview.d.ts +13 -0
- package/lib/ImageGallery/ImagePreview.js +178 -0
- package/lib/ImageGallery/PreviewStyles/ImagePreview.less +730 -0
- package/lib/ImageGallery/PreviewStyles/fonts/lg.svg +54 -0
- package/lib/ImageGallery/PreviewStyles/fonts/lg.ttf +0 -0
- package/lib/ImageGallery/PreviewStyles/fonts/lg.woff +0 -0
- package/lib/ImageGallery/PreviewStyles/fonts/lg.woff2 +0 -0
- package/lib/ImageGallery/PreviewStyles/lg-thumbnail.css +108 -0
- package/lib/ImageGallery/PreviewStyles/lg-video.css +144 -0
- package/lib/ImageGallery/PreviewStyles/lg-zoom.css +116 -0
- package/lib/ImageGallery/PreviewStyles/lightgallery.css +728 -0
- package/lib/ImageGallery/SliderContent.d.ts +7 -0
- package/lib/ImageGallery/SliderContent.js +708 -0
- package/lib/ImageGallery/Thumbnail.d.ts +3 -0
- package/lib/ImageGallery/Thumbnail.js +306 -0
- package/lib/ImageGallery/hook/uniqueId.d.ts +1 -0
- package/lib/ImageGallery/hook/uniqueId.js +17 -0
- package/lib/ImageGallery/index.d.ts +4 -0
- package/lib/ImageGallery/index.js +36 -0
- package/lib/ImageGallery/style/index.less +5 -0
- package/lib/ImageGallery/types.d.ts +5 -0
- package/lib/ImageGallery/types.js +5 -0
- package/lib/NavLeafScroll/index.js +98 -55
- package/lib/RefactorTree/index.d.ts +1 -1
- package/lib/RefactorTree/index.js +10 -11
- package/lib/RefactorTree/indexTreeNode.d.ts +1 -1
- package/lib/RefactorTree/indexTreeNode.js +23 -22
- package/lib/RefactorTree/util.js +18 -18
- package/lib/SpecIcon/fonts/demo_index.html +559 -5
- package/lib/SpecIcon/fonts/iconfont.css +101 -3
- package/lib/SpecIcon/fonts/iconfont.js +34 -27
- package/lib/SpecIcon/fonts/iconfont.json +168 -0
- package/lib/SpecIcon/fonts/iconfont.svg +163 -171
- package/lib/SpecIcon/fonts/iconfont.ttf +0 -0
- package/lib/SpecIcon/fonts/iconfont.woff +0 -0
- package/lib/SpecIcon/fonts/iconfont.woff2 +0 -0
- package/lib/SpecIcon/index.js +2 -3
- package/lib/SpecIcon/style/iconfont.less +106 -11
- package/lib/SplitterLayout/Pane.d.ts +1 -1
- package/lib/SplitterLayout/Pane.js +2 -3
- package/lib/SplitterLayout/index.js +27 -29
- package/lib/StandardContent/SplitterLayout/Pane.js +5 -6
- package/lib/StandardContent/SplitterLayout/index.js +27 -29
- package/lib/StandardContent/SubfieldContent.d.ts +1 -1
- package/lib/StandardContent/SubfieldContent.js +2 -3
- package/lib/StandardContent/WrapperContent.d.ts +1 -1
- package/lib/StandardContent/WrapperContent.js +2 -3
- package/lib/StandardDragModal/index.d.ts +11 -3
- package/lib/StandardDragModal/index.js +27 -33
- package/lib/StandardFilter/index.d.ts +5 -16
- package/lib/StandardFilter/index.js +215 -201
- package/lib/StandardFilter/indexClass.d.ts +37 -0
- package/lib/StandardFilter/indexClass.js +223 -0
- package/lib/StandardFilter/style/index.less +82 -9
- package/lib/StandardForm/ActionList.js +2 -3
- package/lib/StandardForm/StepForm.d.ts +1 -1
- package/lib/StandardForm/StepForm.js +32 -27
- package/lib/StandardForm/TabForm.d.ts +1 -1
- package/lib/StandardForm/TabForm.js +45 -48
- package/lib/StandardForm/index.d.ts +1 -1
- package/lib/StandardForm/index.js +9 -10
- package/lib/StandardModal/UpdateFormRef.js +3 -4
- package/lib/StandardModal/index.d.ts +2 -1
- package/lib/StandardModal/index.js +29 -43
- package/lib/StandardPanel/index.d.ts +1 -1
- package/lib/StandardPanel/index.js +11 -12
- package/lib/StandardTable/index.d.ts +1 -0
- package/lib/StandardTable/index.js +49 -29
- package/lib/components/IconNode/index.d.ts +1 -1
- package/lib/components/IconNode/index.js +2 -4
- package/lib/components/index.js +1 -1
- package/lib/data/func.code.js +2 -3
- package/lib/data/general.config.js +33 -3
- package/lib/data/index.js +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.js +30 -10
- package/lib/utils/ValueFormat.js +1 -2
- package/lib/utils/filterPermission.js +11 -18
- package/lib/utils/getParentNodes.js +103 -29
- package/lib/utils/index.js +5 -27
- package/lib/utils/urlUtils.js +82 -0
- package/package.json +14 -9
- package/dist/f26952c118ab6cdcd23dc0028ee98c11.svg +0 -173
- package/dist/fonts/iconfont.eot +0 -0
- package/es/StandardDragModal/ChangeStandardModal.d.ts +0 -44
- package/es/StandardDragModal/ChangeStandardModal.js +0 -493
- package/es/StandardDragModal/DraggableModal.d.ts +0 -7
- package/es/StandardDragModal/DraggableModal.js +0 -31
- package/es/StandardDragModal/DraggableModalContext.d.ts +0 -9
- package/es/StandardDragModal/DraggableModalContext.js +0 -5
- package/es/StandardDragModal/DraggableModalInner.d.ts +0 -16
- package/es/StandardDragModal/DraggableModalInner.js +0 -114
- package/es/StandardDragModal/DraggableModalProvider.d.ts +0 -4
- package/es/StandardDragModal/DraggableModalProvider.js +0 -40
- package/es/StandardDragModal/Modal.d.ts +0 -11
- package/es/StandardDragModal/Modal.js +0 -24
- package/es/StandardDragModal/ResizeHandle.d.ts +0 -2
- package/es/StandardDragModal/ResizeHandle.js +0 -8
- package/es/StandardDragModal/clamp.d.ts +0 -1
- package/es/StandardDragModal/clamp.js +0 -3
- package/es/StandardDragModal/draggableModalReducer.d.ts +0 -66
- package/es/StandardDragModal/draggableModalReducer.js +0 -157
- package/es/StandardDragModal/getWindowSize.d.ts +0 -4
- package/es/StandardDragModal/getWindowSize.js +0 -6
- package/es/StandardDragModal/index.less +0 -65
- package/es/StandardDragModal/useDrag.d.ts +0 -5
- package/es/StandardDragModal/useDrag.js +0 -66
- package/es/StandardDragModal/usePrevious.d.ts +0 -1
- package/es/StandardDragModal/usePrevious.js +0 -8
- package/es/StandardDragModal/useResize.d.ts +0 -7
- package/es/StandardDragModal/useResize.js +0 -74
- package/es/utils/dictSelectUtil.js +0 -153
- package/lib/StandardDragModal/ChangeStandardModal.d.ts +0 -44
- package/lib/StandardDragModal/ChangeStandardModal.js +0 -502
- package/lib/StandardDragModal/DraggableModal.d.ts +0 -7
- package/lib/StandardDragModal/DraggableModal.js +0 -40
- package/lib/StandardDragModal/DraggableModalContext.d.ts +0 -9
- package/lib/StandardDragModal/DraggableModalContext.js +0 -15
- package/lib/StandardDragModal/DraggableModalInner.d.ts +0 -16
- package/lib/StandardDragModal/DraggableModalInner.js +0 -124
- package/lib/StandardDragModal/DraggableModalProvider.d.ts +0 -4
- package/lib/StandardDragModal/DraggableModalProvider.js +0 -48
- package/lib/StandardDragModal/Modal.d.ts +0 -11
- package/lib/StandardDragModal/Modal.js +0 -32
- package/lib/StandardDragModal/ResizeHandle.d.ts +0 -2
- package/lib/StandardDragModal/ResizeHandle.js +0 -18
- package/lib/StandardDragModal/clamp.d.ts +0 -1
- package/lib/StandardDragModal/clamp.js +0 -10
- package/lib/StandardDragModal/draggableModalReducer.d.ts +0 -66
- package/lib/StandardDragModal/draggableModalReducer.js +0 -167
- package/lib/StandardDragModal/getWindowSize.d.ts +0 -4
- package/lib/StandardDragModal/getWindowSize.js +0 -13
- package/lib/StandardDragModal/index.less +0 -65
- package/lib/StandardDragModal/useDrag.d.ts +0 -5
- package/lib/StandardDragModal/useDrag.js +0 -73
- package/lib/StandardDragModal/usePrevious.d.ts +0 -1
- package/lib/StandardDragModal/usePrevious.js +0 -15
- package/lib/StandardDragModal/useResize.d.ts +0 -7
- package/lib/StandardDragModal/useResize.js +0 -81
- package/lib/utils/dictSelectUtil.js +0 -161
package/dist/fonts/iconfont.ttf
CHANGED
|
Binary file
|
package/dist/fonts/iconfont.woff
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _toConsumableArray(
|
|
1
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
2
2
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _unsupportedIterableToArray(
|
|
4
|
-
function _iterableToArray(
|
|
5
|
-
function _arrayWithoutHoles(
|
|
6
|
-
function _arrayLikeToArray(
|
|
3
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
5
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
6
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
7
7
|
import React from "react";
|
|
8
8
|
// 气泡确认框标题配置
|
|
9
9
|
var PopConfirmTitle = function PopConfirmTitle(propsData) {
|
|
@@ -27,6 +27,8 @@ interface ButtonGroupProps {
|
|
|
27
27
|
options?: ButtonGroupOptionsProps[];
|
|
28
28
|
min?: number;
|
|
29
29
|
dropdownConfig?: Object;
|
|
30
|
+
moreText?: string;
|
|
31
|
+
moreIcon?: React.ReactNode | string | number;
|
|
30
32
|
}
|
|
31
|
-
declare const ButtonGroup: (props: ButtonGroupProps) => JSX.Element;
|
|
33
|
+
declare const ButtonGroup: (props: ButtonGroupProps) => React.JSX.Element;
|
|
32
34
|
export default ButtonGroup;
|
package/es/ButtonGroup/index.js
CHANGED
|
@@ -4,16 +4,18 @@ import "antd/es/button/style";
|
|
|
4
4
|
import _Button from "antd/es/button";
|
|
5
5
|
import "antd/es/dropdown/style";
|
|
6
6
|
import _Dropdown from "antd/es/dropdown";
|
|
7
|
-
|
|
7
|
+
import "antd/es/menu/style";
|
|
8
|
+
import _Menu from "antd/es/menu";
|
|
9
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
8
10
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
-
function _iterableToArray(
|
|
10
|
-
function _arrayWithoutHoles(
|
|
11
|
-
function _slicedToArray(
|
|
11
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
12
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
13
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
12
14
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
-
function _unsupportedIterableToArray(
|
|
14
|
-
function _arrayLikeToArray(
|
|
15
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0)
|
|
16
|
-
function _arrayWithHoles(
|
|
15
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
16
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
17
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
18
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
17
19
|
import { __rest } from "tslib";
|
|
18
20
|
import React, { useState, useEffect } from "react";
|
|
19
21
|
import { IconNode } from "../components/index";
|
|
@@ -21,7 +23,8 @@ import SpecIcon from "../SpecIcon/index";
|
|
|
21
23
|
import PopConfirmTitle from './PopConfirmTitle';
|
|
22
24
|
import { funcCode } from "../data/index";
|
|
23
25
|
import { DownOutlined, QuestionCircleOutlined } from "@ant-design/icons";
|
|
24
|
-
import { removeNoPermission, btnIsDisabled } from '../utils/filterPermission';
|
|
26
|
+
import { removeNoPermission, btnIsDisabled } from '../utils/filterPermission.js';
|
|
27
|
+
import _ from 'lodash';
|
|
25
28
|
import './style/index.less';
|
|
26
29
|
var ButtonGroup = function ButtonGroup(props) {
|
|
27
30
|
var _props$type = props.type,
|
|
@@ -32,16 +35,17 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
32
35
|
record: undefined,
|
|
33
36
|
rowIndex: undefined
|
|
34
37
|
} : _props$rowParams,
|
|
35
|
-
|
|
36
|
-
codes = _props$codes === void 0 ? funcCode.btnFuncCodes : _props$codes,
|
|
38
|
+
codes = props.codes,
|
|
37
39
|
permissionCodes = props.permissionCodes,
|
|
38
40
|
_props$dropdownConfig = props.dropdownConfig,
|
|
39
|
-
dropdownConfig = _props$dropdownConfig === void 0 ? {} : _props$dropdownConfig
|
|
41
|
+
dropdownConfig = _props$dropdownConfig === void 0 ? {} : _props$dropdownConfig,
|
|
42
|
+
_props$moreText = props.moreText,
|
|
43
|
+
moreText = _props$moreText === void 0 ? '更多' : _props$moreText,
|
|
44
|
+
moreIcon = props.moreIcon;
|
|
40
45
|
var _props$options = props.options,
|
|
41
46
|
options = _props$options === void 0 ? [] : _props$options,
|
|
42
47
|
_props$min = props.min,
|
|
43
48
|
min = _props$min === void 0 ? 3 : _props$min; // 最小展示长度不能小于2
|
|
44
|
-
var moreText = '更多';
|
|
45
49
|
if (!options) return null; // 没有配置list返回null
|
|
46
50
|
var _useState = useState(-1),
|
|
47
51
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -56,8 +60,11 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
56
60
|
resetList = _useState6[0],
|
|
57
61
|
setResetList = _useState6[1];
|
|
58
62
|
useEffect(function () {
|
|
63
|
+
// codes在方法内,再合并默认的权限配置
|
|
64
|
+
// 合并本地的codes
|
|
65
|
+
var codesConcat = _.unionBy(codes || [], funcCode.btnFuncCodes, 'code');
|
|
59
66
|
// 重组选项options集合数据,排除:无权限(有配置code,并且不包含permissionCodes内)的数据及,isHide 为true的数据
|
|
60
|
-
setResetList(_toConsumableArray(removeNoPermission(options, permissionCodes,
|
|
67
|
+
setResetList(_toConsumableArray(removeNoPermission(options, permissionCodes, codesConcat, rowParams)) || []);
|
|
61
68
|
return function () {
|
|
62
69
|
setResetList([]);
|
|
63
70
|
};
|
|
@@ -65,111 +72,35 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
65
72
|
useEffect(function () {
|
|
66
73
|
setPopVisibleIndex(-1);
|
|
67
74
|
}, [rowParams]);
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
};
|
|
98
|
-
// 渲染文本形式多级菜单列表(用于表格)
|
|
99
|
-
const textMenu = (group: any[]) => {
|
|
100
|
-
return (
|
|
101
|
-
<Menu className="spec-button-text-dropdown">
|
|
102
|
-
{
|
|
103
|
-
group.map((gItem: any, gIndex: number) => {
|
|
104
|
-
|
|
105
|
-
if (gItem.children) {
|
|
106
|
-
return <Menu.SubMenu title={gItem.exName || gItem.name} key={gItem}>
|
|
107
|
-
{
|
|
108
|
-
gItem.children.map((child: any, childIndex: number) => <Menu.Item key={childIndex}>
|
|
109
|
-
<a onClick={child.fn ? () => child.fn(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : null}>
|
|
110
|
-
{child.render ? child.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (child.exName || child.name)}
|
|
111
|
-
</a>
|
|
112
|
-
</Menu.Item>)
|
|
113
|
-
}
|
|
114
|
-
</Menu.SubMenu>
|
|
115
|
-
}
|
|
116
|
-
return <Menu.Item key={gIndex}
|
|
117
|
-
disabled={btnIsDisabled(gItem.disabled, rowParams)}>
|
|
118
|
-
{
|
|
119
|
-
gItem.hasOwnProperty('confirmText') || gItem.hasOwnProperty('confirmConfig') ?
|
|
120
|
-
// @ts-ignore
|
|
121
|
-
<a disabled={btnIsDisabled(gItem.disabled, rowParams)}
|
|
122
|
-
onClick={gItem.fn ? () => {
|
|
123
|
-
setPopVisibleIndex(rowParams.rowIndex)
|
|
124
|
-
setPopRow(gItem)
|
|
125
|
-
} : null}>
|
|
126
|
-
{gItem.render ? gItem.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (gItem.exName || gItem.name)}
|
|
127
|
-
</a>
|
|
128
|
-
: <a className="spec-button-group-text"
|
|
129
|
-
onClick={gItem.fn ? () => gItem.fn(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : null}
|
|
130
|
-
// @ts-ignore
|
|
131
|
-
disabled={btnIsDisabled(gItem.disabled, rowParams)}>
|
|
132
|
-
{gItem.render ? gItem.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (gItem.exName || gItem.name)}
|
|
133
|
-
</a>
|
|
134
|
-
}
|
|
135
|
-
</Menu.Item>
|
|
136
|
-
})
|
|
137
|
-
}
|
|
138
|
-
</Menu>
|
|
139
|
-
)
|
|
140
|
-
};*/
|
|
141
|
-
// 递归转换原来的数组结构
|
|
142
|
-
var deepTransButtonMenus = function deepTransButtonMenus(groupArray) {
|
|
143
|
-
if (!Array.isArray(groupArray)) {
|
|
144
|
-
return [];
|
|
145
|
-
}
|
|
146
|
-
return groupArray.map(function (vItem, i) {
|
|
147
|
-
var code = vItem.code,
|
|
148
|
-
fn = vItem.fn,
|
|
149
|
-
exName = vItem.exName,
|
|
150
|
-
name = vItem.name,
|
|
151
|
-
children = vItem.children,
|
|
152
|
-
icon = vItem.icon,
|
|
153
|
-
others = __rest(vItem, ["code", "fn", "exName", "name", "children", "icon"]);
|
|
154
|
-
return Object.assign(Object.assign({}, others), {
|
|
155
|
-
key: code ? code + i : i,
|
|
156
|
-
icon: /*#__PURE__*/React.createElement(IconNode, {
|
|
157
|
-
icon: icon
|
|
158
|
-
}),
|
|
159
|
-
label: /*#__PURE__*/React.createElement("a", {
|
|
160
|
-
onClick: function onClick() {
|
|
161
|
-
return fn && fn(vItem);
|
|
162
|
-
}
|
|
163
|
-
}, exName || name),
|
|
164
|
-
children: children && children.length > 0 ? deepTransButtonMenus(children) : undefined
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
|
-
};
|
|
168
|
-
// 自定义渲染显示的文本
|
|
169
|
-
var renderCustomLabel = function renderCustomLabel(gItem) {
|
|
170
|
-
return gItem.render ? gItem.render.apply(gItem, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
171
|
-
return rowParams[pItem];
|
|
172
|
-
}))) : /*#__PURE__*/React.createElement(React.Fragment, null, gItem.icon ? ' ' : '', gItem.exName || gItem.name);
|
|
75
|
+
// 渲染按钮多层级形式 (用于筛选)
|
|
76
|
+
var buttonMenu = function buttonMenu(group) {
|
|
77
|
+
return /*#__PURE__*/React.createElement(_Menu, null, group.map(function (item, index) {
|
|
78
|
+
if (item.children) {
|
|
79
|
+
return /*#__PURE__*/React.createElement(_Menu.SubMenu, {
|
|
80
|
+
title: item.exName || item.name,
|
|
81
|
+
key: index
|
|
82
|
+
}, item.children.map(function (child, childIndex) {
|
|
83
|
+
return /*#__PURE__*/React.createElement(_Menu.Item, {
|
|
84
|
+
key: child.name + childIndex
|
|
85
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
86
|
+
onClick: child.fn ? function () {
|
|
87
|
+
return child.fn(child);
|
|
88
|
+
} : null
|
|
89
|
+
}, /*#__PURE__*/React.createElement(IconNode, {
|
|
90
|
+
icon: child.icon
|
|
91
|
+
}), " ", child.exName || child.name));
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
return /*#__PURE__*/React.createElement(_Menu.Item, {
|
|
95
|
+
key: item.name + index
|
|
96
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
97
|
+
onClick: item.fn ? function () {
|
|
98
|
+
return item.fn(item);
|
|
99
|
+
} : null
|
|
100
|
+
}, /*#__PURE__*/React.createElement(IconNode, {
|
|
101
|
+
icon: item.icon
|
|
102
|
+
}), " ", item.exName || item.name));
|
|
103
|
+
}));
|
|
173
104
|
};
|
|
174
105
|
// 渲染按钮形式 (用于筛选)
|
|
175
106
|
var RenderButtonList = function RenderButtonList(item) {
|
|
@@ -186,15 +117,12 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
186
117
|
rowParams = item.rowParams,
|
|
187
118
|
others = __rest(item, ["exName", "name", "type", "icon", "ghost", "danger", "disabled", "loading", "fn", "code", "rowParams"]);
|
|
188
119
|
if (Array.isArray(item.children) && item.children.length > 0) {
|
|
189
|
-
// overlay={buttonMenu(item.children)}
|
|
190
120
|
return /*#__PURE__*/React.createElement(_Dropdown, Object.assign({
|
|
191
|
-
|
|
192
|
-
items: deepTransButtonMenus(item.children)
|
|
193
|
-
},
|
|
121
|
+
overlay: buttonMenu(item.children),
|
|
194
122
|
placement: "bottomRight"
|
|
195
123
|
}, (item === null || item === void 0 ? void 0 : item.dropdownConfig) || dropdownConfig || {}), /*#__PURE__*/React.createElement(_Button, {
|
|
196
124
|
type: "primary"
|
|
197
|
-
}, item.exName || item.name
|
|
125
|
+
}, item.exName || item.name, " ", /*#__PURE__*/React.createElement(SpecIcon, {
|
|
198
126
|
name: "down"
|
|
199
127
|
})));
|
|
200
128
|
}
|
|
@@ -202,6 +130,7 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
202
130
|
type: type || 'primary',
|
|
203
131
|
danger: danger,
|
|
204
132
|
ghost: ghost,
|
|
133
|
+
loading: loading,
|
|
205
134
|
onClick: fn ? function () {
|
|
206
135
|
return fn(item);
|
|
207
136
|
} : null
|
|
@@ -210,51 +139,95 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
210
139
|
icon: icon
|
|
211
140
|
}),
|
|
212
141
|
disabled: btnIsDisabled(disabled, rowParams)
|
|
213
|
-
}), exName || name
|
|
142
|
+
}), exName || name);
|
|
214
143
|
};
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
if (!Array.isArray(groupArray)) {
|
|
218
|
-
return [];
|
|
219
|
-
}
|
|
220
|
-
return groupArray.map(function (vItem, i) {
|
|
221
|
-
var code = vItem.code,
|
|
222
|
-
fn = vItem.fn,
|
|
223
|
-
exName = vItem.exName,
|
|
224
|
-
name = vItem.name,
|
|
225
|
-
children = vItem.children,
|
|
226
|
-
icon = vItem.icon,
|
|
227
|
-
confirmText = vItem.confirmText,
|
|
228
|
-
confirmConfig = vItem.confirmConfig,
|
|
229
|
-
others = __rest(vItem, ["code", "fn", "exName", "name", "children", "icon", "confirmText", "confirmConfig"]);
|
|
144
|
+
/*const textMenuItems = (group) => {
|
|
145
|
+
return (group || []).map((gItem: any, gIndex) => {
|
|
230
146
|
return {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
147
|
+
disabled: btnIsDisabled(gItem.disabled, rowParams),
|
|
148
|
+
label: gItem.hasOwnProperty('confirmText') || gItem.hasOwnProperty('confirmConfig') ?
|
|
149
|
+
// @ts-ignore
|
|
150
|
+
<a disabled={btnIsDisabled(gItem.disabled, rowParams)}
|
|
151
|
+
onClick={gItem.fn ? () => {
|
|
152
|
+
setPopVisibleIndex(rowParams.rowIndex)
|
|
153
|
+
setPopRow(gItem)
|
|
154
|
+
} : null}>
|
|
155
|
+
{gItem.render ? gItem.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (gItem.exName || gItem.name)}
|
|
156
|
+
</a>
|
|
157
|
+
: <a className="spec-button-group-text"
|
|
158
|
+
onClick={gItem.fn ? () => gItem.fn(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : null}
|
|
159
|
+
// @ts-ignore
|
|
160
|
+
disabled={btnIsDisabled(gItem.disabled, rowParams)}>
|
|
161
|
+
{gItem.render ? gItem.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (gItem.exName || gItem.name)}
|
|
162
|
+
</a>,
|
|
163
|
+
key: gIndex + (gItem.exName || gItem.name),
|
|
164
|
+
children: gItem.children ? (gItem.children || []).map((child: any, childIndex: number) => {
|
|
165
|
+
return {
|
|
166
|
+
label: <a onClick={child.fn ? () => child.fn(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : null}>
|
|
167
|
+
{child.render ? child.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (child.exName || child.name)}
|
|
168
|
+
</a>,
|
|
169
|
+
key: childIndex
|
|
243
170
|
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
171
|
+
}) : undefined
|
|
172
|
+
}
|
|
173
|
+
})
|
|
174
|
+
}*/
|
|
175
|
+
// 渲染文本形式多级菜单列表(用于表格)
|
|
176
|
+
var textMenu = function textMenu(group) {
|
|
177
|
+
return /*#__PURE__*/React.createElement(_Menu, {
|
|
178
|
+
className: "spec-button-text-dropdown"
|
|
179
|
+
}, group.map(function (gItem, gIndex) {
|
|
180
|
+
if (gItem.children) {
|
|
181
|
+
return /*#__PURE__*/React.createElement(_Menu.SubMenu, {
|
|
182
|
+
title: gItem.exName || gItem.name,
|
|
183
|
+
key: gItem.name + gIndex
|
|
184
|
+
}, gItem.children.map(function (child, childIndex) {
|
|
185
|
+
return /*#__PURE__*/React.createElement(_Menu.Item, {
|
|
186
|
+
key: child.name + childIndex
|
|
187
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
188
|
+
onClick: child.fn ? function () {
|
|
189
|
+
return child.fn.apply(child, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
190
|
+
return rowParams[pItem];
|
|
191
|
+
})));
|
|
192
|
+
} : null
|
|
193
|
+
}, child.render ? child.render.apply(child, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
194
|
+
return rowParams[pItem];
|
|
195
|
+
}))) : child.exName || child.name));
|
|
196
|
+
}));
|
|
197
|
+
}
|
|
198
|
+
return /*#__PURE__*/React.createElement(_Menu.Item, {
|
|
199
|
+
key: gIndex,
|
|
200
|
+
disabled: btnIsDisabled(gItem.disabled, rowParams)
|
|
201
|
+
}, gItem.hasOwnProperty('confirmText') || gItem.hasOwnProperty('confirmConfig') ?
|
|
202
|
+
/*#__PURE__*/
|
|
203
|
+
// @ts-ignore
|
|
204
|
+
React.createElement("a", {
|
|
205
|
+
disabled: btnIsDisabled(gItem.disabled, rowParams),
|
|
206
|
+
onClick: gItem.fn ? function () {
|
|
207
|
+
setPopVisibleIndex(rowParams.rowIndex);
|
|
208
|
+
setPopRow(gItem);
|
|
209
|
+
} : null
|
|
210
|
+
}, gItem.render ? gItem.render.apply(gItem, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
211
|
+
return rowParams[pItem];
|
|
212
|
+
}))) : gItem.exName || gItem.name) : /*#__PURE__*/React.createElement("a", {
|
|
213
|
+
className: "spec-button-group-text",
|
|
214
|
+
onClick: gItem.fn ? function () {
|
|
215
|
+
return gItem.fn.apply(gItem, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
216
|
+
return rowParams[pItem];
|
|
217
|
+
})));
|
|
218
|
+
} : null,
|
|
219
|
+
// @ts-ignore
|
|
220
|
+
disabled: btnIsDisabled(gItem.disabled, rowParams)
|
|
221
|
+
}, gItem.render ? gItem.render.apply(gItem, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
222
|
+
return rowParams[pItem];
|
|
223
|
+
}))) : gItem.exName || gItem.name));
|
|
224
|
+
}));
|
|
249
225
|
};
|
|
250
226
|
// 渲染文本形式 列表(用于表格)
|
|
251
227
|
var RenderTextList = function RenderTextList(item) {
|
|
252
228
|
if (Array.isArray(item.children) && item.children.length > 0) {
|
|
253
|
-
// overlay={textMenu(item.children)}
|
|
254
229
|
return /*#__PURE__*/React.createElement(_Dropdown, Object.assign({
|
|
255
|
-
|
|
256
|
-
items: deepTransTextMenus(item.children)
|
|
257
|
-
},
|
|
230
|
+
overlay: textMenu(item.children),
|
|
258
231
|
placement: "bottomRight"
|
|
259
232
|
}, (item === null || item === void 0 ? void 0 : item.dropdownConfig) || dropdownConfig || {}), /*#__PURE__*/React.createElement("a", {
|
|
260
233
|
className: "spec-button-group-text"
|
|
@@ -297,7 +270,9 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
297
270
|
title: item.exName || item.name,
|
|
298
271
|
// @ts-ignore
|
|
299
272
|
disabled: btnIsDisabled(item.disabled, rowParams)
|
|
300
|
-
},
|
|
273
|
+
}, item.render ? item.render.apply(item, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
274
|
+
return rowParams[pItem];
|
|
275
|
+
}))) : item.exName || item.name)) : /*#__PURE__*/React.createElement("a", {
|
|
301
276
|
className: "spec-button-group-text",
|
|
302
277
|
title: item.exName || item.name,
|
|
303
278
|
key: item.index,
|
|
@@ -308,7 +283,9 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
308
283
|
return rowParams[pItem];
|
|
309
284
|
})));
|
|
310
285
|
} : null
|
|
311
|
-
},
|
|
286
|
+
}, item.render ? item.render.apply(item, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
287
|
+
return rowParams[pItem];
|
|
288
|
+
}))) : item.exName || item.name));
|
|
312
289
|
};
|
|
313
290
|
// 渲染展示的按钮列表
|
|
314
291
|
var renderDisplayButton = function renderDisplayButton(item, index) {
|
|
@@ -335,26 +312,21 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
335
312
|
if (resetList.length === 0) {
|
|
336
313
|
return /*#__PURE__*/React.createElement(React.Fragment, null, type !== 'button' ? '-' : null);
|
|
337
314
|
}
|
|
338
|
-
// 数量超出时渲染
|
|
339
315
|
if (resetList.length > min) {
|
|
340
|
-
var forGroup = resetList.slice(0, min - 1);
|
|
341
|
-
var forDrop = resetList.slice(min - 1);
|
|
316
|
+
var forGroup = resetList.slice(0, min - 1);
|
|
317
|
+
var forDrop = resetList.slice(min - 1);
|
|
342
318
|
return /*#__PURE__*/React.createElement("span", {
|
|
343
319
|
className: "spec-button-group"
|
|
344
320
|
}, forGroup.map(function (item, index) {
|
|
345
321
|
return index < min - 1 ? renderDisplayButton(item, index) : null;
|
|
346
322
|
}), type === 'button' ? /*#__PURE__*/React.createElement(_Dropdown, Object.assign({
|
|
347
|
-
|
|
348
|
-
items: deepTransButtonMenus(forDrop)
|
|
349
|
-
},
|
|
323
|
+
overlay: buttonMenu(forDrop),
|
|
350
324
|
placement: "bottomRight"
|
|
351
325
|
}, dropdownConfig), /*#__PURE__*/React.createElement(_Button, {
|
|
352
326
|
type: "primary"
|
|
353
|
-
}, moreText,
|
|
354
|
-
name: "down"
|
|
355
|
-
}))) : /*#__PURE__*/React.createElement(_Popconfirm, Object.assign({
|
|
327
|
+
}, moreText || '更多', moreIcon || /*#__PURE__*/React.createElement(DownOutlined, null))) : /*#__PURE__*/React.createElement(_Popconfirm, Object.assign({
|
|
356
328
|
placement: "topRight",
|
|
357
|
-
|
|
329
|
+
visible: popVisibleIndex === rowParams.rowIndex,
|
|
358
330
|
icon: /*#__PURE__*/React.createElement(QuestionCircleOutlined, null),
|
|
359
331
|
trigger: "click"
|
|
360
332
|
}, popRow.hasOwnProperty('confirmConfig') ? popRow.confirmConfig : {}, {
|
|
@@ -386,15 +358,12 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
386
358
|
}
|
|
387
359
|
}
|
|
388
360
|
}), /*#__PURE__*/React.createElement(_Dropdown, Object.assign({
|
|
389
|
-
|
|
390
|
-
items: deepTransTextMenus(forDrop)
|
|
391
|
-
},
|
|
361
|
+
overlay: textMenu(forDrop),
|
|
392
362
|
placement: "bottomRight"
|
|
393
363
|
}, dropdownConfig), /*#__PURE__*/React.createElement("a", {
|
|
394
364
|
className: "spec-button-group-text"
|
|
395
|
-
}, moreText
|
|
365
|
+
}, moreText || '更多', moreIcon || /*#__PURE__*/React.createElement(DownOutlined, null)))));
|
|
396
366
|
}
|
|
397
|
-
// 数量不超出时渲染
|
|
398
367
|
return /*#__PURE__*/React.createElement("span", {
|
|
399
368
|
className: "spec-button-group"
|
|
400
369
|
}, resetList.map(function (item, index) {
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
.ant-btn + .ant-btn {
|
|
9
9
|
margin-left: @padding-sm;
|
|
10
10
|
}
|
|
11
|
+
.spec-button-group-text {
|
|
12
|
+
display: inline-block;
|
|
13
|
+
}
|
|
11
14
|
.spec-button-group-text + .spec-button-group-text {
|
|
12
15
|
position: relative;
|
|
13
16
|
margin-left: @padding-sm;
|
|
@@ -15,7 +18,7 @@
|
|
|
15
18
|
position: absolute;
|
|
16
19
|
content: '';
|
|
17
20
|
top: 50%;
|
|
18
|
-
left:
|
|
21
|
+
left: calc(-@padding-sm/2);
|
|
19
22
|
transform: translate(0, -50%);
|
|
20
23
|
display: inline-block;
|
|
21
24
|
height: .9em;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import "antd/es/calendar/style";
|
|
2
|
+
import _Calendar from "antd/es/calendar";
|
|
3
|
+
import { __rest } from "tslib";
|
|
4
|
+
import React, { useMemo } from 'react';
|
|
5
|
+
import './index.less';
|
|
6
|
+
import moment from 'moment';
|
|
7
|
+
import 'moment/locale/zh-cn';
|
|
8
|
+
import locale from 'antd/es/date-picker/locale/zh_CN';
|
|
9
|
+
var CalendarMonthPicker = function CalendarMonthPicker(props) {
|
|
10
|
+
var year = props.year,
|
|
11
|
+
month = props.month,
|
|
12
|
+
others = __rest(props, ["year", "month"]);
|
|
13
|
+
var monthRangeDays = useMemo(function () {
|
|
14
|
+
var time = (year || moment().year()) + '-01';
|
|
15
|
+
var startTime = moment(time).month(month - 1).date(1).startOf("month"); //.format('YYYY-MM-DD')
|
|
16
|
+
var endTime = moment(time).month(month - 1).date(1).endOf("month"); //.format('YYYY-MM-DD')
|
|
17
|
+
return [startTime, endTime];
|
|
18
|
+
}, [year]);
|
|
19
|
+
return /*#__PURE__*/React.createElement(_Calendar, Object.assign({
|
|
20
|
+
fullscreen: false,
|
|
21
|
+
value: moment((year || moment().year()) + '-' + month),
|
|
22
|
+
validRange: monthRangeDays,
|
|
23
|
+
locale: locale
|
|
24
|
+
}, others));
|
|
25
|
+
};
|
|
26
|
+
export default CalendarMonthPicker;
|