antd-management-fast-framework 1.11.19 → 1.11.31
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.js +33 -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 +52 -0
- package/es/framework/DataMultiPageView/MultiPageDrawer/index.js +4 -10
- package/es/framework/DataSinglePageView/SinglePageDrawer/index.js +17 -6
- package/es/utils/constants.d.ts +39 -7
- package/es/utils/constants.js +66 -3
- package/es/utils/tools.d.ts +8 -0
- package/es/utils/tools.js +110 -66
- package/package.json +12 -12
|
@@ -941,7 +941,8 @@ function buildCustomGrid(_ref7) {
|
|
|
941
941
|
emptyStyle: null,
|
|
942
942
|
bordered: false,
|
|
943
943
|
colon: true,
|
|
944
|
-
size: null
|
|
944
|
+
size: null,
|
|
945
|
+
ellipsis: true
|
|
945
946
|
}), props || {}),
|
|
946
947
|
title = _title$column$labelSt.title,
|
|
947
948
|
columnSource = _title$column$labelSt.column,
|
|
@@ -951,7 +952,8 @@ function buildCustomGrid(_ref7) {
|
|
|
951
952
|
globalEmptyStyle = _title$column$labelSt.emptyStyle,
|
|
952
953
|
borderedSource = _title$column$labelSt.bordered,
|
|
953
954
|
colonSource = _title$column$labelSt.colon,
|
|
954
|
-
sizeSource = _title$column$labelSt.size
|
|
955
|
+
sizeSource = _title$column$labelSt.size,
|
|
956
|
+
ellipsis = _title$column$labelSt.ellipsis;
|
|
955
957
|
|
|
956
958
|
if (!(0, _tools.isNumber)(columnSource)) {
|
|
957
959
|
column = 3;
|
|
@@ -989,11 +991,13 @@ function buildCustomGrid(_ref7) {
|
|
|
989
991
|
borderTop: '1px solid #f0f0f0',
|
|
990
992
|
borderLeft: '1px solid #f0f0f0'
|
|
991
993
|
} : null;
|
|
992
|
-
|
|
994
|
+
|
|
995
|
+
var labelStyle = _objectSpread(_objectSpread(_objectSpread({}, {
|
|
993
996
|
width: '180px'
|
|
994
|
-
}), labelStyleSource || {}), {
|
|
997
|
+
}), labelStyleSource || {}), bordered ? {
|
|
995
998
|
margin: margin
|
|
996
|
-
}
|
|
999
|
+
} : {});
|
|
1000
|
+
|
|
997
1001
|
var contentStyle = bordered ? _objectSpread(_objectSpread(_objectSpread({}, {
|
|
998
1002
|
margin: '16px 24px'
|
|
999
1003
|
}), contentStyleSource || {}), {
|
|
@@ -1071,15 +1075,16 @@ function buildCustomGrid(_ref7) {
|
|
|
1071
1075
|
borderRight: '1px solid #f0f0f0'
|
|
1072
1076
|
} : {}),
|
|
1073
1077
|
right: /*#__PURE__*/_react.default.createElement("div", {
|
|
1074
|
-
style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, contentStyle), isEmpty ? globalEmptyStyle || {} : {}), isEmpty ? itemEmptyStyle || {} : {}), {
|
|
1078
|
+
style: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, contentStyle), isEmpty ? globalEmptyStyle || {} : {}), isEmpty ? itemEmptyStyle || {} : {}), {
|
|
1075
1079
|
WebkitBoxOrient: 'vertical',
|
|
1076
|
-
WebkitLineClamp: '1',
|
|
1077
1080
|
overflow: 'hidden',
|
|
1078
1081
|
display: '-webkit-box',
|
|
1079
1082
|
textOverflow: 'ellipsis',
|
|
1080
1083
|
wordBreak: 'break-all',
|
|
1081
1084
|
whiteSpace: 'normal'
|
|
1082
|
-
})
|
|
1085
|
+
}), ellipsis ? {
|
|
1086
|
+
WebkitLineClamp: '1'
|
|
1087
|
+
} : {})
|
|
1083
1088
|
}, v, itemCanCopy && (itemCanCopy || null) != null ? /*#__PURE__*/_react.default.createElement("a", {
|
|
1084
1089
|
style: {
|
|
1085
1090
|
marginLeft: '10px'
|
|
@@ -1296,7 +1301,11 @@ function buildMenuHeaderRender(_ref10) {
|
|
|
1296
1301
|
collapsed = _ref10.collapsed,
|
|
1297
1302
|
navTheme = _ref10.navTheme,
|
|
1298
1303
|
shortName = _ref10.shortName;
|
|
1299
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
1304
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1305
|
+
style: {
|
|
1306
|
+
overflow: 'hidden'
|
|
1307
|
+
}
|
|
1308
|
+
}, /*#__PURE__*/_react.default.createElement(_FlexBox.default, {
|
|
1300
1309
|
flexAuto: "right",
|
|
1301
1310
|
left: logoDom,
|
|
1302
1311
|
right: collapsed ? null : /*#__PURE__*/_react.default.createElement(_VerticalBox.default, {
|
|
@@ -1305,21 +1314,20 @@ function buildMenuHeaderRender(_ref10) {
|
|
|
1305
1314
|
style: {
|
|
1306
1315
|
height: '100%'
|
|
1307
1316
|
}
|
|
1308
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
1309
|
-
level: 1,
|
|
1317
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
1310
1318
|
style: _objectSpread(_objectSpread({}, {
|
|
1311
1319
|
margin: ' 0 0 0 12px',
|
|
1312
1320
|
fontSize: '20px',
|
|
1313
1321
|
color: 'white',
|
|
1314
1322
|
fontWeight: '600',
|
|
1315
|
-
lineHeight: '32px'
|
|
1323
|
+
lineHeight: '32px',
|
|
1324
|
+
overflow: 'hidden',
|
|
1325
|
+
height: '100%',
|
|
1326
|
+
whiteSpace: 'nowrap'
|
|
1316
1327
|
}), navTheme === 'light' ? {
|
|
1317
1328
|
color: '#000000d9'
|
|
1318
1329
|
} : {})
|
|
1319
|
-
},
|
|
1320
|
-
type: "alpha",
|
|
1321
|
-
mode: "smooth"
|
|
1322
|
-
}, shortName || '应用简称')))
|
|
1330
|
+
}, shortName || '应用简称'))
|
|
1323
1331
|
}));
|
|
1324
1332
|
}
|
|
1325
1333
|
|
|
@@ -2910,6 +2918,15 @@ function buildColumnItem(_ref49) {
|
|
|
2910
2918
|
}));
|
|
2911
2919
|
}
|
|
2912
2920
|
|
|
2921
|
+
if (facadeMode === _constants.columnFacadeMode.dropdown) {
|
|
2922
|
+
if (!(0, _tools.isFunction)(d.configBuilder)) {
|
|
2923
|
+
return null;
|
|
2924
|
+
}
|
|
2925
|
+
|
|
2926
|
+
var operateConfig = d.configBuilder(value, record, index);
|
|
2927
|
+
return buildDropdown(operateConfig);
|
|
2928
|
+
}
|
|
2929
|
+
|
|
2913
2930
|
throw new Error("\u65E0\u6548\u7684\u6E32\u67D3\u6A21\u5F0F\uFF1A".concat(facadeMode));
|
|
2914
2931
|
};
|
|
2915
2932
|
}
|
|
@@ -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,42 @@ 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.html) {
|
|
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
|
+
}, /*#__PURE__*/_react.default.createElement(_HtmlBox.default, {
|
|
1676
|
+
useEmpty: (contentItem.useEmpty || null) == null ? true : contentItem.useEmpty || false,
|
|
1677
|
+
html: contentItem.html || ''
|
|
1678
|
+
}));
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1629
1681
|
if (type === _constants.cardConfig.contentItemType.imageUpload) {
|
|
1630
1682
|
var uploadProps = _objectSpread(_objectSpread({}, {
|
|
1631
1683
|
image: contentItem.image || '',
|
|
@@ -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
|
@@ -75,18 +75,40 @@ export namespace formNameCollection {
|
|
|
75
75
|
export { helper_1 as helper };
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* 转换集合
|
|
80
|
+
*/
|
|
78
81
|
export const convertCollection: {
|
|
82
|
+
/**
|
|
83
|
+
* 数字
|
|
84
|
+
*/
|
|
79
85
|
number: string;
|
|
86
|
+
/**
|
|
87
|
+
* 日期 date
|
|
88
|
+
*/
|
|
80
89
|
datetime: string;
|
|
90
|
+
/**
|
|
91
|
+
* 字符串
|
|
92
|
+
*/
|
|
81
93
|
string: string;
|
|
94
|
+
/**
|
|
95
|
+
* moment日期
|
|
96
|
+
*/
|
|
82
97
|
moment: string;
|
|
98
|
+
/**
|
|
99
|
+
* 金额
|
|
100
|
+
*/
|
|
83
101
|
money: string;
|
|
102
|
+
/**
|
|
103
|
+
* 数组
|
|
104
|
+
*/
|
|
84
105
|
array: string;
|
|
85
106
|
};
|
|
86
107
|
export namespace formatCollection {
|
|
87
108
|
export const money: string;
|
|
88
109
|
export const datetime: string;
|
|
89
110
|
export const chineseMoney: string;
|
|
111
|
+
export const percentage: string;
|
|
90
112
|
}
|
|
91
113
|
export namespace menuType {
|
|
92
114
|
export const divider: string;
|
|
@@ -121,6 +143,7 @@ export namespace columnFacadeMode {
|
|
|
121
143
|
export const badge: string;
|
|
122
144
|
const money_1: string;
|
|
123
145
|
export { money_1 as money };
|
|
146
|
+
export const dropdown: string;
|
|
124
147
|
}
|
|
125
148
|
export namespace columnPlaceholder {
|
|
126
149
|
export const placeholder: boolean;
|
|
@@ -146,7 +169,8 @@ export namespace listViewConfig {
|
|
|
146
169
|
export namespace dataContainerExtraActionBuildType {
|
|
147
170
|
export const generalButton: string;
|
|
148
171
|
export const button: string;
|
|
149
|
-
|
|
172
|
+
const dropdown_1: string;
|
|
173
|
+
export { dropdown_1 as dropdown };
|
|
150
174
|
export const dropdownButton: string;
|
|
151
175
|
export const dropdownEllipsis: string;
|
|
152
176
|
export const iconInfo: string;
|
|
@@ -190,8 +214,8 @@ export namespace drawerConfig {
|
|
|
190
214
|
export { dropdownButton_1 as dropdownButton };
|
|
191
215
|
const dropdownEllipsis_1: string;
|
|
192
216
|
export { dropdownEllipsis_1 as dropdownEllipsis };
|
|
193
|
-
const
|
|
194
|
-
export {
|
|
217
|
+
const dropdown_2: string;
|
|
218
|
+
export { dropdown_2 as dropdown };
|
|
195
219
|
const component_1: string;
|
|
196
220
|
export { component_1 as component };
|
|
197
221
|
}
|
|
@@ -226,8 +250,8 @@ export namespace cardConfig {
|
|
|
226
250
|
export { dropdownButton_2 as dropdownButton };
|
|
227
251
|
const dropdownEllipsis_2: string;
|
|
228
252
|
export { dropdownEllipsis_2 as dropdownEllipsis };
|
|
229
|
-
const
|
|
230
|
-
export {
|
|
253
|
+
const dropdown_3: string;
|
|
254
|
+
export { dropdown_3 as dropdown };
|
|
231
255
|
const component_2: string;
|
|
232
256
|
export { component_2 as component };
|
|
233
257
|
}
|
|
@@ -364,6 +388,14 @@ export namespace cardConfig {
|
|
|
364
388
|
* 分隔符
|
|
365
389
|
*/
|
|
366
390
|
divider: string;
|
|
391
|
+
/**
|
|
392
|
+
* Html
|
|
393
|
+
*/
|
|
394
|
+
html: string;
|
|
395
|
+
/**
|
|
396
|
+
* CustomGrid
|
|
397
|
+
*/
|
|
398
|
+
customGrid: string;
|
|
367
399
|
};
|
|
368
400
|
}
|
|
369
401
|
export namespace searchCardConfig {
|
|
@@ -500,8 +532,8 @@ export namespace tabBarCollection {
|
|
|
500
532
|
export { dropdownButton_3 as dropdownButton };
|
|
501
533
|
const dropdownEllipsis_3: string;
|
|
502
534
|
export { dropdownEllipsis_3 as dropdownEllipsis };
|
|
503
|
-
const
|
|
504
|
-
export {
|
|
535
|
+
const dropdown_4: string;
|
|
536
|
+
export { dropdown_4 as dropdown };
|
|
505
537
|
const component_4: string;
|
|
506
538
|
export { component_4 as component };
|
|
507
539
|
}
|
package/es/utils/constants.js
CHANGED
|
@@ -104,20 +104,67 @@ var formNameCollection = {
|
|
|
104
104
|
helper: ''
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
|
+
/**
|
|
108
|
+
* 转换集合
|
|
109
|
+
*/
|
|
110
|
+
|
|
107
111
|
exports.formNameCollection = formNameCollection;
|
|
108
112
|
var convertCollection = {
|
|
113
|
+
/**
|
|
114
|
+
* 数字
|
|
115
|
+
*/
|
|
109
116
|
number: 'number',
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* 日期 date
|
|
120
|
+
*/
|
|
110
121
|
datetime: 'datetime',
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* 字符串
|
|
125
|
+
*/
|
|
111
126
|
string: 'string',
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* moment日期
|
|
130
|
+
*/
|
|
112
131
|
moment: 'moment',
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* 金额
|
|
135
|
+
*/
|
|
113
136
|
money: 'money',
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* 数组
|
|
140
|
+
*/
|
|
114
141
|
array: 'array'
|
|
115
142
|
};
|
|
143
|
+
/**
|
|
144
|
+
* 格式化集合
|
|
145
|
+
*/
|
|
146
|
+
|
|
116
147
|
exports.convertCollection = convertCollection;
|
|
117
148
|
var formatCollection = {
|
|
149
|
+
/**
|
|
150
|
+
* 金额 ¥ 0.00
|
|
151
|
+
*/
|
|
118
152
|
money: 'money',
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* 格式化日期 YYYY-MM-DD hh:mm:ss
|
|
156
|
+
*/
|
|
119
157
|
datetime: 'datetime',
|
|
120
|
-
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* 中文金额
|
|
161
|
+
*/
|
|
162
|
+
chineseMoney: 'chineseMoney',
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* 百分比
|
|
166
|
+
*/
|
|
167
|
+
percentage: 'percentage'
|
|
121
168
|
};
|
|
122
169
|
exports.formatCollection = formatCollection;
|
|
123
170
|
var menuType = {
|
|
@@ -187,7 +234,13 @@ var columnFacadeMode = {
|
|
|
187
234
|
* 货币,例如¥0.05
|
|
188
235
|
* value : money
|
|
189
236
|
*/
|
|
190
|
-
money: 'money'
|
|
237
|
+
money: 'money',
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* dropdown
|
|
241
|
+
* value : dropdown component
|
|
242
|
+
*/
|
|
243
|
+
dropdown: 'dropdown'
|
|
191
244
|
};
|
|
192
245
|
exports.columnFacadeMode = columnFacadeMode;
|
|
193
246
|
var columnPlaceholder = {
|
|
@@ -522,7 +575,17 @@ var cardConfig = _objectSpread(_objectSpread({}, contentConfig), {}, {
|
|
|
522
575
|
/**
|
|
523
576
|
* 分隔符
|
|
524
577
|
*/
|
|
525
|
-
divider: 'divider'
|
|
578
|
+
divider: 'divider',
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* Html
|
|
582
|
+
*/
|
|
583
|
+
html: 'html',
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* CustomGrid
|
|
587
|
+
*/
|
|
588
|
+
customGrid: 'customGrid'
|
|
526
589
|
}
|
|
527
590
|
});
|
|
528
591
|
|
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;
|
|
@@ -963,8 +965,12 @@ function sortedUnique(array) {
|
|
|
963
965
|
|
|
964
966
|
|
|
965
967
|
function roundToTarget(v, len) {
|
|
968
|
+
if (!isMoney(v)) {
|
|
969
|
+
return 0;
|
|
970
|
+
}
|
|
971
|
+
|
|
966
972
|
var temp = Math.pow(10, len);
|
|
967
|
-
return Math.round(v * temp) / temp;
|
|
973
|
+
return Math.round(toMoney(v) * temp) / temp;
|
|
968
974
|
}
|
|
969
975
|
/**
|
|
970
976
|
* 判断是否是数字字符串
|
|
@@ -1023,67 +1029,105 @@ function getValueByKey(_ref14) {
|
|
|
1023
1029
|
var v = getPathValue(data, key, defaultValue);
|
|
1024
1030
|
var result = v;
|
|
1025
1031
|
|
|
1026
|
-
if (
|
|
1027
|
-
|
|
1028
|
-
|
|
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)) {
|
|
1029
1072
|
switch (convert) {
|
|
1030
1073
|
case _constants.convertCollection.number:
|
|
1031
|
-
|
|
1032
|
-
break;
|
|
1074
|
+
return toNumber(target);
|
|
1033
1075
|
|
|
1034
1076
|
case _constants.convertCollection.datetime:
|
|
1035
|
-
|
|
1036
|
-
break;
|
|
1077
|
+
return toDatetime(target);
|
|
1037
1078
|
|
|
1038
1079
|
case _constants.convertCollection.string:
|
|
1039
|
-
|
|
1040
|
-
break;
|
|
1080
|
+
return toString(target);
|
|
1041
1081
|
|
|
1042
1082
|
case _constants.convertCollection.moment:
|
|
1043
|
-
|
|
1044
|
-
data: toString(
|
|
1083
|
+
return toMoment({
|
|
1084
|
+
data: toString(target)
|
|
1045
1085
|
});
|
|
1046
|
-
break;
|
|
1047
1086
|
|
|
1048
1087
|
case _constants.convertCollection.money:
|
|
1049
|
-
|
|
1050
|
-
break;
|
|
1088
|
+
return toMoney(target);
|
|
1051
1089
|
|
|
1052
1090
|
case _constants.convertCollection.array:
|
|
1053
|
-
|
|
1054
|
-
break;
|
|
1091
|
+
return (target || null) == null ? [] : isArray(target) ? target : [target];
|
|
1055
1092
|
|
|
1056
1093
|
default:
|
|
1057
|
-
|
|
1058
|
-
break;
|
|
1094
|
+
return target;
|
|
1059
1095
|
}
|
|
1060
1096
|
}
|
|
1061
1097
|
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
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)) {
|
|
1065
1110
|
switch (format) {
|
|
1066
1111
|
case _constants.formatCollection.money:
|
|
1067
|
-
|
|
1068
|
-
break;
|
|
1112
|
+
return formatMoney(target);
|
|
1069
1113
|
|
|
1070
1114
|
case _constants.formatCollection.datetime:
|
|
1071
|
-
|
|
1072
|
-
data:
|
|
1115
|
+
return formatDatetime({
|
|
1116
|
+
data: target
|
|
1073
1117
|
});
|
|
1074
|
-
break;
|
|
1075
1118
|
|
|
1076
1119
|
case _constants.formatCollection.chineseMoney:
|
|
1077
|
-
|
|
1078
|
-
|
|
1120
|
+
return formatMoneyToChinese(target);
|
|
1121
|
+
|
|
1122
|
+
case _constants.formatCollection.percentage:
|
|
1123
|
+
return "".concat(roundToTarget(target * 100, 1), "%");
|
|
1079
1124
|
|
|
1080
1125
|
default:
|
|
1081
|
-
|
|
1082
|
-
break;
|
|
1126
|
+
return target;
|
|
1083
1127
|
}
|
|
1084
1128
|
}
|
|
1085
1129
|
|
|
1086
|
-
return
|
|
1130
|
+
return target;
|
|
1087
1131
|
}
|
|
1088
1132
|
/**
|
|
1089
1133
|
* 通过 path 获取对应得值
|
|
@@ -1333,10 +1377,10 @@ function formatMoneyToChinese(v) {
|
|
|
1333
1377
|
return ChineseString;
|
|
1334
1378
|
}
|
|
1335
1379
|
|
|
1336
|
-
function seededRandom(
|
|
1337
|
-
var seed =
|
|
1338
|
-
min =
|
|
1339
|
-
max =
|
|
1380
|
+
function seededRandom(_ref17) {
|
|
1381
|
+
var seed = _ref17.seed,
|
|
1382
|
+
min = _ref17.min,
|
|
1383
|
+
max = _ref17.max;
|
|
1340
1384
|
var maxValue = max || 1;
|
|
1341
1385
|
var minValue = min || 0;
|
|
1342
1386
|
var seedValue = (seed * 9301 + 49297) % 233280;
|
|
@@ -1352,18 +1396,18 @@ function seededRandom(_ref15) {
|
|
|
1352
1396
|
*/
|
|
1353
1397
|
|
|
1354
1398
|
|
|
1355
|
-
function getRandomColor(
|
|
1356
|
-
var seed =
|
|
1357
|
-
|
|
1358
|
-
hue =
|
|
1359
|
-
|
|
1360
|
-
luminosity =
|
|
1361
|
-
|
|
1362
|
-
count =
|
|
1363
|
-
|
|
1364
|
-
format =
|
|
1365
|
-
|
|
1366
|
-
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;
|
|
1367
1411
|
return (0, _randomcolor.default)({
|
|
1368
1412
|
seed: seed,
|
|
1369
1413
|
hue: hue,
|
|
@@ -2066,8 +2110,8 @@ function removeNearestLocalhostNotifyCache() {
|
|
|
2066
2110
|
*/
|
|
2067
2111
|
|
|
2068
2112
|
|
|
2069
|
-
function trySendNearestLocalhostNotify(
|
|
2070
|
-
var text =
|
|
2113
|
+
function trySendNearestLocalhostNotify(_ref19) {
|
|
2114
|
+
var text = _ref19.text;
|
|
2071
2115
|
var needSend = false;
|
|
2072
2116
|
var nearestTime = 0;
|
|
2073
2117
|
|
|
@@ -2128,11 +2172,11 @@ function notifySuccess(text) {
|
|
|
2128
2172
|
*/
|
|
2129
2173
|
|
|
2130
2174
|
|
|
2131
|
-
function notify(
|
|
2132
|
-
var type =
|
|
2133
|
-
placementValue =
|
|
2134
|
-
messageValue =
|
|
2135
|
-
descriptionValue =
|
|
2175
|
+
function notify(_ref20) {
|
|
2176
|
+
var type = _ref20.type,
|
|
2177
|
+
placementValue = _ref20.placement,
|
|
2178
|
+
messageValue = _ref20.message,
|
|
2179
|
+
descriptionValue = _ref20.description;
|
|
2136
2180
|
|
|
2137
2181
|
var _placement$message$de = _objectSpread(_objectSpread({}, {
|
|
2138
2182
|
placement: 'bottomRight',
|
|
@@ -2206,10 +2250,10 @@ function notify(_ref18) {
|
|
|
2206
2250
|
}, 600);
|
|
2207
2251
|
}
|
|
2208
2252
|
|
|
2209
|
-
function checkFromConfig(
|
|
2210
|
-
var label =
|
|
2211
|
-
name =
|
|
2212
|
-
helper =
|
|
2253
|
+
function checkFromConfig(_ref21) {
|
|
2254
|
+
var label = _ref21.label,
|
|
2255
|
+
name = _ref21.name,
|
|
2256
|
+
helper = _ref21.helper;
|
|
2213
2257
|
var labelText = 'object';
|
|
2214
2258
|
var nameText = 'object';
|
|
2215
2259
|
var helperText = 'object';
|
|
@@ -2268,13 +2312,13 @@ var requestAnimFrame = requestAnimFrameCustom;
|
|
|
2268
2312
|
|
|
2269
2313
|
exports.requestAnimFrame = requestAnimFrame;
|
|
2270
2314
|
|
|
2271
|
-
function sortCollectionByKey(
|
|
2272
|
-
var operate =
|
|
2273
|
-
item =
|
|
2274
|
-
list =
|
|
2275
|
-
sortKey =
|
|
2276
|
-
|
|
2277
|
-
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;
|
|
2278
2322
|
|
|
2279
2323
|
if ((item || null) == null) {
|
|
2280
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.31",
|
|
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",
|