fan-standard-comp 3.2.1 → 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 +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 +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 +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 +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
|
@@ -9,12 +9,12 @@ import _Row from "antd/es/row";
|
|
|
9
9
|
import "antd/es/form/style";
|
|
10
10
|
import _Form from "antd/es/form";
|
|
11
11
|
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); }
|
|
12
|
-
function _slicedToArray(
|
|
12
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
13
13
|
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."); }
|
|
14
|
-
function _unsupportedIterableToArray(
|
|
15
|
-
function _arrayLikeToArray(
|
|
16
|
-
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)
|
|
17
|
-
function _arrayWithHoles(
|
|
14
|
+
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; } }
|
|
15
|
+
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; }
|
|
16
|
+
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; } }
|
|
17
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
18
18
|
import { __rest } from "tslib";
|
|
19
19
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
20
20
|
import { general } from '../data';
|
|
@@ -25,8 +25,8 @@ import TabForm from '../StandardForm/TabForm';
|
|
|
25
25
|
import StepForm from '../StandardForm/StepForm';
|
|
26
26
|
import ActionList from '../StandardForm/ActionList.js';
|
|
27
27
|
import './style/index.less';
|
|
28
|
-
|
|
29
|
-
import
|
|
28
|
+
import { DraggableModal, DraggableModalProvider } from 'ant-design-draggable-modal';
|
|
29
|
+
import 'ant-design-draggable-modal/dist/index.css';
|
|
30
30
|
var StandardModal = function StandardModal(props) {
|
|
31
31
|
var children = props.children,
|
|
32
32
|
className = props.className,
|
|
@@ -66,7 +66,8 @@ var StandardModal = function StandardModal(props) {
|
|
|
66
66
|
var _useState3 = useState(0),
|
|
67
67
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
68
68
|
bodyMaxHeight = _useState4[0],
|
|
69
|
-
setBodyMaxHeight = _useState4[1];
|
|
69
|
+
setBodyMaxHeight = _useState4[1];
|
|
70
|
+
// setTabFormChild
|
|
70
71
|
var _useState5 = useState(),
|
|
71
72
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
72
73
|
formChild = _useState6[0],
|
|
@@ -84,7 +85,9 @@ var StandardModal = function StandardModal(props) {
|
|
|
84
85
|
return ((_b = activeTabInfo === null || activeTabInfo === void 0 ? void 0 : activeTabInfo.actions) === null || _b === void 0 ? void 0 : _b.length) > 0;
|
|
85
86
|
}
|
|
86
87
|
if (type === 'stepForm') {
|
|
87
|
-
var currentStepInfo = formItemGroup
|
|
88
|
+
var currentStepInfo = formItemGroup.filter(function (fItem) {
|
|
89
|
+
return !fItem.hideStep;
|
|
90
|
+
})[stepsConfig.current];
|
|
88
91
|
openLog && console.log('rule 0-2', ((_c = currentStepInfo === null || currentStepInfo === void 0 ? void 0 : currentStepInfo.actions) === null || _c === void 0 ? void 0 : _c.length) > 0);
|
|
89
92
|
return ((_d = currentStepInfo === null || currentStepInfo === void 0 ? void 0 : currentStepInfo.actions) === null || _d === void 0 ? void 0 : _d.length) > 0;
|
|
90
93
|
}
|
|
@@ -131,7 +134,8 @@ var StandardModal = function StandardModal(props) {
|
|
|
131
134
|
// 设置限制弹窗高度
|
|
132
135
|
var initBodyMaxHeight = function initBodyMaxHeight() {
|
|
133
136
|
var title = props.title;
|
|
134
|
-
|
|
137
|
+
// 最大高度基础值调整成页面视口高度
|
|
138
|
+
var bodyHeight = document.documentElement.clientHeight; // document.body.offsetHeight
|
|
135
139
|
var baseReduce = 80 + 32; // 默认需要减去的高度(上下空白间距150及内部内容间距16*2
|
|
136
140
|
// console.log('弹窗是否有按钮:', hasFooterBar ? '是' : '否')
|
|
137
141
|
setBodyMaxHeight("".concat(bodyHeight - (title ? 55 : 0) - (hasFooterBar ? 55 : 0) - baseReduce, "px"));
|
|
@@ -169,7 +173,6 @@ var StandardModal = function StandardModal(props) {
|
|
|
169
173
|
if (Object.prototype.hasOwnProperty.call(values, 'false')) {
|
|
170
174
|
delete values.false; // 自定义结构会莫名的出来一个false字段
|
|
171
175
|
}
|
|
172
|
-
|
|
173
176
|
var resultValues = UtilValueFormat(values, formItemGroup);
|
|
174
177
|
if (onSubmit) {
|
|
175
178
|
onSubmit(Object.assign({}, resultValues));
|
|
@@ -189,7 +192,6 @@ var StandardModal = function StandardModal(props) {
|
|
|
189
192
|
if (Object.prototype.hasOwnProperty.call(values, 'false')) {
|
|
190
193
|
delete values.false; // 自定义结构会莫名的出来一个false字段
|
|
191
194
|
}
|
|
192
|
-
|
|
193
195
|
var resultValues = UtilValueFormat(values, formItemGroup);
|
|
194
196
|
if (onSubmit) {
|
|
195
197
|
onSubmit(Object.assign({}, resultValues));
|
|
@@ -214,7 +216,6 @@ var StandardModal = function StandardModal(props) {
|
|
|
214
216
|
// modalForm.setFieldsValue(allFields) // 直接清空表单的赋值(initialValues传值如果没有前后赋值没有全部带上所有字段,则会默认又使用之前的部分未传参字段)
|
|
215
217
|
modalForm.resetFields(); // 直接使用这个无效
|
|
216
218
|
};
|
|
217
|
-
|
|
218
219
|
var onAfterClose = function onAfterClose() {
|
|
219
220
|
var afterClose = props.afterClose;
|
|
220
221
|
if (type === 'form') clearAllFieldsValue();
|
|
@@ -246,6 +247,7 @@ var StandardModal = function StandardModal(props) {
|
|
|
246
247
|
type: item.type,
|
|
247
248
|
label: item.label,
|
|
248
249
|
protoConfig: Object.assign({}, item.protoConfig)
|
|
250
|
+
// protoConfig: { className: '', ...item.protoConfig }
|
|
249
251
|
}].concat(childrenFields);
|
|
250
252
|
}
|
|
251
253
|
return /*#__PURE__*/React.createElement(_Col, {
|
|
@@ -350,7 +352,6 @@ var StandardModal = function StandardModal(props) {
|
|
|
350
352
|
}
|
|
351
353
|
}));
|
|
352
354
|
}
|
|
353
|
-
|
|
354
355
|
if (typeof footerButtonGroup === 'function') {
|
|
355
356
|
return footerButtonGroup(modalForm, props);
|
|
356
357
|
}
|
|
@@ -370,7 +371,10 @@ var StandardModal = function StandardModal(props) {
|
|
|
370
371
|
var renderFooter = function renderFooter() {
|
|
371
372
|
var _a, _b;
|
|
372
373
|
if (type === 'stepForm') {
|
|
373
|
-
|
|
374
|
+
// 过滤隐藏掉的步骤表单
|
|
375
|
+
var currentStepInfo = formItemGroup.filter(function (fItem) {
|
|
376
|
+
return !fItem.hideStep;
|
|
377
|
+
})[stepsConfig.current];
|
|
374
378
|
return ((_a = currentStepInfo === null || currentStepInfo === void 0 ? void 0 : currentStepInfo.actions) === null || _a === void 0 ? void 0 : _a.length) > 0 ? /*#__PURE__*/React.createElement(ActionList, {
|
|
375
379
|
list: currentStepInfo.actions || [],
|
|
376
380
|
onStep: handleStepType,
|
|
@@ -392,7 +396,7 @@ var StandardModal = function StandardModal(props) {
|
|
|
392
396
|
};
|
|
393
397
|
// 内容渲染
|
|
394
398
|
var renderChildrenNodes = function renderChildrenNodes() {
|
|
395
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, children, (type === 'form' || type === 'gridForm') && /*#__PURE__*/React.createElement(_Form, {
|
|
399
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, children, (type === 'form' || type === 'gridForm') && (/*#__PURE__*/React.createElement(_Form, {
|
|
396
400
|
layout: formLayout,
|
|
397
401
|
ref: setModalFormRef,
|
|
398
402
|
form: modalForm,
|
|
@@ -401,7 +405,7 @@ var StandardModal = function StandardModal(props) {
|
|
|
401
405
|
// initialValues={{ ...initialValues }}
|
|
402
406
|
scrollToFirstError: true,
|
|
403
407
|
className: "modalForm"
|
|
404
|
-
}, formPrefix && /*#__PURE__*/React.createElement(_Row, null, formPrefix(modalForm, props, forceUpdateForm)), formItemGroup ? renderFormItemGroup() : null, formPostfix && /*#__PURE__*/React.createElement(_Row, null, formPostfix(modalForm, props, forceUpdateForm), " ")), type === 'tabForm' && /*#__PURE__*/React.createElement(TabForm, {
|
|
408
|
+
}, formPrefix && /*#__PURE__*/React.createElement(_Row, null, formPrefix(modalForm, props, forceUpdateForm)), formItemGroup ? renderFormItemGroup() : null, formPostfix && /*#__PURE__*/React.createElement(_Row, null, formPostfix(modalForm, props, forceUpdateForm), " "))), type === 'tabForm' && (/*#__PURE__*/React.createElement(TabForm, {
|
|
405
409
|
grid: size,
|
|
406
410
|
layout: formLayout,
|
|
407
411
|
fieldStatus: fieldStatus,
|
|
@@ -416,7 +420,7 @@ var StandardModal = function StandardModal(props) {
|
|
|
416
420
|
onSubmit: handleSubmit,
|
|
417
421
|
initialValues: Object.assign({}, initialValues),
|
|
418
422
|
displayLayout: displayLayout
|
|
419
|
-
}), type === 'stepForm' && /*#__PURE__*/React.createElement(StepForm, {
|
|
423
|
+
})), type === 'stepForm' && (/*#__PURE__*/React.createElement(StepForm, {
|
|
420
424
|
grid: size,
|
|
421
425
|
layout: formLayout,
|
|
422
426
|
fieldStatus: fieldStatus,
|
|
@@ -431,11 +435,11 @@ var StandardModal = function StandardModal(props) {
|
|
|
431
435
|
onSubmit: handleSubmit,
|
|
432
436
|
initialValues: Object.assign({}, initialValues),
|
|
433
437
|
displayLayout: displayLayout
|
|
434
|
-
}));
|
|
438
|
+
})));
|
|
435
439
|
};
|
|
436
440
|
// 可拖动及缩放
|
|
437
441
|
if (dragAble) {
|
|
438
|
-
return /*#__PURE__*/React.createElement(
|
|
442
|
+
return /*#__PURE__*/React.createElement(DraggableModalProvider, null, /*#__PURE__*/React.createElement(DraggableModal, Object.assign({
|
|
439
443
|
destroyOnClose: true,
|
|
440
444
|
initialWidth: otherProps.width || general.modalSize[size].width,
|
|
441
445
|
initialHeight: otherProps.height,
|
|
@@ -448,26 +452,8 @@ var StandardModal = function StandardModal(props) {
|
|
|
448
452
|
onOk: handleSubmit,
|
|
449
453
|
title: title,
|
|
450
454
|
footer: renderFooter()
|
|
451
|
-
}), renderChildrenNodes());
|
|
452
|
-
/* return <DraggableModalProvider>
|
|
453
|
-
<DraggableModal destroyOnClose
|
|
454
|
-
initialWidth={otherProps.width || general.modalSize[size].width}
|
|
455
|
-
initialHeight={otherProps.height}
|
|
456
|
-
zIndex={1001}
|
|
457
|
-
{...otherProps}
|
|
458
|
-
visible={visible}
|
|
459
|
-
className={`standardModal ${className || ''} ${fieldStatus === 'viewOnly' ? 'is-view' : ''}`}
|
|
460
|
-
onCancel={handleCancel}
|
|
461
|
-
afterClose={onAfterClose}
|
|
462
|
-
onOk={handleSubmit}
|
|
463
|
-
title={title}
|
|
464
|
-
footer={renderFooter()}
|
|
465
|
-
>
|
|
466
|
-
{renderChildrenNodes()}
|
|
467
|
-
</DraggableModal>
|
|
468
|
-
</DraggableModalProvider>*/
|
|
455
|
+
}), renderChildrenNodes()));
|
|
469
456
|
}
|
|
470
|
-
|
|
471
457
|
return /*#__PURE__*/React.createElement(_Modal, Object.assign({
|
|
472
458
|
destroyOnClose: true,
|
|
473
459
|
maskClosable: false,
|
|
@@ -24,5 +24,5 @@ interface badgesListProps {
|
|
|
24
24
|
label?: string[] | any;
|
|
25
25
|
color?: string;
|
|
26
26
|
}
|
|
27
|
-
declare const StandardPanel: (props: StandardPanelProps) => JSX.Element;
|
|
27
|
+
declare const StandardPanel: (props: StandardPanelProps) => React.JSX.Element;
|
|
28
28
|
export default StandardPanel;
|
|
@@ -2,12 +2,12 @@ import "antd/es/popover/style";
|
|
|
2
2
|
import _Popover from "antd/es/popover";
|
|
3
3
|
import "antd/es/radio/style";
|
|
4
4
|
import _Radio from "antd/es/radio";
|
|
5
|
-
function _slicedToArray(
|
|
5
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
6
6
|
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."); }
|
|
7
|
-
function _unsupportedIterableToArray(
|
|
8
|
-
function _arrayLikeToArray(
|
|
9
|
-
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)
|
|
10
|
-
function _arrayWithHoles(
|
|
7
|
+
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; } }
|
|
8
|
+
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; }
|
|
9
|
+
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; } }
|
|
10
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
11
11
|
import React, { useState, useMemo, useRef, useEffect } from 'react';
|
|
12
12
|
import classNames from 'classnames';
|
|
13
13
|
import './style/index.less';
|
|
@@ -57,10 +57,10 @@ var StandardPanel = function StandardPanel(props) {
|
|
|
57
57
|
};
|
|
58
58
|
// 是否显示提示框
|
|
59
59
|
var popoverShow = function popoverShow() {
|
|
60
|
-
return title.content ? /*#__PURE__*/React.createElement(_Popover, {
|
|
60
|
+
return title.content ? (/*#__PURE__*/React.createElement(_Popover, {
|
|
61
61
|
content: title.content,
|
|
62
62
|
placement: title.placement
|
|
63
|
-
}, " ", title.label, " ") : title;
|
|
63
|
+
}, " ", title.label, " ")) : title;
|
|
64
64
|
};
|
|
65
65
|
var panelHeaderRef = useRef();
|
|
66
66
|
var bodyLimitStyle = useMemo(function () {
|
|
@@ -3,26 +3,34 @@ import _Table from "antd/es/table";
|
|
|
3
3
|
import "antd/es/card/style";
|
|
4
4
|
import _Card from "antd/es/card";
|
|
5
5
|
import { __rest } from "tslib";
|
|
6
|
-
import React from 'react';
|
|
6
|
+
import React, { useContext } from 'react';
|
|
7
7
|
import classNames from 'classnames';
|
|
8
8
|
import ButtonGroup from '../ButtonGroup/index';
|
|
9
9
|
import './style/index.less';
|
|
10
|
+
import { FanContext } from '../ConfigContext';
|
|
10
11
|
var StandardTable = function StandardTable(props) {
|
|
12
|
+
var InitFanContext = useContext(FanContext);
|
|
13
|
+
var providerConfig = InitFanContext['StandardTable'] || {}; // 使用上下文(全局配置)设置扩展的配置项
|
|
11
14
|
// const ref= React.createRef<Card>();
|
|
12
|
-
var
|
|
13
|
-
data =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
orderNumber =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
var _a = Object.assign(Object.assign({}, providerConfig), props),
|
|
16
|
+
_a$data = _a.data,
|
|
17
|
+
data = _a$data === void 0 ? {} : _a$data,
|
|
18
|
+
rowKey = _a.rowKey,
|
|
19
|
+
rowSelection = _a.rowSelection,
|
|
20
|
+
columns = _a.columns,
|
|
21
|
+
hideOrderNumber = _a.hideOrderNumber,
|
|
22
|
+
_a$orderNumber = _a.orderNumber,
|
|
23
|
+
orderNumber = _a$orderNumber === void 0 ? {} : _a$orderNumber,
|
|
24
|
+
className = _a.className,
|
|
25
|
+
emptyText = _a.emptyText,
|
|
26
|
+
codes = _a.codes,
|
|
27
|
+
permissionCodes = _a.permissionCodes,
|
|
28
|
+
_a$columnsConfig = _a.columnsConfig,
|
|
29
|
+
columnsConfig = _a$columnsConfig === void 0 ? {} : _a$columnsConfig,
|
|
30
|
+
rest = __rest(_a, ["data", "rowKey", "rowSelection", "columns", "hideOrderNumber", "orderNumber", "className", "emptyText", "codes", "permissionCodes", "columnsConfig"]);
|
|
31
|
+
|
|
32
|
+
// 加上类型修复 TS:2322 报警
|
|
33
|
+
var resetColumns = [Object.assign(Object.assign({
|
|
26
34
|
width: 58,
|
|
27
35
|
align: 'center',
|
|
28
36
|
title: '序号',
|
|
@@ -32,7 +40,7 @@ var StandardTable = function StandardTable(props) {
|
|
|
32
40
|
render: function render(text, record, index) {
|
|
33
41
|
return index + 1;
|
|
34
42
|
}
|
|
35
|
-
}, orderNumber)];
|
|
43
|
+
}, (columnsConfig === null || columnsConfig === void 0 ? void 0 : columnsConfig.orderNumber) || {}), orderNumber)];
|
|
36
44
|
var _data$list = data.list,
|
|
37
45
|
list = _data$list === void 0 ? [] : _data$list,
|
|
38
46
|
pagination = data.pagination;
|
|
@@ -46,12 +54,17 @@ var StandardTable = function StandardTable(props) {
|
|
|
46
54
|
}
|
|
47
55
|
}, pagination);
|
|
48
56
|
if (columns) {
|
|
49
|
-
columns.map(function (colItem) {
|
|
57
|
+
var recombinationColumns = columns.map(function (colItem) {
|
|
58
|
+
var action = columnsConfig.action,
|
|
59
|
+
otherColumn = columnsConfig.otherColumn;
|
|
50
60
|
if (colItem.type === 'action') {
|
|
51
|
-
colItem.width = colItem.width || (colItem.buttonGroup.length > 1 ? 120 : 80);
|
|
52
|
-
colItem.align = 'center';
|
|
53
|
-
colItem.title = colItem.title || '操作';
|
|
61
|
+
colItem.width = (colItem === null || colItem === void 0 ? void 0 : colItem.width) || (action === null || action === void 0 ? void 0 : action.width) || (colItem.buttonGroup.length > 1 ? 120 : 80);
|
|
62
|
+
colItem.align = (colItem === null || colItem === void 0 ? void 0 : colItem.align) || (action === null || action === void 0 ? void 0 : action.align) || 'center';
|
|
63
|
+
colItem.title = (colItem === null || colItem === void 0 ? void 0 : colItem.title) || (action === null || action === void 0 ? void 0 : action.title) || '操作';
|
|
54
64
|
colItem.key = 'control';
|
|
65
|
+
colItem = Object.assign(Object.assign(Object.assign({}, action || {}), colItem), {
|
|
66
|
+
ellipsis: false
|
|
67
|
+
}); // Object.assign(action || {}, colItem, { ellipsis: false }) // 操作列不配置ellipsis
|
|
55
68
|
// colItem.fixed = colItem.fixed || 'right'
|
|
56
69
|
colItem.render = function (text, record, rowIndex) {
|
|
57
70
|
// 按钮列表组
|
|
@@ -76,7 +89,9 @@ var StandardTable = function StandardTable(props) {
|
|
|
76
89
|
record: record,
|
|
77
90
|
rowIndex: rowIndex
|
|
78
91
|
},
|
|
79
|
-
dropdownConfig: colItem.buttonGroupConfig || {}
|
|
92
|
+
dropdownConfig: colItem.buttonGroupConfig || {},
|
|
93
|
+
moreText: colItem === null || colItem === void 0 ? void 0 : colItem.moreText,
|
|
94
|
+
moreIcon: colItem === null || colItem === void 0 ? void 0 : colItem.moreIcon
|
|
80
95
|
});
|
|
81
96
|
} else {
|
|
82
97
|
return buttonGroup;
|
|
@@ -84,25 +99,28 @@ var StandardTable = function StandardTable(props) {
|
|
|
84
99
|
};
|
|
85
100
|
return /*#__PURE__*/React.createElement(React.Fragment, null, renderTableButtonGroup(colItem.buttonGroup));
|
|
86
101
|
};
|
|
102
|
+
return Object.assign({}, colItem);
|
|
87
103
|
} else if (!colItem.render) {
|
|
88
104
|
// 若未配置render,则给加个默认的返回方法
|
|
89
105
|
colItem.render = function (text, record, rowIndex) {
|
|
90
106
|
return text || text === 0 ? text : '-';
|
|
91
107
|
};
|
|
92
|
-
return colItem;
|
|
108
|
+
// return Object.assign({ ellipsis: undefined, render: undefined }, { ...otherColumns, ...colItem }); // ellipsis要配置在render之前
|
|
109
|
+
return Object.assign(Object.assign({}, otherColumn), colItem);
|
|
93
110
|
}
|
|
94
|
-
return colItem
|
|
111
|
+
// return Object.assign({ ellipsis: undefined, render: undefined }, { ...otherColumns, ...colItem }) // ellipsis要配置在render之前
|
|
112
|
+
return Object.assign(Object.assign({}, otherColumn), colItem);
|
|
95
113
|
});
|
|
96
|
-
resetColumns = hideOrderNumber ?
|
|
114
|
+
resetColumns = hideOrderNumber ? recombinationColumns : resetColumns.concat(recombinationColumns);
|
|
97
115
|
}
|
|
98
116
|
return /*#__PURE__*/React.createElement(_Card, {
|
|
99
117
|
className: classNames('standard-table', className),
|
|
100
118
|
bordered: false
|
|
101
119
|
}, /*#__PURE__*/React.createElement(_Table, Object.assign({
|
|
102
120
|
rowKey: rowKey || 'id',
|
|
103
|
-
rowSelection: rowSelection ? Object.assign(
|
|
121
|
+
rowSelection: rowSelection ? Object.assign({
|
|
104
122
|
columnWidth: 30
|
|
105
|
-
}) : rowSelection,
|
|
123
|
+
}, rowSelection) : rowSelection,
|
|
106
124
|
dataSource: list,
|
|
107
125
|
pagination: !pagination ? false : paginationProps,
|
|
108
126
|
columns: resetColumns,
|
|
@@ -12,5 +12,5 @@ import React from "react";
|
|
|
12
12
|
interface IconNodeProps {
|
|
13
13
|
icon?: string | string[] | React.ReactNode;
|
|
14
14
|
}
|
|
15
|
-
declare const IconNode: (props: IconNodeProps) => JSX.Element;
|
|
15
|
+
declare const IconNode: (props: IconNodeProps) => React.JSX.Element;
|
|
16
16
|
export default IconNode;
|
|
@@ -72,6 +72,8 @@ export default {
|
|
|
72
72
|
// 弹窗梯度大小及对应的表单栅格
|
|
73
73
|
modalSize: {
|
|
74
74
|
xs: {
|
|
75
|
+
columnNumber: 1,
|
|
76
|
+
// 栅格列数量
|
|
75
77
|
width: 420,
|
|
76
78
|
formLayout: {
|
|
77
79
|
labelCol: {
|
|
@@ -91,6 +93,8 @@ export default {
|
|
|
91
93
|
}
|
|
92
94
|
},
|
|
93
95
|
sm: {
|
|
96
|
+
columnNumber: 1,
|
|
97
|
+
// 栅格列数量
|
|
94
98
|
width: 680,
|
|
95
99
|
formLayout: {
|
|
96
100
|
labelCol: {
|
|
@@ -110,6 +114,8 @@ export default {
|
|
|
110
114
|
}
|
|
111
115
|
},
|
|
112
116
|
md: {
|
|
117
|
+
columnNumber: 2,
|
|
118
|
+
// 栅格列数量
|
|
113
119
|
width: 780,
|
|
114
120
|
formLayout: {
|
|
115
121
|
labelCol: {
|
|
@@ -130,6 +136,8 @@ export default {
|
|
|
130
136
|
},
|
|
131
137
|
// 宽度大,1000px下
|
|
132
138
|
lg: {
|
|
139
|
+
columnNumber: 3,
|
|
140
|
+
// 栅格列数量
|
|
133
141
|
width: 1000,
|
|
134
142
|
formLayout: {
|
|
135
143
|
labelCol: {
|
|
@@ -150,6 +158,8 @@ export default {
|
|
|
150
158
|
},
|
|
151
159
|
// 超级宽度大,1200px下
|
|
152
160
|
xlg: {
|
|
161
|
+
columnNumber: 3,
|
|
162
|
+
// 栅格列数量
|
|
153
163
|
width: 1200,
|
|
154
164
|
formLayout: {
|
|
155
165
|
labelCol: {
|
|
@@ -167,6 +177,27 @@ export default {
|
|
|
167
177
|
span: 21
|
|
168
178
|
}
|
|
169
179
|
}
|
|
180
|
+
},
|
|
181
|
+
xxlg: {
|
|
182
|
+
columnNumber: 4,
|
|
183
|
+
// 栅格列数量
|
|
184
|
+
width: 1400,
|
|
185
|
+
formLayout: {
|
|
186
|
+
labelCol: {
|
|
187
|
+
span: 8
|
|
188
|
+
},
|
|
189
|
+
wrapperCol: {
|
|
190
|
+
span: 16
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
formBlockLayout: {
|
|
194
|
+
labelCol: {
|
|
195
|
+
span: 2
|
|
196
|
+
},
|
|
197
|
+
wrapperCol: {
|
|
198
|
+
span: 22
|
|
199
|
+
}
|
|
200
|
+
}
|
|
170
201
|
}
|
|
171
202
|
}
|
|
172
203
|
};
|
package/es/index.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export { default as StepForm } from './StandardForm/StepForm';
|
|
|
8
8
|
export { default as TabForm } from './StandardForm/TabForm';
|
|
9
9
|
export { default as StandardFilter } from './StandardFilter';
|
|
10
10
|
export { default as StandardModal } from './StandardModal';
|
|
11
|
-
export { default as StandardDragModal } from './StandardDragModal/Modal';
|
|
12
11
|
export { default as Uploader } from './FormComp/Uploader';
|
|
13
12
|
export { default as EditButton } from './FormComp/EditButton';
|
|
14
13
|
export { default as FieldComponent } from './FormComp/FieldComponent';
|
|
@@ -23,3 +22,6 @@ export { default as NavLeafScroll } from './NavLeafScroll';
|
|
|
23
22
|
export * from './components';
|
|
24
23
|
export * from './utils';
|
|
25
24
|
export * from './data';
|
|
25
|
+
export * from './ConfigContext';
|
|
26
|
+
export { default as ImageGallery } from './ImageGallery/index';
|
|
27
|
+
export { default as ImagePreview } from './ImageGallery/ImagePreview';
|
package/es/index.js
CHANGED
|
@@ -9,7 +9,6 @@ export { default as StepForm } from './StandardForm/StepForm';
|
|
|
9
9
|
export { default as TabForm } from './StandardForm/TabForm';
|
|
10
10
|
export { default as StandardFilter } from './StandardFilter';
|
|
11
11
|
export { default as StandardModal } from './StandardModal';
|
|
12
|
-
export { default as StandardDragModal } from './StandardDragModal/Modal';
|
|
13
12
|
export { default as Uploader } from './FormComp/Uploader';
|
|
14
13
|
export { default as EditButton } from './FormComp/EditButton';
|
|
15
14
|
// 基础控件
|
|
@@ -29,4 +28,9 @@ export * from './components';
|
|
|
29
28
|
// 工具类
|
|
30
29
|
export * from './utils';
|
|
31
30
|
// 数据类
|
|
32
|
-
export * from './data';
|
|
31
|
+
export * from './data';
|
|
32
|
+
// 上下文
|
|
33
|
+
export * from './ConfigContext';
|
|
34
|
+
// 图集
|
|
35
|
+
export { default as ImageGallery } from './ImageGallery/index';
|
|
36
|
+
export { default as ImagePreview } from './ImageGallery/ImagePreview';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2
2
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3
|
-
function _defineProperty(
|
|
4
|
-
function _toPropertyKey(
|
|
5
|
-
function _toPrimitive(
|
|
3
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
6
|
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); }
|
|
7
7
|
import _ from "lodash";
|
|
8
8
|
// 按钮方法
|
|
@@ -18,7 +18,6 @@ var btnClickFunc = function btnClickFunc(fn) {
|
|
|
18
18
|
if (typeof fn === 'function') {
|
|
19
19
|
return fn.apply(void 0, paramsArr); // 表格列返回的是方法
|
|
20
20
|
}
|
|
21
|
-
|
|
22
21
|
return fn;
|
|
23
22
|
};
|
|
24
23
|
// 按钮是否禁用
|
|
@@ -34,7 +33,6 @@ var btnIsDisabled = function btnIsDisabled(isDisabled) {
|
|
|
34
33
|
if (typeof isDisabled === 'function') {
|
|
35
34
|
return isDisabled.apply(void 0, paramsArr); // 表格列返回的是方法
|
|
36
35
|
}
|
|
37
|
-
|
|
38
36
|
return isDisabled;
|
|
39
37
|
};
|
|
40
38
|
// 按钮是否隐藏
|
|
@@ -50,14 +48,13 @@ var btnIsHide = function btnIsHide(isHide) {
|
|
|
50
48
|
if (typeof isHide === 'function') {
|
|
51
49
|
return isHide.apply(void 0, paramsArr); // 表格列返回的是方法
|
|
52
50
|
}
|
|
53
|
-
|
|
54
51
|
return isHide;
|
|
55
52
|
};
|
|
56
53
|
// 重新组合数据(排除不包含在permissionCodes内及isHide数据
|
|
57
|
-
var
|
|
54
|
+
var _removeNoPermission = function removeNoPermission(array, permissionCodes, codes, params) {
|
|
58
55
|
return Array.isArray(array) && array.filter(function (item) {
|
|
59
56
|
if (item.children) {
|
|
60
|
-
item.children =
|
|
57
|
+
item.children = _removeNoPermission(item.children, permissionCodes, codes, params);
|
|
61
58
|
if (item.children.length === 0) return false; // 如果子集合过滤为空时,不返当前数据
|
|
62
59
|
}
|
|
63
60
|
// permissionCodes未定义,则直接返回不进行过滤
|
|
@@ -83,11 +80,11 @@ var removeNoPermission = function removeNoPermission(array, permissionCodes, cod
|
|
|
83
80
|
var _codes$matchIndex;
|
|
84
81
|
// 如果有配置code,则使用func.code.js里面配置的名称
|
|
85
82
|
resultItem = _objectSpread(_objectSpread(_objectSpread({}, resultItem), codes[matchIndex]), {}, {
|
|
86
|
-
icon: resultItem.icon || ((_codes$matchIndex = codes[matchIndex]) === null || _codes$matchIndex === void 0 ? void 0 : _codes$matchIndex.icon)
|
|
83
|
+
icon: resultItem.icon === '' || resultItem.icon === null ? resultItem.icon : resultItem.icon || ((_codes$matchIndex = codes[matchIndex]) === null || _codes$matchIndex === void 0 ? void 0 : _codes$matchIndex.icon)
|
|
87
84
|
});
|
|
88
85
|
}
|
|
89
86
|
}
|
|
90
87
|
return resultItem;
|
|
91
88
|
});
|
|
92
89
|
};
|
|
93
|
-
export { removeNoPermission, btnIsHide, btnIsDisabled, btnClickFunc };
|
|
90
|
+
export { _removeNoPermission as removeNoPermission, btnIsHide, btnIsDisabled, btnClickFunc };
|