fan-standard-comp 3.2.1 → 3.2.3
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 +2 -32
- package/dist/09cd8e9be7081f2166444cce393fe968.svg +54 -0
- package/dist/e3378c145b7db195ad068735e15fb28a.svg +165 -0
- package/dist/fan-standard-comp.umd.js +183 -439
- 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 +146 -180
- 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 +37 -26
- package/es/FormComp/FieldComponent/setReadonlyValues.js +6 -6
- package/es/FormComp/RenderItemGroup/index.js +24 -8
- package/es/FormComp/Uploader/index.d.ts +9 -2
- package/es/FormComp/Uploader/index.js +325 -156
- 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 +150 -185
- 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 +41 -28
- package/lib/FormComp/FieldComponent/setReadonlyValues.js +15 -20
- package/lib/FormComp/RenderItemGroup/index.js +26 -11
- package/lib/FormComp/Uploader/index.d.ts +9 -2
- package/lib/FormComp/Uploader/index.js +325 -159
- 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 +15 -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/lib/ButtonGroup/index.js
CHANGED
|
@@ -11,6 +11,8 @@ require("antd/es/button/style");
|
|
|
11
11
|
var _button = _interopRequireDefault(require("antd/es/button"));
|
|
12
12
|
require("antd/es/dropdown/style");
|
|
13
13
|
var _dropdown = _interopRequireDefault(require("antd/es/dropdown"));
|
|
14
|
+
require("antd/es/menu/style");
|
|
15
|
+
var _menu = _interopRequireDefault(require("antd/es/menu"));
|
|
14
16
|
var _tslib = require("tslib");
|
|
15
17
|
var _react = _interopRequireWildcard(require("react"));
|
|
16
18
|
var _index = require("../components/index");
|
|
@@ -18,21 +20,22 @@ var _index2 = _interopRequireDefault(require("../SpecIcon/index"));
|
|
|
18
20
|
var _PopConfirmTitle = _interopRequireDefault(require("./PopConfirmTitle"));
|
|
19
21
|
var _index3 = require("../data/index");
|
|
20
22
|
var _icons = require("@ant-design/icons");
|
|
21
|
-
var _filterPermission = require("../utils/filterPermission");
|
|
23
|
+
var _filterPermission = require("../utils/filterPermission.js");
|
|
24
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
22
25
|
require("./style/index.less");
|
|
23
|
-
function _getRequireWildcardCache(
|
|
24
|
-
function _interopRequireWildcard(
|
|
25
|
-
function _interopRequireDefault(
|
|
26
|
-
function _toConsumableArray(
|
|
26
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
27
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
28
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
29
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
27
30
|
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."); }
|
|
28
|
-
function _iterableToArray(
|
|
29
|
-
function _arrayWithoutHoles(
|
|
30
|
-
function _slicedToArray(
|
|
31
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
32
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
33
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
31
34
|
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."); }
|
|
32
|
-
function _unsupportedIterableToArray(
|
|
33
|
-
function _arrayLikeToArray(
|
|
34
|
-
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)
|
|
35
|
-
function _arrayWithHoles(
|
|
35
|
+
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; } }
|
|
36
|
+
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; }
|
|
37
|
+
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; } }
|
|
38
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
36
39
|
var ButtonGroup = function ButtonGroup(props) {
|
|
37
40
|
var _props$type = props.type,
|
|
38
41
|
type = _props$type === void 0 ? 'button' : _props$type,
|
|
@@ -42,16 +45,17 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
42
45
|
record: undefined,
|
|
43
46
|
rowIndex: undefined
|
|
44
47
|
} : _props$rowParams,
|
|
45
|
-
|
|
46
|
-
codes = _props$codes === void 0 ? _index3.funcCode.btnFuncCodes : _props$codes,
|
|
48
|
+
codes = props.codes,
|
|
47
49
|
permissionCodes = props.permissionCodes,
|
|
48
50
|
_props$dropdownConfig = props.dropdownConfig,
|
|
49
|
-
dropdownConfig = _props$dropdownConfig === void 0 ? {} : _props$dropdownConfig
|
|
51
|
+
dropdownConfig = _props$dropdownConfig === void 0 ? {} : _props$dropdownConfig,
|
|
52
|
+
_props$moreText = props.moreText,
|
|
53
|
+
moreText = _props$moreText === void 0 ? '更多' : _props$moreText,
|
|
54
|
+
moreIcon = props.moreIcon;
|
|
50
55
|
var _props$options = props.options,
|
|
51
56
|
options = _props$options === void 0 ? [] : _props$options,
|
|
52
57
|
_props$min = props.min,
|
|
53
58
|
min = _props$min === void 0 ? 3 : _props$min; // 最小展示长度不能小于2
|
|
54
|
-
var moreText = '更多';
|
|
55
59
|
if (!options) return null; // 没有配置list返回null
|
|
56
60
|
var _useState = (0, _react.useState)(-1),
|
|
57
61
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -66,8 +70,11 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
66
70
|
resetList = _useState6[0],
|
|
67
71
|
setResetList = _useState6[1];
|
|
68
72
|
(0, _react.useEffect)(function () {
|
|
73
|
+
// codes在方法内,再合并默认的权限配置
|
|
74
|
+
// 合并本地的codes
|
|
75
|
+
var codesConcat = _lodash.default.unionBy(codes || [], _index3.funcCode.btnFuncCodes, 'code');
|
|
69
76
|
// 重组选项options集合数据,排除:无权限(有配置code,并且不包含permissionCodes内)的数据及,isHide 为true的数据
|
|
70
|
-
setResetList(_toConsumableArray((0, _filterPermission.removeNoPermission)(options, permissionCodes,
|
|
77
|
+
setResetList(_toConsumableArray((0, _filterPermission.removeNoPermission)(options, permissionCodes, codesConcat, rowParams)) || []);
|
|
71
78
|
return function () {
|
|
72
79
|
setResetList([]);
|
|
73
80
|
};
|
|
@@ -75,112 +82,35 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
75
82
|
(0, _react.useEffect)(function () {
|
|
76
83
|
setPopVisibleIndex(-1);
|
|
77
84
|
}, [rowParams]);
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
};
|
|
108
|
-
// 渲染文本形式多级菜单列表(用于表格)
|
|
109
|
-
const textMenu = (group: any[]) => {
|
|
110
|
-
return (
|
|
111
|
-
<Menu className="spec-button-text-dropdown">
|
|
112
|
-
{
|
|
113
|
-
group.map((gItem: any, gIndex: number) => {
|
|
114
|
-
|
|
115
|
-
if (gItem.children) {
|
|
116
|
-
return <Menu.SubMenu title={gItem.exName || gItem.name} key={gItem}>
|
|
117
|
-
{
|
|
118
|
-
gItem.children.map((child: any, childIndex: number) => <Menu.Item key={childIndex}>
|
|
119
|
-
<a onClick={child.fn ? () => child.fn(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : null}>
|
|
120
|
-
{child.render ? child.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (child.exName || child.name)}
|
|
121
|
-
</a>
|
|
122
|
-
</Menu.Item>)
|
|
123
|
-
}
|
|
124
|
-
</Menu.SubMenu>
|
|
125
|
-
}
|
|
126
|
-
return <Menu.Item key={gIndex}
|
|
127
|
-
disabled={btnIsDisabled(gItem.disabled, rowParams)}>
|
|
128
|
-
{
|
|
129
|
-
gItem.hasOwnProperty('confirmText') || gItem.hasOwnProperty('confirmConfig') ?
|
|
130
|
-
// @ts-ignore
|
|
131
|
-
<a disabled={btnIsDisabled(gItem.disabled, rowParams)}
|
|
132
|
-
onClick={gItem.fn ? () => {
|
|
133
|
-
setPopVisibleIndex(rowParams.rowIndex)
|
|
134
|
-
setPopRow(gItem)
|
|
135
|
-
} : null}>
|
|
136
|
-
{gItem.render ? gItem.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (gItem.exName || gItem.name)}
|
|
137
|
-
</a>
|
|
138
|
-
: <a className="spec-button-group-text"
|
|
139
|
-
onClick={gItem.fn ? () => gItem.fn(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : null}
|
|
140
|
-
// @ts-ignore
|
|
141
|
-
disabled={btnIsDisabled(gItem.disabled, rowParams)}>
|
|
142
|
-
{gItem.render ? gItem.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (gItem.exName || gItem.name)}
|
|
143
|
-
</a>
|
|
144
|
-
}
|
|
145
|
-
</Menu.Item>
|
|
146
|
-
})
|
|
147
|
-
}
|
|
148
|
-
</Menu>
|
|
149
|
-
)
|
|
150
|
-
};*/
|
|
151
|
-
// 递归转换原来的数组结构
|
|
152
|
-
var deepTransButtonMenus = function deepTransButtonMenus(groupArray) {
|
|
153
|
-
if (!Array.isArray(groupArray)) {
|
|
154
|
-
return [];
|
|
155
|
-
}
|
|
156
|
-
return groupArray.map(function (vItem, i) {
|
|
157
|
-
var code = vItem.code,
|
|
158
|
-
fn = vItem.fn,
|
|
159
|
-
exName = vItem.exName,
|
|
160
|
-
name = vItem.name,
|
|
161
|
-
children = vItem.children,
|
|
162
|
-
icon = vItem.icon,
|
|
163
|
-
others = (0, _tslib.__rest)(vItem, ["code", "fn", "exName", "name", "children", "icon"]);
|
|
164
|
-
return Object.assign(Object.assign({}, others), {
|
|
165
|
-
key: code ? code + i : i,
|
|
166
|
-
icon: /*#__PURE__*/_react.default.createElement(_index.IconNode, {
|
|
167
|
-
icon: icon
|
|
168
|
-
}),
|
|
169
|
-
label: /*#__PURE__*/_react.default.createElement("a", {
|
|
170
|
-
onClick: function onClick() {
|
|
171
|
-
return fn && fn(vItem);
|
|
172
|
-
}
|
|
173
|
-
}, exName || name),
|
|
174
|
-
children: children && children.length > 0 ? deepTransButtonMenus(children) : undefined
|
|
175
|
-
});
|
|
176
|
-
});
|
|
177
|
-
};
|
|
178
|
-
// {gItem.render ? gItem.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (gItem.exName || gItem.name)}
|
|
179
|
-
// 自定义渲染显示的文本
|
|
180
|
-
var renderCustomLabel = function renderCustomLabel(gItem) {
|
|
181
|
-
return gItem.render ? gItem.render.apply(gItem, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
182
|
-
return rowParams[pItem];
|
|
183
|
-
}))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, gItem.icon ? ' ' : '', gItem.exName || gItem.name);
|
|
85
|
+
// 渲染按钮多层级形式 (用于筛选)
|
|
86
|
+
var buttonMenu = function buttonMenu(group) {
|
|
87
|
+
return /*#__PURE__*/_react.default.createElement(_menu.default, null, group.map(function (item, index) {
|
|
88
|
+
if (item.children) {
|
|
89
|
+
return /*#__PURE__*/_react.default.createElement(_menu.default.SubMenu, {
|
|
90
|
+
title: item.exName || item.name,
|
|
91
|
+
key: index
|
|
92
|
+
}, item.children.map(function (child, childIndex) {
|
|
93
|
+
return /*#__PURE__*/_react.default.createElement(_menu.default.Item, {
|
|
94
|
+
key: child.name + childIndex
|
|
95
|
+
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
96
|
+
onClick: child.fn ? function () {
|
|
97
|
+
return child.fn(child);
|
|
98
|
+
} : null
|
|
99
|
+
}, /*#__PURE__*/_react.default.createElement(_index.IconNode, {
|
|
100
|
+
icon: child.icon
|
|
101
|
+
}), " ", child.exName || child.name));
|
|
102
|
+
}));
|
|
103
|
+
}
|
|
104
|
+
return /*#__PURE__*/_react.default.createElement(_menu.default.Item, {
|
|
105
|
+
key: item.name + index
|
|
106
|
+
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
107
|
+
onClick: item.fn ? function () {
|
|
108
|
+
return item.fn(item);
|
|
109
|
+
} : null
|
|
110
|
+
}, /*#__PURE__*/_react.default.createElement(_index.IconNode, {
|
|
111
|
+
icon: item.icon
|
|
112
|
+
}), " ", item.exName || item.name));
|
|
113
|
+
}));
|
|
184
114
|
};
|
|
185
115
|
// 渲染按钮形式 (用于筛选)
|
|
186
116
|
var RenderButtonList = function RenderButtonList(item) {
|
|
@@ -197,15 +127,12 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
197
127
|
rowParams = item.rowParams,
|
|
198
128
|
others = (0, _tslib.__rest)(item, ["exName", "name", "type", "icon", "ghost", "danger", "disabled", "loading", "fn", "code", "rowParams"]);
|
|
199
129
|
if (Array.isArray(item.children) && item.children.length > 0) {
|
|
200
|
-
// overlay={buttonMenu(item.children)}
|
|
201
130
|
return /*#__PURE__*/_react.default.createElement(_dropdown.default, Object.assign({
|
|
202
|
-
|
|
203
|
-
items: deepTransButtonMenus(item.children)
|
|
204
|
-
},
|
|
131
|
+
overlay: buttonMenu(item.children),
|
|
205
132
|
placement: "bottomRight"
|
|
206
133
|
}, (item === null || item === void 0 ? void 0 : item.dropdownConfig) || dropdownConfig || {}), /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
207
134
|
type: "primary"
|
|
208
|
-
}, item.exName || item.name
|
|
135
|
+
}, item.exName || item.name, " ", /*#__PURE__*/_react.default.createElement(_index2.default, {
|
|
209
136
|
name: "down"
|
|
210
137
|
})));
|
|
211
138
|
}
|
|
@@ -213,6 +140,7 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
213
140
|
type: type || 'primary',
|
|
214
141
|
danger: danger,
|
|
215
142
|
ghost: ghost,
|
|
143
|
+
loading: loading,
|
|
216
144
|
onClick: fn ? function () {
|
|
217
145
|
return fn(item);
|
|
218
146
|
} : null
|
|
@@ -221,53 +149,95 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
221
149
|
icon: icon
|
|
222
150
|
}),
|
|
223
151
|
disabled: (0, _filterPermission.btnIsDisabled)(disabled, rowParams)
|
|
224
|
-
}), exName || name
|
|
152
|
+
}), exName || name);
|
|
225
153
|
};
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
if (!Array.isArray(groupArray)) {
|
|
229
|
-
return [];
|
|
230
|
-
}
|
|
231
|
-
return groupArray.map(function (vItem, i) {
|
|
232
|
-
var code = vItem.code,
|
|
233
|
-
fn = vItem.fn,
|
|
234
|
-
exName = vItem.exName,
|
|
235
|
-
name = vItem.name,
|
|
236
|
-
children = vItem.children,
|
|
237
|
-
icon = vItem.icon,
|
|
238
|
-
confirmText = vItem.confirmText,
|
|
239
|
-
confirmConfig = vItem.confirmConfig,
|
|
240
|
-
others = (0, _tslib.__rest)(vItem, ["code", "fn", "exName", "name", "children", "icon", "confirmText", "confirmConfig"]);
|
|
154
|
+
/*const textMenuItems = (group) => {
|
|
155
|
+
return (group || []).map((gItem: any, gIndex) => {
|
|
241
156
|
return {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
157
|
+
disabled: btnIsDisabled(gItem.disabled, rowParams),
|
|
158
|
+
label: gItem.hasOwnProperty('confirmText') || gItem.hasOwnProperty('confirmConfig') ?
|
|
159
|
+
// @ts-ignore
|
|
160
|
+
<a disabled={btnIsDisabled(gItem.disabled, rowParams)}
|
|
161
|
+
onClick={gItem.fn ? () => {
|
|
162
|
+
setPopVisibleIndex(rowParams.rowIndex)
|
|
163
|
+
setPopRow(gItem)
|
|
164
|
+
} : null}>
|
|
165
|
+
{gItem.render ? gItem.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (gItem.exName || gItem.name)}
|
|
166
|
+
</a>
|
|
167
|
+
: <a className="spec-button-group-text"
|
|
168
|
+
onClick={gItem.fn ? () => gItem.fn(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : null}
|
|
169
|
+
// @ts-ignore
|
|
170
|
+
disabled={btnIsDisabled(gItem.disabled, rowParams)}>
|
|
171
|
+
{gItem.render ? gItem.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (gItem.exName || gItem.name)}
|
|
172
|
+
</a>,
|
|
173
|
+
key: gIndex + (gItem.exName || gItem.name),
|
|
174
|
+
children: gItem.children ? (gItem.children || []).map((child: any, childIndex: number) => {
|
|
175
|
+
return {
|
|
176
|
+
label: <a onClick={child.fn ? () => child.fn(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : null}>
|
|
177
|
+
{child.render ? child.render(...Object.keys(rowParams).map((pItem) => rowParams[pItem])) : (child.exName || child.name)}
|
|
178
|
+
</a>,
|
|
179
|
+
key: childIndex
|
|
180
|
+
}
|
|
181
|
+
}) : undefined
|
|
182
|
+
}
|
|
183
|
+
})
|
|
184
|
+
}*/
|
|
185
|
+
// 渲染文本形式多级菜单列表(用于表格)
|
|
186
|
+
var textMenu = function textMenu(group) {
|
|
187
|
+
return /*#__PURE__*/_react.default.createElement(_menu.default, {
|
|
188
|
+
className: "spec-button-text-dropdown"
|
|
189
|
+
}, group.map(function (gItem, gIndex) {
|
|
190
|
+
if (gItem.children) {
|
|
191
|
+
return /*#__PURE__*/_react.default.createElement(_menu.default.SubMenu, {
|
|
192
|
+
title: gItem.exName || gItem.name,
|
|
193
|
+
key: gItem.name + gIndex
|
|
194
|
+
}, gItem.children.map(function (child, childIndex) {
|
|
195
|
+
return /*#__PURE__*/_react.default.createElement(_menu.default.Item, {
|
|
196
|
+
key: child.name + childIndex
|
|
197
|
+
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
198
|
+
onClick: child.fn ? function () {
|
|
199
|
+
return child.fn.apply(child, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
253
200
|
return rowParams[pItem];
|
|
254
201
|
})));
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
}
|
|
261
|
-
|
|
202
|
+
} : null
|
|
203
|
+
}, child.render ? child.render.apply(child, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
204
|
+
return rowParams[pItem];
|
|
205
|
+
}))) : child.exName || child.name));
|
|
206
|
+
}));
|
|
207
|
+
}
|
|
208
|
+
return /*#__PURE__*/_react.default.createElement(_menu.default.Item, {
|
|
209
|
+
key: gIndex,
|
|
210
|
+
disabled: (0, _filterPermission.btnIsDisabled)(gItem.disabled, rowParams)
|
|
211
|
+
}, gItem.hasOwnProperty('confirmText') || gItem.hasOwnProperty('confirmConfig') ?
|
|
212
|
+
/*#__PURE__*/
|
|
213
|
+
// @ts-ignore
|
|
214
|
+
_react.default.createElement("a", {
|
|
215
|
+
disabled: (0, _filterPermission.btnIsDisabled)(gItem.disabled, rowParams),
|
|
216
|
+
onClick: gItem.fn ? function () {
|
|
217
|
+
setPopVisibleIndex(rowParams.rowIndex);
|
|
218
|
+
setPopRow(gItem);
|
|
219
|
+
} : null
|
|
220
|
+
}, gItem.render ? gItem.render.apply(gItem, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
221
|
+
return rowParams[pItem];
|
|
222
|
+
}))) : gItem.exName || gItem.name) : /*#__PURE__*/_react.default.createElement("a", {
|
|
223
|
+
className: "spec-button-group-text",
|
|
224
|
+
onClick: gItem.fn ? function () {
|
|
225
|
+
return gItem.fn.apply(gItem, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
226
|
+
return rowParams[pItem];
|
|
227
|
+
})));
|
|
228
|
+
} : null,
|
|
229
|
+
// @ts-ignore
|
|
230
|
+
disabled: (0, _filterPermission.btnIsDisabled)(gItem.disabled, rowParams)
|
|
231
|
+
}, gItem.render ? gItem.render.apply(gItem, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
232
|
+
return rowParams[pItem];
|
|
233
|
+
}))) : gItem.exName || gItem.name));
|
|
234
|
+
}));
|
|
262
235
|
};
|
|
263
236
|
// 渲染文本形式 列表(用于表格)
|
|
264
237
|
var RenderTextList = function RenderTextList(item) {
|
|
265
238
|
if (Array.isArray(item.children) && item.children.length > 0) {
|
|
266
|
-
// overlay={textMenu(item.children)}
|
|
267
239
|
return /*#__PURE__*/_react.default.createElement(_dropdown.default, Object.assign({
|
|
268
|
-
|
|
269
|
-
items: deepTransTextMenus(item.children)
|
|
270
|
-
},
|
|
240
|
+
overlay: textMenu(item.children),
|
|
271
241
|
placement: "bottomRight"
|
|
272
242
|
}, (item === null || item === void 0 ? void 0 : item.dropdownConfig) || dropdownConfig || {}), /*#__PURE__*/_react.default.createElement("a", {
|
|
273
243
|
className: "spec-button-group-text"
|
|
@@ -310,7 +280,9 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
310
280
|
title: item.exName || item.name,
|
|
311
281
|
// @ts-ignore
|
|
312
282
|
disabled: (0, _filterPermission.btnIsDisabled)(item.disabled, rowParams)
|
|
313
|
-
},
|
|
283
|
+
}, item.render ? item.render.apply(item, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
284
|
+
return rowParams[pItem];
|
|
285
|
+
}))) : item.exName || item.name)) : /*#__PURE__*/_react.default.createElement("a", {
|
|
314
286
|
className: "spec-button-group-text",
|
|
315
287
|
title: item.exName || item.name,
|
|
316
288
|
key: item.index,
|
|
@@ -321,7 +293,9 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
321
293
|
return rowParams[pItem];
|
|
322
294
|
})));
|
|
323
295
|
} : null
|
|
324
|
-
},
|
|
296
|
+
}, item.render ? item.render.apply(item, _toConsumableArray(Object.keys(rowParams).map(function (pItem) {
|
|
297
|
+
return rowParams[pItem];
|
|
298
|
+
}))) : item.exName || item.name));
|
|
325
299
|
};
|
|
326
300
|
// 渲染展示的按钮列表
|
|
327
301
|
var renderDisplayButton = function renderDisplayButton(item, index) {
|
|
@@ -348,26 +322,21 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
348
322
|
if (resetList.length === 0) {
|
|
349
323
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, type !== 'button' ? '-' : null);
|
|
350
324
|
}
|
|
351
|
-
// 数量超出时渲染
|
|
352
325
|
if (resetList.length > min) {
|
|
353
|
-
var forGroup = resetList.slice(0, min - 1);
|
|
354
|
-
var forDrop = resetList.slice(min - 1);
|
|
326
|
+
var forGroup = resetList.slice(0, min - 1);
|
|
327
|
+
var forDrop = resetList.slice(min - 1);
|
|
355
328
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
356
329
|
className: "spec-button-group"
|
|
357
330
|
}, forGroup.map(function (item, index) {
|
|
358
331
|
return index < min - 1 ? renderDisplayButton(item, index) : null;
|
|
359
332
|
}), type === 'button' ? /*#__PURE__*/_react.default.createElement(_dropdown.default, Object.assign({
|
|
360
|
-
|
|
361
|
-
items: deepTransButtonMenus(forDrop)
|
|
362
|
-
},
|
|
333
|
+
overlay: buttonMenu(forDrop),
|
|
363
334
|
placement: "bottomRight"
|
|
364
335
|
}, dropdownConfig), /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
365
336
|
type: "primary"
|
|
366
|
-
}, moreText,
|
|
367
|
-
name: "down"
|
|
368
|
-
}))) : /*#__PURE__*/_react.default.createElement(_popconfirm.default, Object.assign({
|
|
337
|
+
}, moreText || '更多', moreIcon || /*#__PURE__*/_react.default.createElement(_icons.DownOutlined, null))) : /*#__PURE__*/_react.default.createElement(_popconfirm.default, Object.assign({
|
|
369
338
|
placement: "topRight",
|
|
370
|
-
|
|
339
|
+
visible: popVisibleIndex === rowParams.rowIndex,
|
|
371
340
|
icon: /*#__PURE__*/_react.default.createElement(_icons.QuestionCircleOutlined, null),
|
|
372
341
|
trigger: "click"
|
|
373
342
|
}, popRow.hasOwnProperty('confirmConfig') ? popRow.confirmConfig : {}, {
|
|
@@ -399,20 +368,16 @@ var ButtonGroup = function ButtonGroup(props) {
|
|
|
399
368
|
}
|
|
400
369
|
}
|
|
401
370
|
}), /*#__PURE__*/_react.default.createElement(_dropdown.default, Object.assign({
|
|
402
|
-
|
|
403
|
-
items: deepTransTextMenus(forDrop)
|
|
404
|
-
},
|
|
371
|
+
overlay: textMenu(forDrop),
|
|
405
372
|
placement: "bottomRight"
|
|
406
373
|
}, dropdownConfig), /*#__PURE__*/_react.default.createElement("a", {
|
|
407
374
|
className: "spec-button-group-text"
|
|
408
|
-
}, moreText
|
|
375
|
+
}, moreText || '更多', moreIcon || /*#__PURE__*/_react.default.createElement(_icons.DownOutlined, null)))));
|
|
409
376
|
}
|
|
410
|
-
// 数量不超出时渲染
|
|
411
377
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
412
378
|
className: "spec-button-group"
|
|
413
379
|
}, resetList.map(function (item, index) {
|
|
414
380
|
return renderDisplayButton(item, index);
|
|
415
381
|
}));
|
|
416
382
|
};
|
|
417
|
-
var _default = ButtonGroup;
|
|
418
|
-
exports.default = _default;
|
|
383
|
+
var _default = exports.default = ButtonGroup;
|
|
@@ -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,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
require("antd/es/calendar/style");
|
|
9
|
+
var _calendar = _interopRequireDefault(require("antd/es/calendar"));
|
|
10
|
+
var _tslib = require("tslib");
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
require("./index.less");
|
|
13
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
14
|
+
require("moment/locale/zh-cn");
|
|
15
|
+
var _zh_CN = _interopRequireDefault(require("antd/es/date-picker/locale/zh_CN"));
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
|
+
var CalendarMonthPicker = function CalendarMonthPicker(props) {
|
|
20
|
+
var year = props.year,
|
|
21
|
+
month = props.month,
|
|
22
|
+
others = (0, _tslib.__rest)(props, ["year", "month"]);
|
|
23
|
+
var monthRangeDays = (0, _react.useMemo)(function () {
|
|
24
|
+
var time = (year || (0, _moment.default)().year()) + '-01';
|
|
25
|
+
var startTime = (0, _moment.default)(time).month(month - 1).date(1).startOf("month"); //.format('YYYY-MM-DD')
|
|
26
|
+
var endTime = (0, _moment.default)(time).month(month - 1).date(1).endOf("month"); //.format('YYYY-MM-DD')
|
|
27
|
+
return [startTime, endTime];
|
|
28
|
+
}, [year]);
|
|
29
|
+
return /*#__PURE__*/_react.default.createElement(_calendar.default, Object.assign({
|
|
30
|
+
fullscreen: false,
|
|
31
|
+
value: (0, _moment.default)((year || (0, _moment.default)().year()) + '-' + month),
|
|
32
|
+
validRange: monthRangeDays,
|
|
33
|
+
locale: _zh_CN.default
|
|
34
|
+
}, others));
|
|
35
|
+
};
|
|
36
|
+
var _default = exports.default = CalendarMonthPicker;
|