antd-management-fast-framework 1.11.20 → 1.11.33
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/es/customComponents/FunctionComponent/index.d.ts +1 -0
- package/es/customComponents/FunctionComponent/index.js +42 -16
- package/es/customComponents/HtmlBox/index.d.ts +6 -0
- package/es/customComponents/HtmlBox/index.js +24 -4
- package/es/framework/AuthorizationWrapper/index.d.ts +0 -1
- package/es/framework/AuthorizationWrapper/index.js +0 -4
- package/es/framework/Common/index.d.ts +1 -0
- package/es/framework/Common/index.js +62 -0
- package/es/framework/DataListView/Base/index.d.ts +9 -0
- package/es/framework/DataListView/Base/index.js +164 -9
- package/es/framework/DataMultiPageView/MultiPageDrawer/index.js +4 -10
- package/es/framework/DataSinglePageView/SinglePageDrawer/index.js +17 -6
- package/es/utils/constants.d.ts +21 -7
- package/es/utils/constants.js +23 -2
- package/es/utils/tools.d.ts +8 -0
- package/es/utils/tools.js +108 -76
- package/package.json +12 -12
|
@@ -76,6 +76,7 @@ export function buildMenu({ handleData: r, handleMenuClick, menuItems, }: {
|
|
|
76
76
|
handleMenuClick?: (() => void) | undefined;
|
|
77
77
|
menuItems?: any[] | undefined;
|
|
78
78
|
}): JSX.Element;
|
|
79
|
+
export function buildTree(props: any): JSX.Element;
|
|
79
80
|
export function buildCustomGrid({ key, list, props }: {
|
|
80
81
|
key?: any;
|
|
81
82
|
list: any;
|
|
@@ -54,6 +54,7 @@ exports.buildSearchInput = buildSearchInput;
|
|
|
54
54
|
exports.buildSearchInputNumber = buildSearchInputNumber;
|
|
55
55
|
exports.buildSyntaxHighlighter = buildSyntaxHighlighter;
|
|
56
56
|
exports.buildTagList = buildTagList;
|
|
57
|
+
exports.buildTree = buildTree;
|
|
57
58
|
exports.empty = empty;
|
|
58
59
|
exports.pageHeaderExtraContent = pageHeaderExtraContent;
|
|
59
60
|
|
|
@@ -89,6 +90,10 @@ require("antd/es/col/style");
|
|
|
89
90
|
|
|
90
91
|
var _col = _interopRequireDefault(require("antd/es/col"));
|
|
91
92
|
|
|
93
|
+
require("antd/es/tree/style");
|
|
94
|
+
|
|
95
|
+
var _tree = _interopRequireDefault(require("antd/es/tree"));
|
|
96
|
+
|
|
92
97
|
require("antd/es/menu/style");
|
|
93
98
|
|
|
94
99
|
var _menu = _interopRequireDefault(require("antd/es/menu"));
|
|
@@ -915,6 +920,10 @@ function buildMenu(_ref5) {
|
|
|
915
920
|
}));
|
|
916
921
|
}
|
|
917
922
|
|
|
923
|
+
function buildTree(props) {
|
|
924
|
+
return /*#__PURE__*/_react.default.createElement(_tree.default, props);
|
|
925
|
+
}
|
|
926
|
+
|
|
918
927
|
function buildCustomGrid(_ref7) {
|
|
919
928
|
var _ref7$key = _ref7.key,
|
|
920
929
|
key = _ref7$key === void 0 ? null : _ref7$key,
|
|
@@ -941,7 +950,8 @@ function buildCustomGrid(_ref7) {
|
|
|
941
950
|
emptyStyle: null,
|
|
942
951
|
bordered: false,
|
|
943
952
|
colon: true,
|
|
944
|
-
size: null
|
|
953
|
+
size: null,
|
|
954
|
+
ellipsis: true
|
|
945
955
|
}), props || {}),
|
|
946
956
|
title = _title$column$labelSt.title,
|
|
947
957
|
columnSource = _title$column$labelSt.column,
|
|
@@ -951,7 +961,8 @@ function buildCustomGrid(_ref7) {
|
|
|
951
961
|
globalEmptyStyle = _title$column$labelSt.emptyStyle,
|
|
952
962
|
borderedSource = _title$column$labelSt.bordered,
|
|
953
963
|
colonSource = _title$column$labelSt.colon,
|
|
954
|
-
sizeSource = _title$column$labelSt.size
|
|
964
|
+
sizeSource = _title$column$labelSt.size,
|
|
965
|
+
ellipsis = _title$column$labelSt.ellipsis;
|
|
955
966
|
|
|
956
967
|
if (!(0, _tools.isNumber)(columnSource)) {
|
|
957
968
|
column = 3;
|
|
@@ -989,11 +1000,13 @@ function buildCustomGrid(_ref7) {
|
|
|
989
1000
|
borderTop: '1px solid #f0f0f0',
|
|
990
1001
|
borderLeft: '1px solid #f0f0f0'
|
|
991
1002
|
} : null;
|
|
992
|
-
|
|
1003
|
+
|
|
1004
|
+
var labelStyle = _objectSpread(_objectSpread(_objectSpread({}, {
|
|
993
1005
|
width: '180px'
|
|
994
|
-
}), labelStyleSource || {}), {
|
|
1006
|
+
}), labelStyleSource || {}), bordered ? {
|
|
995
1007
|
margin: margin
|
|
996
|
-
}
|
|
1008
|
+
} : {});
|
|
1009
|
+
|
|
997
1010
|
var contentStyle = bordered ? _objectSpread(_objectSpread(_objectSpread({}, {
|
|
998
1011
|
margin: '16px 24px'
|
|
999
1012
|
}), contentStyleSource || {}), {
|
|
@@ -1071,15 +1084,16 @@ function buildCustomGrid(_ref7) {
|
|
|
1071
1084
|
borderRight: '1px solid #f0f0f0'
|
|
1072
1085
|
} : {}),
|
|
1073
1086
|
right: /*#__PURE__*/_react.default.createElement("div", {
|
|
1074
|
-
style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, contentStyle), isEmpty ? globalEmptyStyle || {} : {}), isEmpty ? itemEmptyStyle || {} : {}), {
|
|
1087
|
+
style: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, contentStyle), isEmpty ? globalEmptyStyle || {} : {}), isEmpty ? itemEmptyStyle || {} : {}), {
|
|
1075
1088
|
WebkitBoxOrient: 'vertical',
|
|
1076
|
-
WebkitLineClamp: '1',
|
|
1077
1089
|
overflow: 'hidden',
|
|
1078
1090
|
display: '-webkit-box',
|
|
1079
1091
|
textOverflow: 'ellipsis',
|
|
1080
1092
|
wordBreak: 'break-all',
|
|
1081
1093
|
whiteSpace: 'normal'
|
|
1082
|
-
})
|
|
1094
|
+
}), ellipsis ? {
|
|
1095
|
+
WebkitLineClamp: '1'
|
|
1096
|
+
} : {})
|
|
1083
1097
|
}, v, itemCanCopy && (itemCanCopy || null) != null ? /*#__PURE__*/_react.default.createElement("a", {
|
|
1084
1098
|
style: {
|
|
1085
1099
|
marginLeft: '10px'
|
|
@@ -1296,7 +1310,11 @@ function buildMenuHeaderRender(_ref10) {
|
|
|
1296
1310
|
collapsed = _ref10.collapsed,
|
|
1297
1311
|
navTheme = _ref10.navTheme,
|
|
1298
1312
|
shortName = _ref10.shortName;
|
|
1299
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
1313
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1314
|
+
style: {
|
|
1315
|
+
overflow: 'hidden'
|
|
1316
|
+
}
|
|
1317
|
+
}, /*#__PURE__*/_react.default.createElement(_FlexBox.default, {
|
|
1300
1318
|
flexAuto: "right",
|
|
1301
1319
|
left: logoDom,
|
|
1302
1320
|
right: collapsed ? null : /*#__PURE__*/_react.default.createElement(_VerticalBox.default, {
|
|
@@ -1305,21 +1323,20 @@ function buildMenuHeaderRender(_ref10) {
|
|
|
1305
1323
|
style: {
|
|
1306
1324
|
height: '100%'
|
|
1307
1325
|
}
|
|
1308
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
1309
|
-
level: 1,
|
|
1326
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
1310
1327
|
style: _objectSpread(_objectSpread({}, {
|
|
1311
1328
|
margin: ' 0 0 0 12px',
|
|
1312
1329
|
fontSize: '20px',
|
|
1313
1330
|
color: 'white',
|
|
1314
1331
|
fontWeight: '600',
|
|
1315
|
-
lineHeight: '32px'
|
|
1332
|
+
lineHeight: '32px',
|
|
1333
|
+
overflow: 'hidden',
|
|
1334
|
+
height: '100%',
|
|
1335
|
+
whiteSpace: 'nowrap'
|
|
1316
1336
|
}), navTheme === 'light' ? {
|
|
1317
1337
|
color: '#000000d9'
|
|
1318
1338
|
} : {})
|
|
1319
|
-
},
|
|
1320
|
-
type: "alpha",
|
|
1321
|
-
mode: "smooth"
|
|
1322
|
-
}, shortName || '应用简称')))
|
|
1339
|
+
}, shortName || '应用简称'))
|
|
1323
1340
|
}));
|
|
1324
1341
|
}
|
|
1325
1342
|
|
|
@@ -2910,6 +2927,15 @@ function buildColumnItem(_ref49) {
|
|
|
2910
2927
|
}));
|
|
2911
2928
|
}
|
|
2912
2929
|
|
|
2930
|
+
if (facadeMode === _constants.columnFacadeMode.dropdown) {
|
|
2931
|
+
if (!(0, _tools.isFunction)(d.configBuilder)) {
|
|
2932
|
+
return null;
|
|
2933
|
+
}
|
|
2934
|
+
|
|
2935
|
+
var operateConfig = d.configBuilder(value, record, index);
|
|
2936
|
+
return buildDropdown(operateConfig);
|
|
2937
|
+
}
|
|
2938
|
+
|
|
2913
2939
|
throw new Error("\u65E0\u6548\u7684\u6E32\u67D3\u6A21\u5F0F\uFF1A".concat(facadeMode));
|
|
2914
2940
|
};
|
|
2915
2941
|
}
|
|
@@ -8,4 +8,10 @@ declare class HtmlBox extends React.PureComponent<any, any, any> {
|
|
|
8
8
|
renderToHtml: () => void;
|
|
9
9
|
main: HTMLSpanElement | null | undefined;
|
|
10
10
|
}
|
|
11
|
+
declare namespace HtmlBox {
|
|
12
|
+
export namespace defaultProps {
|
|
13
|
+
export const useEmpty: boolean;
|
|
14
|
+
export const html: string;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
11
17
|
import React from "react";
|
|
@@ -7,16 +7,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
|
|
10
|
+
require("antd/es/empty/style");
|
|
11
|
+
|
|
12
|
+
var _empty = _interopRequireDefault(require("antd/es/empty"));
|
|
13
|
+
|
|
10
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
15
|
|
|
12
|
-
var
|
|
16
|
+
var _tools = require("../../utils/tools");
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
var _index = _interopRequireDefault(require("./index.less"));
|
|
15
19
|
|
|
16
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
21
|
|
|
18
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
23
|
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
|
|
20
26
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
27
|
|
|
22
28
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -57,10 +63,10 @@ var HtmlBox = /*#__PURE__*/function (_PureComponent) {
|
|
|
57
63
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
58
64
|
|
|
59
65
|
_this.renderToHtml = function () {
|
|
60
|
-
var
|
|
66
|
+
var html = _this.props.html;
|
|
61
67
|
|
|
62
68
|
if (_this.main) {
|
|
63
|
-
_this.main.innerHTML =
|
|
69
|
+
_this.main.innerHTML = html;
|
|
64
70
|
}
|
|
65
71
|
};
|
|
66
72
|
|
|
@@ -82,6 +88,16 @@ var HtmlBox = /*#__PURE__*/function (_PureComponent) {
|
|
|
82
88
|
value: function render() {
|
|
83
89
|
var _this2 = this;
|
|
84
90
|
|
|
91
|
+
var _this$props = this.props,
|
|
92
|
+
useEmpty = _this$props.useEmpty,
|
|
93
|
+
html = _this$props.html;
|
|
94
|
+
|
|
95
|
+
if (!!useEmpty && (0, _tools.stringIsNullOrWhiteSpace)(html)) {
|
|
96
|
+
return /*#__PURE__*/_react.default.createElement(_empty.default, {
|
|
97
|
+
image: _empty.default.PRESENTED_IMAGE_SIMPLE
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
85
101
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
86
102
|
className: _index.default.richTextBox,
|
|
87
103
|
ref: function ref(_ref) {
|
|
@@ -94,5 +110,9 @@ var HtmlBox = /*#__PURE__*/function (_PureComponent) {
|
|
|
94
110
|
return HtmlBox;
|
|
95
111
|
}(_react.PureComponent);
|
|
96
112
|
|
|
113
|
+
HtmlBox.defaultProps = {
|
|
114
|
+
useEmpty: true,
|
|
115
|
+
html: ''
|
|
116
|
+
};
|
|
97
117
|
var _default = HtmlBox;
|
|
98
118
|
exports.default = _default;
|
|
@@ -3,7 +3,6 @@ declare class AuthorizationWrapper extends SupplementWrapper {
|
|
|
3
3
|
componentAuthority: any;
|
|
4
4
|
doDidMountTask: () => void;
|
|
5
5
|
checkAuthority: (auth: any) => boolean;
|
|
6
|
-
checkAuthorities: (auth: any) => any;
|
|
7
6
|
getCurrentOperator: () => any;
|
|
8
7
|
reloadCurrentOperator: (callback?: any) => void;
|
|
9
8
|
}
|
|
@@ -83,10 +83,6 @@ var AuthorizationWrapper = /*#__PURE__*/function (_SupplementWrapper) {
|
|
|
83
83
|
return (0, _authority.checkHasAuthority)(auth);
|
|
84
84
|
};
|
|
85
85
|
|
|
86
|
-
_this.checkAuthorities = function (auth) {
|
|
87
|
-
return (0, _authority.checkHasAuthorities)(auth);
|
|
88
|
-
};
|
|
89
|
-
|
|
90
86
|
_this.getCurrentOperator = function () {
|
|
91
87
|
var currentOperator = _this.props.global.currentOperator;
|
|
92
88
|
return currentOperator;
|
|
@@ -79,6 +79,8 @@ var _QueueBox = _interopRequireDefault(require("../../customComponents/AnimalBox
|
|
|
79
79
|
|
|
80
80
|
var _ColorText = _interopRequireDefault(require("../../customComponents/ColorText"));
|
|
81
81
|
|
|
82
|
+
var _HtmlBox = _interopRequireDefault(require("../../customComponents/HtmlBox"));
|
|
83
|
+
|
|
82
84
|
var _FunctionComponent = require("../../customComponents/FunctionComponent");
|
|
83
85
|
|
|
84
86
|
var _Whether = require("../../customComponents/FunctionSupplement/Whether");
|
|
@@ -148,6 +150,20 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
148
150
|
return false;
|
|
149
151
|
};
|
|
150
152
|
|
|
153
|
+
_this.getGlobal = function () {
|
|
154
|
+
var global = _this.props.global;
|
|
155
|
+
|
|
156
|
+
if ((global || null) == null) {
|
|
157
|
+
var text = 'global is null, function getGlobal need override. ';
|
|
158
|
+
(0, _tools.showRuntimeError)({
|
|
159
|
+
message: text
|
|
160
|
+
});
|
|
161
|
+
throw new Error(text);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
return global;
|
|
165
|
+
};
|
|
166
|
+
|
|
151
167
|
_this.getApiData = function (props) {
|
|
152
168
|
var text = 'getApiData 方法需要重载实现';
|
|
153
169
|
(0, _tools.showRuntimeError)({
|
|
@@ -1626,6 +1642,52 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
1626
1642
|
}, /*#__PURE__*/_react.default.createElement(_divider.default, _objectSpread(_objectSpread({}, {}), contentItem.otherProps || {}), (0, _tools.stringIsNullOrWhiteSpace)(contentItem.text || '') ? null : contentItem.text));
|
|
1627
1643
|
}
|
|
1628
1644
|
|
|
1645
|
+
if (type === _constants.cardConfig.contentItemType.customGrid) {
|
|
1646
|
+
return /*#__PURE__*/_react.default.createElement(_col.default, {
|
|
1647
|
+
key: contentItemKey,
|
|
1648
|
+
lg: lg,
|
|
1649
|
+
md: lg || md,
|
|
1650
|
+
sm: lg || sm,
|
|
1651
|
+
xs: lg || xs
|
|
1652
|
+
}, (0, _FunctionComponent.buildCustomGrid)({
|
|
1653
|
+
list: (0, _tools.isArray)(contentItem.list) ? contentItem.list : [],
|
|
1654
|
+
props: _objectSpread(_objectSpread({}, {
|
|
1655
|
+
bordered: true,
|
|
1656
|
+
column: 3,
|
|
1657
|
+
emptyStyle: {
|
|
1658
|
+
color: '#cccccc'
|
|
1659
|
+
},
|
|
1660
|
+
emptyValue: '暂无',
|
|
1661
|
+
labelStyle: {
|
|
1662
|
+
width: '100px'
|
|
1663
|
+
}
|
|
1664
|
+
}), contentItem.props || {})
|
|
1665
|
+
}));
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
if (type === _constants.cardConfig.contentItemType.tree) {
|
|
1669
|
+
return /*#__PURE__*/_react.default.createElement(_col.default, {
|
|
1670
|
+
key: contentItemKey,
|
|
1671
|
+
lg: lg,
|
|
1672
|
+
md: lg || md,
|
|
1673
|
+
sm: lg || sm,
|
|
1674
|
+
xs: lg || xs
|
|
1675
|
+
}, (0, _FunctionComponent.buildTree)(contentItem));
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1678
|
+
if (type === _constants.cardConfig.contentItemType.html) {
|
|
1679
|
+
return /*#__PURE__*/_react.default.createElement(_col.default, {
|
|
1680
|
+
key: contentItemKey,
|
|
1681
|
+
lg: lg,
|
|
1682
|
+
md: lg || md,
|
|
1683
|
+
sm: lg || sm,
|
|
1684
|
+
xs: lg || xs
|
|
1685
|
+
}, /*#__PURE__*/_react.default.createElement(_HtmlBox.default, {
|
|
1686
|
+
useEmpty: (contentItem.useEmpty || null) == null ? true : contentItem.useEmpty || false,
|
|
1687
|
+
html: contentItem.html || ''
|
|
1688
|
+
}));
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1629
1691
|
if (type === _constants.cardConfig.contentItemType.imageUpload) {
|
|
1630
1692
|
var uploadProps = _objectSpread(_objectSpread({}, {
|
|
1631
1693
|
image: contentItem.image || '',
|
|
@@ -207,6 +207,15 @@ declare class ListBase extends AuthorizationWrapper {
|
|
|
207
207
|
renderCardCollectionView: () => JSX.Element;
|
|
208
208
|
renderPaginationView: () => JSX.Element;
|
|
209
209
|
renderView: () => JSX.Element | null;
|
|
210
|
+
establishSiderTopAreaConfig: () => null;
|
|
211
|
+
renderSiderTopArea: () => JSX.Element | null;
|
|
212
|
+
establishSiderBottomAreaConfig: () => null;
|
|
213
|
+
renderSiderBottomArea: () => JSX.Element | null;
|
|
214
|
+
buildCardCollectionArea: (config?: any) => JSX.Element | null;
|
|
215
|
+
renderSiderArea: () => JSX.Element | null;
|
|
216
|
+
renderContentArea: () => JSX.Element;
|
|
217
|
+
establishPageContentLayoutSiderConfig: () => {};
|
|
218
|
+
establishPageContentLayoutConfig: () => {};
|
|
210
219
|
renderPageContent: () => JSX.Element;
|
|
211
220
|
renderPageBody: () => JSX.Element;
|
|
212
221
|
renderFurther(): JSX.Element;
|
|
@@ -71,6 +71,10 @@ require("antd/es/form/style");
|
|
|
71
71
|
|
|
72
72
|
var _form = _interopRequireDefault(require("antd/es/form"));
|
|
73
73
|
|
|
74
|
+
require("antd/es/layout/style");
|
|
75
|
+
|
|
76
|
+
var _layout = _interopRequireDefault(require("antd/es/layout"));
|
|
77
|
+
|
|
74
78
|
var _react = _interopRequireWildcard(require("react"));
|
|
75
79
|
|
|
76
80
|
var _icons = require("@ant-design/icons");
|
|
@@ -147,6 +151,8 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
147
151
|
|
|
148
152
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
149
153
|
|
|
154
|
+
var Content = _layout.default.Content,
|
|
155
|
+
Sider = _layout.default.Sider;
|
|
150
156
|
var FormItem = _form.default.Item;
|
|
151
157
|
var RangePicker = _datePicker.default.RangePicker;
|
|
152
158
|
|
|
@@ -1343,7 +1349,103 @@ var ListBase = /*#__PURE__*/function (_AuthorizationWrapper) {
|
|
|
1343
1349
|
return null;
|
|
1344
1350
|
};
|
|
1345
1351
|
|
|
1346
|
-
_this.
|
|
1352
|
+
_this.establishSiderTopAreaConfig = function () {
|
|
1353
|
+
return null;
|
|
1354
|
+
};
|
|
1355
|
+
|
|
1356
|
+
_this.renderSiderTopArea = function () {
|
|
1357
|
+
var config = _this.establishSiderTopAreaConfig();
|
|
1358
|
+
|
|
1359
|
+
if (config == null) {
|
|
1360
|
+
return null;
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
return _this.buildCardCollectionArea(config);
|
|
1364
|
+
};
|
|
1365
|
+
|
|
1366
|
+
_this.establishSiderBottomAreaConfig = function () {
|
|
1367
|
+
return null;
|
|
1368
|
+
};
|
|
1369
|
+
|
|
1370
|
+
_this.renderSiderBottomArea = function () {
|
|
1371
|
+
var config = _this.establishSiderBottomAreaConfig();
|
|
1372
|
+
|
|
1373
|
+
if (config == null) {
|
|
1374
|
+
return null;
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
return _this.buildCardCollectionArea(config);
|
|
1378
|
+
};
|
|
1379
|
+
|
|
1380
|
+
_this.buildCardCollectionArea = function () {
|
|
1381
|
+
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
1382
|
+
|
|
1383
|
+
if (config == null) {
|
|
1384
|
+
return null;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
var formContentWrapperTypeConfig = _this.establishWrapperTypeConfig() || {
|
|
1388
|
+
mode: _constants.cardConfig.wrapperType.page
|
|
1389
|
+
};
|
|
1390
|
+
|
|
1391
|
+
var configData = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, {
|
|
1392
|
+
mode: _constants.cardConfig.wrapperType.page,
|
|
1393
|
+
justify: 'start',
|
|
1394
|
+
align: 'top'
|
|
1395
|
+
}), formContentWrapperTypeConfig || {}), {
|
|
1396
|
+
list: []
|
|
1397
|
+
}), config || {});
|
|
1398
|
+
|
|
1399
|
+
var mode = configData.mode,
|
|
1400
|
+
justifyGeneral = configData.justify,
|
|
1401
|
+
alignGeneral = configData.align,
|
|
1402
|
+
list = configData.list;
|
|
1403
|
+
var listData = [];
|
|
1404
|
+
|
|
1405
|
+
if ((0, _tools.isArray)(list)) {
|
|
1406
|
+
list.forEach(function (co, ci) {
|
|
1407
|
+
listData.push(co);
|
|
1408
|
+
|
|
1409
|
+
if (ci !== list.length - 1) {
|
|
1410
|
+
listData.push('');
|
|
1411
|
+
}
|
|
1412
|
+
});
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
return /*#__PURE__*/_react.default.createElement(_space.default, {
|
|
1416
|
+
style: {
|
|
1417
|
+
width: '100%'
|
|
1418
|
+
},
|
|
1419
|
+
direction: "vertical",
|
|
1420
|
+
size: 24
|
|
1421
|
+
}, listData.map(function (item, index) {
|
|
1422
|
+
return _this.buildCardCollectionItem({
|
|
1423
|
+
mode: mode,
|
|
1424
|
+
justify: justifyGeneral,
|
|
1425
|
+
align: alignGeneral,
|
|
1426
|
+
config: item,
|
|
1427
|
+
key: index
|
|
1428
|
+
});
|
|
1429
|
+
}));
|
|
1430
|
+
};
|
|
1431
|
+
|
|
1432
|
+
_this.renderSiderArea = function () {
|
|
1433
|
+
var topArea = _this.renderSiderTopArea();
|
|
1434
|
+
|
|
1435
|
+
var bottomArea = _this.renderSiderBottomArea();
|
|
1436
|
+
|
|
1437
|
+
if ((bottomArea || null) == null) {
|
|
1438
|
+
return topArea;
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
return /*#__PURE__*/_react.default.createElement(_FlexBox.default, {
|
|
1442
|
+
direction: "vertical",
|
|
1443
|
+
top: topArea,
|
|
1444
|
+
bottom: bottomArea
|
|
1445
|
+
});
|
|
1446
|
+
};
|
|
1447
|
+
|
|
1448
|
+
_this.renderContentArea = function () {
|
|
1347
1449
|
var _this$state10 = _this.state,
|
|
1348
1450
|
listTitle = _this$state10.listTitle,
|
|
1349
1451
|
renderSearchForm = _this$state10.renderSearchForm;
|
|
@@ -1353,18 +1455,13 @@ var ListBase = /*#__PURE__*/function (_AuthorizationWrapper) {
|
|
|
1353
1455
|
var searchForm = _this.renderForm();
|
|
1354
1456
|
|
|
1355
1457
|
var hasPagination = _this.renderPaginationView() != null;
|
|
1356
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
1357
|
-
className: _index.default.containorBox,
|
|
1358
|
-
style: {
|
|
1359
|
-
overflowX: 'hidden'
|
|
1360
|
-
}
|
|
1361
|
-
}, /*#__PURE__*/_react.default.createElement(_space.default, {
|
|
1458
|
+
return /*#__PURE__*/_react.default.createElement(_space.default, {
|
|
1362
1459
|
style: {
|
|
1363
1460
|
width: '100%'
|
|
1364
1461
|
},
|
|
1365
1462
|
direction: "vertical",
|
|
1366
1463
|
size: 24
|
|
1367
|
-
},
|
|
1464
|
+
}, renderSearchForm && (searchForm || null) != null ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_card.default, {
|
|
1368
1465
|
bordered: false,
|
|
1369
1466
|
className: _index.default.containorSearch
|
|
1370
1467
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -1385,7 +1482,65 @@ var ListBase = /*#__PURE__*/function (_AuthorizationWrapper) {
|
|
|
1385
1482
|
}), _this.renderBatchAction(), _this.renderCardExtraAction())
|
|
1386
1483
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
1387
1484
|
className: _index.default.tableList
|
|
1388
|
-
}, _this.renderAboveTable(), _this.renderView()))
|
|
1485
|
+
}, _this.renderAboveTable(), _this.renderView())));
|
|
1486
|
+
};
|
|
1487
|
+
|
|
1488
|
+
_this.establishPageContentLayoutSiderConfig = function () {
|
|
1489
|
+
return {};
|
|
1490
|
+
};
|
|
1491
|
+
|
|
1492
|
+
_this.establishPageContentLayoutConfig = function () {
|
|
1493
|
+
return {};
|
|
1494
|
+
};
|
|
1495
|
+
|
|
1496
|
+
_this.renderPageContent = function () {
|
|
1497
|
+
var siderArea = _this.renderSiderArea();
|
|
1498
|
+
|
|
1499
|
+
var contentArea = _this.renderContentArea();
|
|
1500
|
+
|
|
1501
|
+
var layoutSiderConfig = _this.establishPageContentLayoutSiderConfig();
|
|
1502
|
+
|
|
1503
|
+
var layoutConfig = _this.establishPageContentLayoutConfig();
|
|
1504
|
+
|
|
1505
|
+
var _position = _objectSpread(_objectSpread({}, {
|
|
1506
|
+
position: 'left'
|
|
1507
|
+
}), layoutSiderConfig || {}),
|
|
1508
|
+
siderPosition = _position.position;
|
|
1509
|
+
|
|
1510
|
+
var siderConfig = _objectSpread(_objectSpread({}, {
|
|
1511
|
+
width: 300,
|
|
1512
|
+
style: _objectSpread(_objectSpread({}, {
|
|
1513
|
+
backgroundColor: '#fff',
|
|
1514
|
+
borderRadius: '4px',
|
|
1515
|
+
overflowX: 'auto',
|
|
1516
|
+
overflowY: 'hidden'
|
|
1517
|
+
}), siderPosition === 'left' ? {
|
|
1518
|
+
marginRight: '24px'
|
|
1519
|
+
} : {
|
|
1520
|
+
marginLeft: '24px'
|
|
1521
|
+
})
|
|
1522
|
+
}), layoutSiderConfig || {});
|
|
1523
|
+
|
|
1524
|
+
layoutConfig = _objectSpread(_objectSpread({}, {
|
|
1525
|
+
breakpoint: 'sm',
|
|
1526
|
+
style: {
|
|
1527
|
+
backgroundColor: '#f0f2f5',
|
|
1528
|
+
minHeight: 'auto'
|
|
1529
|
+
}
|
|
1530
|
+
}), layoutConfig || {});
|
|
1531
|
+
var inner = siderArea == null ? contentArea : /*#__PURE__*/_react.default.createElement(_layout.default, layoutConfig, siderPosition === 'left' ? /*#__PURE__*/_react.default.createElement(Sider, siderConfig, siderArea) : null, /*#__PURE__*/_react.default.createElement(Content, null, contentArea), siderPosition !== 'left' ? /*#__PURE__*/_react.default.createElement(Sider, siderConfig, siderArea) : null);
|
|
1532
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1533
|
+
className: _index.default.containorBox,
|
|
1534
|
+
style: {
|
|
1535
|
+
overflowX: 'hidden'
|
|
1536
|
+
}
|
|
1537
|
+
}, /*#__PURE__*/_react.default.createElement(_space.default, {
|
|
1538
|
+
style: {
|
|
1539
|
+
width: '100%'
|
|
1540
|
+
},
|
|
1541
|
+
direction: "vertical",
|
|
1542
|
+
size: 24
|
|
1543
|
+
}, _this.buildToolBarWrapper(), inner, _this.buildHelpWrapper()));
|
|
1389
1544
|
};
|
|
1390
1545
|
|
|
1391
1546
|
_this.renderPageBody = function () {
|
|
@@ -142,18 +142,12 @@ var MultiPageDrawer = /*#__PURE__*/function (_MultiPage) {
|
|
|
142
142
|
dataLoading: true
|
|
143
143
|
});
|
|
144
144
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
that.handleSearchReset(false, 700);
|
|
145
|
+
_this.handleSearchReset(false, 700);
|
|
148
146
|
} else if (_this.reloadWhenShow) {
|
|
149
|
-
_this.
|
|
147
|
+
_this.reloadData({
|
|
150
148
|
reloadAnimalShow: true
|
|
151
|
-
})
|
|
152
|
-
|
|
153
|
-
var _that = _assertThisInitialized(_this);
|
|
154
|
-
|
|
155
|
-
_that.reloadData({}, function () {
|
|
156
|
-
_that.setState({
|
|
149
|
+
}, function () {
|
|
150
|
+
_this.setState({
|
|
157
151
|
reloadAnimalShow: false
|
|
158
152
|
});
|
|
159
153
|
}, 700);
|
|
@@ -130,12 +130,23 @@ var SinglePageDrawer = /*#__PURE__*/function (_SinglePage) {
|
|
|
130
130
|
};
|
|
131
131
|
|
|
132
132
|
_this.doOtherWhenChangeVisibleToShow = function (preProps, preState, snapshot) {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
133
|
+
var firstLoadSuccess = _this.state.firstLoadSuccess; // 未加载数据过数据的时候,进行加载
|
|
134
|
+
|
|
135
|
+
if (!firstLoadSuccess) {
|
|
136
|
+
// 设置界面效果为加载中,减少用户误解
|
|
137
|
+
_this.setState({
|
|
138
|
+
dataLoading: true
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
_this.handleSearchReset(false, 700);
|
|
142
|
+
} else if (_this.reloadWhenShow) {
|
|
143
|
+
_this.reloadData({
|
|
144
|
+
reloadAnimalShow: true
|
|
145
|
+
}, function () {
|
|
146
|
+
_this.setState({
|
|
147
|
+
reloadAnimalShow: false
|
|
148
|
+
});
|
|
149
|
+
}, 700);
|
|
139
150
|
}
|
|
140
151
|
};
|
|
141
152
|
|
package/es/utils/constants.d.ts
CHANGED
|
@@ -143,6 +143,7 @@ export namespace columnFacadeMode {
|
|
|
143
143
|
export const badge: string;
|
|
144
144
|
const money_1: string;
|
|
145
145
|
export { money_1 as money };
|
|
146
|
+
export const dropdown: string;
|
|
146
147
|
}
|
|
147
148
|
export namespace columnPlaceholder {
|
|
148
149
|
export const placeholder: boolean;
|
|
@@ -168,7 +169,8 @@ export namespace listViewConfig {
|
|
|
168
169
|
export namespace dataContainerExtraActionBuildType {
|
|
169
170
|
export const generalButton: string;
|
|
170
171
|
export const button: string;
|
|
171
|
-
|
|
172
|
+
const dropdown_1: string;
|
|
173
|
+
export { dropdown_1 as dropdown };
|
|
172
174
|
export const dropdownButton: string;
|
|
173
175
|
export const dropdownEllipsis: string;
|
|
174
176
|
export const iconInfo: string;
|
|
@@ -212,8 +214,8 @@ export namespace drawerConfig {
|
|
|
212
214
|
export { dropdownButton_1 as dropdownButton };
|
|
213
215
|
const dropdownEllipsis_1: string;
|
|
214
216
|
export { dropdownEllipsis_1 as dropdownEllipsis };
|
|
215
|
-
const
|
|
216
|
-
export {
|
|
217
|
+
const dropdown_2: string;
|
|
218
|
+
export { dropdown_2 as dropdown };
|
|
217
219
|
const component_1: string;
|
|
218
220
|
export { component_1 as component };
|
|
219
221
|
}
|
|
@@ -248,8 +250,8 @@ export namespace cardConfig {
|
|
|
248
250
|
export { dropdownButton_2 as dropdownButton };
|
|
249
251
|
const dropdownEllipsis_2: string;
|
|
250
252
|
export { dropdownEllipsis_2 as dropdownEllipsis };
|
|
251
|
-
const
|
|
252
|
-
export {
|
|
253
|
+
const dropdown_3: string;
|
|
254
|
+
export { dropdown_3 as dropdown };
|
|
253
255
|
const component_2: string;
|
|
254
256
|
export { component_2 as component };
|
|
255
257
|
}
|
|
@@ -386,6 +388,18 @@ export namespace cardConfig {
|
|
|
386
388
|
* 分隔符
|
|
387
389
|
*/
|
|
388
390
|
divider: string;
|
|
391
|
+
/**
|
|
392
|
+
* Html
|
|
393
|
+
*/
|
|
394
|
+
html: string;
|
|
395
|
+
/**
|
|
396
|
+
* CustomGrid
|
|
397
|
+
*/
|
|
398
|
+
customGrid: string;
|
|
399
|
+
/**
|
|
400
|
+
* tree
|
|
401
|
+
*/
|
|
402
|
+
tree: string;
|
|
389
403
|
};
|
|
390
404
|
}
|
|
391
405
|
export namespace searchCardConfig {
|
|
@@ -522,8 +536,8 @@ export namespace tabBarCollection {
|
|
|
522
536
|
export { dropdownButton_3 as dropdownButton };
|
|
523
537
|
const dropdownEllipsis_3: string;
|
|
524
538
|
export { dropdownEllipsis_3 as dropdownEllipsis };
|
|
525
|
-
const
|
|
526
|
-
export {
|
|
539
|
+
const dropdown_4: string;
|
|
540
|
+
export { dropdown_4 as dropdown };
|
|
527
541
|
const component_4: string;
|
|
528
542
|
export { component_4 as component };
|
|
529
543
|
}
|
package/es/utils/constants.js
CHANGED
|
@@ -234,7 +234,13 @@ var columnFacadeMode = {
|
|
|
234
234
|
* 货币,例如¥0.05
|
|
235
235
|
* value : money
|
|
236
236
|
*/
|
|
237
|
-
money: 'money'
|
|
237
|
+
money: 'money',
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* dropdown
|
|
241
|
+
* value : dropdown component
|
|
242
|
+
*/
|
|
243
|
+
dropdown: 'dropdown'
|
|
238
244
|
};
|
|
239
245
|
exports.columnFacadeMode = columnFacadeMode;
|
|
240
246
|
var columnPlaceholder = {
|
|
@@ -569,7 +575,22 @@ var cardConfig = _objectSpread(_objectSpread({}, contentConfig), {}, {
|
|
|
569
575
|
/**
|
|
570
576
|
* 分隔符
|
|
571
577
|
*/
|
|
572
|
-
divider: 'divider'
|
|
578
|
+
divider: 'divider',
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* Html
|
|
582
|
+
*/
|
|
583
|
+
html: 'html',
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* CustomGrid
|
|
587
|
+
*/
|
|
588
|
+
customGrid: 'customGrid',
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* tree
|
|
592
|
+
*/
|
|
593
|
+
tree: 'tree'
|
|
573
594
|
}
|
|
574
595
|
});
|
|
575
596
|
|
package/es/utils/tools.d.ts
CHANGED
|
@@ -408,6 +408,14 @@ export function getValueByKey({ data, key, defaultValue, convert, convertBuilder
|
|
|
408
408
|
format?: any;
|
|
409
409
|
formatBuilder?: any;
|
|
410
410
|
}): any;
|
|
411
|
+
export function convertTarget({ target, convert }: {
|
|
412
|
+
target: any;
|
|
413
|
+
convert: any;
|
|
414
|
+
}): any;
|
|
415
|
+
export function formatTarget({ target, format }: {
|
|
416
|
+
target: any;
|
|
417
|
+
format: any;
|
|
418
|
+
}): any;
|
|
411
419
|
/**
|
|
412
420
|
* 通过 path 获取对应得值
|
|
413
421
|
*/
|
package/es/utils/tools.js
CHANGED
|
@@ -14,6 +14,7 @@ exports.checkLocalhost = checkLocalhost;
|
|
|
14
14
|
exports.clearLocalStorage = clearLocalStorage;
|
|
15
15
|
exports.clearSessionStorage = clearSessionStorage;
|
|
16
16
|
exports.cloneWithoutMethod = cloneWithoutMethod;
|
|
17
|
+
exports.convertTarget = convertTarget;
|
|
17
18
|
exports.copyToClipboard = copyToClipboard;
|
|
18
19
|
exports.corsTarget = corsTarget;
|
|
19
20
|
exports.dateToMoment = dateToMoment;
|
|
@@ -38,6 +39,7 @@ exports.formatDatetime = formatDatetime;
|
|
|
38
39
|
exports.formatDecimal = formatDecimal;
|
|
39
40
|
exports.formatMoney = formatMoney;
|
|
40
41
|
exports.formatMoneyToChinese = formatMoneyToChinese;
|
|
42
|
+
exports.formatTarget = formatTarget;
|
|
41
43
|
exports.getAppInitConfigData = getAppInitConfigData;
|
|
42
44
|
exports.getBrowserInfo = getBrowserInfo;
|
|
43
45
|
exports.getDerivedStateFromPropsForUrlParams = getDerivedStateFromPropsForUrlParams;
|
|
@@ -171,8 +173,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
171
173
|
|
|
172
174
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
173
175
|
|
|
174
|
-
function _readOnlyError(name) { throw new TypeError("\"" + name + "\" is read-only"); }
|
|
175
|
-
|
|
176
176
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
177
177
|
|
|
178
178
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -965,8 +965,12 @@ function sortedUnique(array) {
|
|
|
965
965
|
|
|
966
966
|
|
|
967
967
|
function roundToTarget(v, len) {
|
|
968
|
+
if (!isMoney(v)) {
|
|
969
|
+
return 0;
|
|
970
|
+
}
|
|
971
|
+
|
|
968
972
|
var temp = Math.pow(10, len);
|
|
969
|
-
return Math.round(v * temp) / temp;
|
|
973
|
+
return Math.round(toMoney(v) * temp) / temp;
|
|
970
974
|
}
|
|
971
975
|
/**
|
|
972
976
|
* 判断是否是数字字符串
|
|
@@ -1025,77 +1029,105 @@ function getValueByKey(_ref14) {
|
|
|
1025
1029
|
var v = getPathValue(data, key, defaultValue);
|
|
1026
1030
|
var result = v;
|
|
1027
1031
|
|
|
1028
|
-
if (
|
|
1029
|
-
|
|
1030
|
-
|
|
1032
|
+
if ((convertBuilder || null) != null || (convert || null) != null) {
|
|
1033
|
+
if (isFunction(convertBuilder)) {
|
|
1034
|
+
result = convertTarget({
|
|
1035
|
+
target: v,
|
|
1036
|
+
convert: convertBuilder
|
|
1037
|
+
});
|
|
1038
|
+
} else {
|
|
1039
|
+
result = convertTarget({
|
|
1040
|
+
target: v,
|
|
1041
|
+
convert: convert
|
|
1042
|
+
});
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
if ((formatBuilder || null) != null || (format || null) != null) {
|
|
1047
|
+
if (isFunction(formatBuilder)) {
|
|
1048
|
+
result = formatTarget({
|
|
1049
|
+
target: v,
|
|
1050
|
+
format: formatBuilder
|
|
1051
|
+
});
|
|
1052
|
+
} else {
|
|
1053
|
+
result = formatTarget({
|
|
1054
|
+
target: v,
|
|
1055
|
+
format: format
|
|
1056
|
+
});
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
return result;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
function convertTarget(_ref15) {
|
|
1064
|
+
var target = _ref15.target,
|
|
1065
|
+
convert = _ref15.convert;
|
|
1066
|
+
|
|
1067
|
+
if (isFunction(convert)) {
|
|
1068
|
+
return convert(target);
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
if (isString(convert)) {
|
|
1031
1072
|
switch (convert) {
|
|
1032
1073
|
case _constants.convertCollection.number:
|
|
1033
|
-
|
|
1034
|
-
break;
|
|
1074
|
+
return toNumber(target);
|
|
1035
1075
|
|
|
1036
1076
|
case _constants.convertCollection.datetime:
|
|
1037
|
-
|
|
1038
|
-
break;
|
|
1077
|
+
return toDatetime(target);
|
|
1039
1078
|
|
|
1040
1079
|
case _constants.convertCollection.string:
|
|
1041
|
-
|
|
1042
|
-
break;
|
|
1080
|
+
return toString(target);
|
|
1043
1081
|
|
|
1044
1082
|
case _constants.convertCollection.moment:
|
|
1045
|
-
|
|
1046
|
-
data: toString(
|
|
1083
|
+
return toMoment({
|
|
1084
|
+
data: toString(target)
|
|
1047
1085
|
});
|
|
1048
|
-
break;
|
|
1049
1086
|
|
|
1050
1087
|
case _constants.convertCollection.money:
|
|
1051
|
-
|
|
1052
|
-
break;
|
|
1088
|
+
return toMoney(target);
|
|
1053
1089
|
|
|
1054
1090
|
case _constants.convertCollection.array:
|
|
1055
|
-
|
|
1056
|
-
break;
|
|
1091
|
+
return (target || null) == null ? [] : isArray(target) ? target : [target];
|
|
1057
1092
|
|
|
1058
1093
|
default:
|
|
1059
|
-
|
|
1060
|
-
break;
|
|
1094
|
+
return target;
|
|
1061
1095
|
}
|
|
1062
1096
|
}
|
|
1063
1097
|
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1098
|
+
return target;
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
function formatTarget(_ref16) {
|
|
1102
|
+
var target = _ref16.target,
|
|
1103
|
+
format = _ref16.format;
|
|
1104
|
+
|
|
1105
|
+
if (isFunction(format)) {
|
|
1106
|
+
return format(target);
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
if (isString(format)) {
|
|
1067
1110
|
switch (format) {
|
|
1068
1111
|
case _constants.formatCollection.money:
|
|
1069
|
-
|
|
1070
|
-
break;
|
|
1112
|
+
return formatMoney(target);
|
|
1071
1113
|
|
|
1072
1114
|
case _constants.formatCollection.datetime:
|
|
1073
|
-
|
|
1074
|
-
data:
|
|
1115
|
+
return formatDatetime({
|
|
1116
|
+
data: target
|
|
1075
1117
|
});
|
|
1076
|
-
break;
|
|
1077
1118
|
|
|
1078
1119
|
case _constants.formatCollection.chineseMoney:
|
|
1079
|
-
|
|
1080
|
-
break;
|
|
1120
|
+
return formatMoneyToChinese(target);
|
|
1081
1121
|
|
|
1082
1122
|
case _constants.formatCollection.percentage:
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
if (!isMoney(v)) {
|
|
1086
|
-
roundToTarget(v * 100, 1), _readOnlyError("d");
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
result = "".concat(d, "%");
|
|
1090
|
-
break;
|
|
1123
|
+
return "".concat(roundToTarget(target * 100, 1), "%");
|
|
1091
1124
|
|
|
1092
1125
|
default:
|
|
1093
|
-
|
|
1094
|
-
break;
|
|
1126
|
+
return target;
|
|
1095
1127
|
}
|
|
1096
1128
|
}
|
|
1097
1129
|
|
|
1098
|
-
return
|
|
1130
|
+
return target;
|
|
1099
1131
|
}
|
|
1100
1132
|
/**
|
|
1101
1133
|
* 通过 path 获取对应得值
|
|
@@ -1345,10 +1377,10 @@ function formatMoneyToChinese(v) {
|
|
|
1345
1377
|
return ChineseString;
|
|
1346
1378
|
}
|
|
1347
1379
|
|
|
1348
|
-
function seededRandom(
|
|
1349
|
-
var seed =
|
|
1350
|
-
min =
|
|
1351
|
-
max =
|
|
1380
|
+
function seededRandom(_ref17) {
|
|
1381
|
+
var seed = _ref17.seed,
|
|
1382
|
+
min = _ref17.min,
|
|
1383
|
+
max = _ref17.max;
|
|
1352
1384
|
var maxValue = max || 1;
|
|
1353
1385
|
var minValue = min || 0;
|
|
1354
1386
|
var seedValue = (seed * 9301 + 49297) % 233280;
|
|
@@ -1364,18 +1396,18 @@ function seededRandom(_ref15) {
|
|
|
1364
1396
|
*/
|
|
1365
1397
|
|
|
1366
1398
|
|
|
1367
|
-
function getRandomColor(
|
|
1368
|
-
var seed =
|
|
1369
|
-
|
|
1370
|
-
hue =
|
|
1371
|
-
|
|
1372
|
-
luminosity =
|
|
1373
|
-
|
|
1374
|
-
count =
|
|
1375
|
-
|
|
1376
|
-
format =
|
|
1377
|
-
|
|
1378
|
-
alpha =
|
|
1399
|
+
function getRandomColor(_ref18) {
|
|
1400
|
+
var seed = _ref18.seed,
|
|
1401
|
+
_ref18$hue = _ref18.hue,
|
|
1402
|
+
hue = _ref18$hue === void 0 ? null : _ref18$hue,
|
|
1403
|
+
_ref18$luminosity = _ref18.luminosity,
|
|
1404
|
+
luminosity = _ref18$luminosity === void 0 ? null : _ref18$luminosity,
|
|
1405
|
+
_ref18$count = _ref18.count,
|
|
1406
|
+
count = _ref18$count === void 0 ? null : _ref18$count,
|
|
1407
|
+
_ref18$format = _ref18.format,
|
|
1408
|
+
format = _ref18$format === void 0 ? null : _ref18$format,
|
|
1409
|
+
_ref18$alpha = _ref18.alpha,
|
|
1410
|
+
alpha = _ref18$alpha === void 0 ? null : _ref18$alpha;
|
|
1379
1411
|
return (0, _randomcolor.default)({
|
|
1380
1412
|
seed: seed,
|
|
1381
1413
|
hue: hue,
|
|
@@ -2078,8 +2110,8 @@ function removeNearestLocalhostNotifyCache() {
|
|
|
2078
2110
|
*/
|
|
2079
2111
|
|
|
2080
2112
|
|
|
2081
|
-
function trySendNearestLocalhostNotify(
|
|
2082
|
-
var text =
|
|
2113
|
+
function trySendNearestLocalhostNotify(_ref19) {
|
|
2114
|
+
var text = _ref19.text;
|
|
2083
2115
|
var needSend = false;
|
|
2084
2116
|
var nearestTime = 0;
|
|
2085
2117
|
|
|
@@ -2140,11 +2172,11 @@ function notifySuccess(text) {
|
|
|
2140
2172
|
*/
|
|
2141
2173
|
|
|
2142
2174
|
|
|
2143
|
-
function notify(
|
|
2144
|
-
var type =
|
|
2145
|
-
placementValue =
|
|
2146
|
-
messageValue =
|
|
2147
|
-
descriptionValue =
|
|
2175
|
+
function notify(_ref20) {
|
|
2176
|
+
var type = _ref20.type,
|
|
2177
|
+
placementValue = _ref20.placement,
|
|
2178
|
+
messageValue = _ref20.message,
|
|
2179
|
+
descriptionValue = _ref20.description;
|
|
2148
2180
|
|
|
2149
2181
|
var _placement$message$de = _objectSpread(_objectSpread({}, {
|
|
2150
2182
|
placement: 'bottomRight',
|
|
@@ -2218,10 +2250,10 @@ function notify(_ref18) {
|
|
|
2218
2250
|
}, 600);
|
|
2219
2251
|
}
|
|
2220
2252
|
|
|
2221
|
-
function checkFromConfig(
|
|
2222
|
-
var label =
|
|
2223
|
-
name =
|
|
2224
|
-
helper =
|
|
2253
|
+
function checkFromConfig(_ref21) {
|
|
2254
|
+
var label = _ref21.label,
|
|
2255
|
+
name = _ref21.name,
|
|
2256
|
+
helper = _ref21.helper;
|
|
2225
2257
|
var labelText = 'object';
|
|
2226
2258
|
var nameText = 'object';
|
|
2227
2259
|
var helperText = 'object';
|
|
@@ -2280,13 +2312,13 @@ var requestAnimFrame = requestAnimFrameCustom;
|
|
|
2280
2312
|
|
|
2281
2313
|
exports.requestAnimFrame = requestAnimFrame;
|
|
2282
2314
|
|
|
2283
|
-
function sortCollectionByKey(
|
|
2284
|
-
var operate =
|
|
2285
|
-
item =
|
|
2286
|
-
list =
|
|
2287
|
-
sortKey =
|
|
2288
|
-
|
|
2289
|
-
sortMin =
|
|
2315
|
+
function sortCollectionByKey(_ref22) {
|
|
2316
|
+
var operate = _ref22.operate,
|
|
2317
|
+
item = _ref22.item,
|
|
2318
|
+
list = _ref22.list,
|
|
2319
|
+
sortKey = _ref22.sortKey,
|
|
2320
|
+
_ref22$sortMin = _ref22.sortMin,
|
|
2321
|
+
sortMin = _ref22$sortMin === void 0 ? 0 : _ref22$sortMin;
|
|
2290
2322
|
|
|
2291
2323
|
if ((item || null) == null) {
|
|
2292
2324
|
return list;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antd-management-fast-framework",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.33",
|
|
4
4
|
"description": "antd-management-fast-framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antd-management-fast-framework"
|
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@ant-design/icons": "^4.7.0",
|
|
33
|
-
"@ant-design/pro-layout": "^6.31.
|
|
33
|
+
"@ant-design/pro-layout": "^6.31.5",
|
|
34
34
|
"@antv/data-set": "^0.11.8",
|
|
35
|
-
"antd": "^4.17.
|
|
35
|
+
"antd": "^4.17.3",
|
|
36
36
|
"array-move": "^4.0.0",
|
|
37
|
-
"bizcharts": "^4.1.
|
|
37
|
+
"bizcharts": "^4.1.15",
|
|
38
38
|
"browserslist": "^4.18.1",
|
|
39
|
-
"caniuse-lite": "^1.0.
|
|
39
|
+
"caniuse-lite": "^1.0.30001285",
|
|
40
40
|
"classnames": "^2.3.1",
|
|
41
41
|
"copy-to-clipboard": "^3.3.1",
|
|
42
42
|
"enquire-js": "^0.2.1",
|
|
43
|
-
"html-react-parser": "^1.4.
|
|
43
|
+
"html-react-parser": "^1.4.2",
|
|
44
44
|
"lodash": "^4.17.21",
|
|
45
45
|
"lodash-decorators": "^6.0.1",
|
|
46
46
|
"lodash.debounce": "^4.0.8",
|
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
"@testing-library/react": "^12.1.2",
|
|
91
91
|
"@testing-library/react-hooks": "^7.0.2",
|
|
92
92
|
"@types/jest": "^27.0.3",
|
|
93
|
-
"@types/node": "^16.11.
|
|
94
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
93
|
+
"@types/node": "^16.11.12",
|
|
94
|
+
"@typescript-eslint/eslint-plugin": "^5.6.0",
|
|
95
95
|
"@umijs/fabric": "^2.8.1",
|
|
96
96
|
"@umijs/test": "^3.5.20",
|
|
97
97
|
"@umijs/test-utils": "^3.5.20",
|
|
@@ -101,9 +101,9 @@
|
|
|
101
101
|
"body-parser": "^1.19.0",
|
|
102
102
|
"commitizen": "^4.2.4",
|
|
103
103
|
"cross-env": "^7.0.3",
|
|
104
|
-
"eslint": "^8.
|
|
105
|
-
"eslint-config-airbnb": "^19.0.
|
|
106
|
-
"eslint-config-airbnb-typescript": "^16.
|
|
104
|
+
"eslint": "^8.4.1",
|
|
105
|
+
"eslint-config-airbnb": "^19.0.2",
|
|
106
|
+
"eslint-config-airbnb-typescript": "^16.1.0",
|
|
107
107
|
"eslint-config-prettier": "^8.3.0",
|
|
108
108
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
109
109
|
"eslint-plugin-import": "^2.25.3",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"pify": "^5.0.0",
|
|
127
127
|
"postcss": "^8.4.4",
|
|
128
128
|
"postcss-less": "^5.0.0",
|
|
129
|
-
"prettier": "^2.5.
|
|
129
|
+
"prettier": "^2.5.1",
|
|
130
130
|
"puppeteer": "^12.0.1",
|
|
131
131
|
"query-string": "^7.0.1",
|
|
132
132
|
"react": "^17.0.2",
|