antd-management-fast-framework 1.11.3 → 1.11.8

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.
@@ -157,6 +157,10 @@ var Base = /*#__PURE__*/function (_Component) {
157
157
 
158
158
  if (_defaultSettingsSpecial.defaultSettingsLayoutCustom.getUseNprogress()) {
159
159
  _nprogress.default.inc();
160
+
161
+ setTimeout(function () {
162
+ _nprogress.default.done();
163
+ }, 400);
160
164
  }
161
165
 
162
166
  _umi.history.push(location);
@@ -169,6 +173,10 @@ var Base = /*#__PURE__*/function (_Component) {
169
173
 
170
174
  if (_defaultSettingsSpecial.defaultSettingsLayoutCustom.getUseNprogress()) {
171
175
  _nprogress.default.inc();
176
+
177
+ setTimeout(function () {
178
+ _nprogress.default.done();
179
+ }, 400);
172
180
  }
173
181
 
174
182
  _umi.history.replace(location);
@@ -192,12 +200,6 @@ var Base = /*#__PURE__*/function (_Component) {
192
200
  _createClass(Base, [{
193
201
  key: "componentDidMount",
194
202
  value: function componentDidMount() {
195
- if (_defaultSettingsSpecial.defaultSettingsLayoutCustom.getUseNprogress()) {
196
- setTimeout(function () {
197
- _nprogress.default.done();
198
- }, 400);
199
- }
200
-
201
203
  this.beforeDidMount();
202
204
  this.mounted = true;
203
205
  this.doDidMountTask();
@@ -1661,7 +1661,10 @@ var Common = /*#__PURE__*/function (_Core) {
1661
1661
  }), contentItem.imageBoxProps || {});
1662
1662
 
1663
1663
  var imageBoxContainorStyle = _objectSpread(_objectSpread({}, {
1664
- width: '120px'
1664
+ width: '100px',
1665
+ border: '1px solid #d9d9d9',
1666
+ borderRadius: '4px',
1667
+ padding: '8px'
1665
1668
  }), contentItem.imageBoxContainorStyle || {});
1666
1669
 
1667
1670
  var imageBox = /*#__PURE__*/_react.default.createElement(_ImageBox.default, _extends({
@@ -1695,7 +1698,10 @@ var Common = /*#__PURE__*/function (_Core) {
1695
1698
  }
1696
1699
 
1697
1700
  var _imageBoxContainorStyle = _objectSpread(_objectSpread({}, {
1698
- width: '120px'
1701
+ width: '100px',
1702
+ border: '1px solid #d9d9d9',
1703
+ borderRadius: '4px',
1704
+ padding: '8px'
1699
1705
  }), contentItem.imageBoxContainorStyle || {});
1700
1706
 
1701
1707
  var imageItemShowList = [];
@@ -9,6 +9,7 @@ declare class ListBase extends AuthorizationWrapper {
9
9
  * 使用前台模拟分页,有助于优化长列表页面交互操作导致的延迟
10
10
  */
11
11
  useFrontendPagination: boolean;
12
+ affixPaginationBar: boolean;
12
13
  formRef: React.RefObject<any>;
13
14
  pageSizeAdditional: number;
14
15
  lastLoadParams: any;
@@ -31,6 +31,10 @@ require("antd/es/tooltip/style");
31
31
 
32
32
  var _tooltip = _interopRequireDefault(require("antd/es/tooltip"));
33
33
 
34
+ require("antd/es/affix/style");
35
+
36
+ var _affix = _interopRequireDefault(require("antd/es/affix"));
37
+
34
38
  require("antd/es/pagination/style");
35
39
 
36
40
  var _pagination = _interopRequireDefault(require("antd/es/pagination"));
@@ -166,6 +170,8 @@ var ListBase = /*#__PURE__*/function (_AuthorizationWrapper) {
166
170
  _this = _super.call(this, props);
167
171
  _this.useRemotePagination = true;
168
172
  _this.useFrontendPagination = false;
173
+ _this.useFrontendPagination = false;
174
+ _this.affixPaginationBar = true;
169
175
  _this.formRef = /*#__PURE__*/_react.default.createRef();
170
176
  _this.pageSizeAdditional = 0;
171
177
 
@@ -1074,7 +1080,7 @@ var ListBase = /*#__PURE__*/function (_AuthorizationWrapper) {
1074
1080
 
1075
1081
  var style = _this.establishPaginationViewStyle();
1076
1082
 
1077
- return /*#__PURE__*/_react.default.createElement(_FlexBox.default, {
1083
+ var bar = /*#__PURE__*/_react.default.createElement(_FlexBox.default, {
1078
1084
  style: style,
1079
1085
  right: /*#__PURE__*/_react.default.createElement(_pagination.default, _extends({}, paginationConfig, {
1080
1086
  onChange: function onChange(page, size) {
@@ -1085,6 +1091,18 @@ var ListBase = /*#__PURE__*/function (_AuthorizationWrapper) {
1085
1091
  }
1086
1092
  }))
1087
1093
  });
1094
+
1095
+ if (_this.affixPaginationBar) {
1096
+ return /*#__PURE__*/_react.default.createElement(_affix.default, {
1097
+ offsetBottom: 0
1098
+ }, /*#__PURE__*/_react.default.createElement("div", {
1099
+ style: {
1100
+ background: '#fff'
1101
+ }
1102
+ }, bar));
1103
+ }
1104
+
1105
+ return bar;
1088
1106
  };
1089
1107
 
1090
1108
  _this.renderCardExtraAction = function () {
@@ -1216,9 +1234,7 @@ var ListBase = /*#__PURE__*/function (_AuthorizationWrapper) {
1216
1234
  metaListData = _this$state7.metaListData,
1217
1235
  tableScroll = _this$state7.tableScroll,
1218
1236
  showSelect = _this$state7.showSelect,
1219
- selectedDataTableDataRows = _this$state7.selectedDataTableDataRows,
1220
- dataLoading = _this$state7.dataLoading,
1221
- processing = _this$state7.processing;
1237
+ selectedDataTableDataRows = _this$state7.selectedDataTableDataRows;
1222
1238
 
1223
1239
  var _this$buildTableConfi = _this.buildTableConfig(),
1224
1240
  styleSet = _this$buildTableConfi.styleSet,
@@ -16,7 +16,24 @@ var _globalStorageAssist = require("./globalStorageAssist");
16
16
 
17
17
  var _Authorized = require("./Authorized");
18
18
 
19
+ var authorityCollectionCache = 'authorityCollectionCache';
20
+
19
21
  function getAllAuthorityCore() {
22
+ var result = [];
23
+ var existCache = (0, _cacheAssist.hasCache)({
24
+ key: authorityCollectionCache
25
+ });
26
+
27
+ if (existCache) {
28
+ result = (0, _cacheAssist.getCache)({
29
+ key: authorityCollectionCache
30
+ });
31
+
32
+ if ((0, _tools.isArray)(result)) {
33
+ return result;
34
+ }
35
+ }
36
+
20
37
  var authorityString = (0, _tools.getStringFromLocalStorage)(_globalStorageAssist.storageKeyCollection.authorityCollection);
21
38
  var authority;
22
39
 
@@ -27,10 +44,16 @@ function getAllAuthorityCore() {
27
44
  }
28
45
 
29
46
  if (typeof authority === 'string') {
30
- return [authority];
47
+ result.push(authority);
48
+ } else {
49
+ result = (0, _tools.isArray)(authority) ? authority : [];
31
50
  }
32
51
 
33
- return (0, _tools.isArray)(authority) ? authority : [];
52
+ (0, _cacheAssist.setCache)({
53
+ key: authorityCollectionCache,
54
+ value: result
55
+ });
56
+ return result;
34
57
  }
35
58
 
36
59
  function getAllAuthority() {
@@ -81,6 +81,7 @@ export const convertCollection: {
81
81
  string: string;
82
82
  moment: string;
83
83
  money: string;
84
+ array: string;
84
85
  };
85
86
  export namespace formatCollection {
86
87
  export const money: string;
@@ -110,7 +110,8 @@ var convertCollection = {
110
110
  datetime: 'datetime',
111
111
  string: 'string',
112
112
  moment: 'moment',
113
- money: 'money'
113
+ money: 'money',
114
+ array: 'array'
114
115
  };
115
116
  exports.convertCollection = convertCollection;
116
117
  var formatCollection = {
@@ -1,7 +1,7 @@
1
1
  export function getNearestLocalhostNotifyCache(): any;
2
2
  export function setNearestLocalhostNotifyCache(): void;
3
3
  export function removeNearestLocalhostNotifyCache(): void;
4
- export function getAccessWayCollectionCache(): any;
4
+ export function getAccessWayCollectionCache(): {};
5
5
  export function setAccessWayCollectionCache(o: any): void;
6
6
  /**
7
7
  * 获取useParamsData缓存
@@ -21,6 +21,8 @@ exports.storageKeyCollection = void 0;
21
21
 
22
22
  var _tools = require("./tools");
23
23
 
24
+ var _cacheAssist = require("./cacheAssist");
25
+
24
26
  var _constants = require("./constants");
25
27
 
26
28
  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; }
@@ -67,14 +69,34 @@ function removeNearestLocalhostNotifyCache() {
67
69
  }
68
70
 
69
71
  function getAccessWayCollectionCache() {
72
+ var result = {};
70
73
  var key = storageKeyCollection.accessWayCollection;
74
+ var existCache = (0, _cacheAssist.hasCache)({
75
+ key: key
76
+ });
77
+
78
+ if (existCache) {
79
+ result = (0, _cacheAssist.getCache)({
80
+ key: key
81
+ });
82
+
83
+ if ((0, _tools.isArray)(result)) {
84
+ return result;
85
+ }
86
+ }
87
+
71
88
  var d = (0, _tools.getJsonFromLocalStorage)(key);
72
89
 
73
90
  if ((d || null) == null) {
74
91
  return _objectSpread({}, _constants.accessWaySpecialCollection || {});
75
92
  }
76
93
 
77
- return _objectSpread(_objectSpread({}, d || null), _constants.accessWaySpecialCollection || {});
94
+ result = _objectSpread(_objectSpread({}, d || null), _constants.accessWaySpecialCollection || {});
95
+ (0, _cacheAssist.setCache)({
96
+ key: key,
97
+ value: result
98
+ });
99
+ return result;
78
100
  }
79
101
 
80
102
  function setAccessWayCollectionCache(o) {
@@ -18,6 +18,9 @@ var _defaultSettingsSpecial = require("./defaultSettingsSpecial");
18
18
 
19
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
20
 
21
+ /**
22
+ * layout默认配置
23
+ */
21
24
  var proLayoutDefaultProps = {
22
25
  onMenuHeaderClick: function onMenuHeaderClick() {
23
26
  return _umi.history.push('/');
package/es/utils/tools.js CHANGED
@@ -1049,6 +1049,10 @@ function getValueByKey(_ref14) {
1049
1049
  result = toMoney(v);
1050
1050
  break;
1051
1051
 
1052
+ case _constants.convertCollection.array:
1053
+ result = (v || null) == null ? [] : isArray(v) ? v : [v];
1054
+ break;
1055
+
1052
1056
  default:
1053
1057
  result = v;
1054
1058
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antd-management-fast-framework",
3
- "version": "1.11.3",
3
+ "version": "1.11.8",
4
4
  "description": "antd-management-fast-framework",
5
5
  "keywords": [
6
6
  "antd-management-fast-framework"
@@ -32,15 +32,15 @@
32
32
  "@ant-design/icons": "^4.7.0",
33
33
  "@ant-design/pro-layout": "^6.31.2",
34
34
  "@antv/data-set": "^0.11.8",
35
- "antd": "^4.17.1",
35
+ "antd": "^4.17.2",
36
36
  "array-move": "^4.0.0",
37
37
  "bizcharts": "^4.1.14",
38
38
  "browserslist": "^4.18.1",
39
- "caniuse-lite": "^1.0.30001282",
39
+ "caniuse-lite": "^1.0.30001283",
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.0",
43
+ "html-react-parser": "^1.4.1",
44
44
  "lodash": "^4.17.21",
45
45
  "lodash-decorators": "^6.0.1",
46
46
  "lodash.debounce": "^4.0.8",
@@ -124,10 +124,10 @@
124
124
  "lint-staged": "^12.1.2",
125
125
  "npm-run-all": "^4.1.5",
126
126
  "pify": "^5.0.0",
127
- "postcss": "^8.3.11",
127
+ "postcss": "^8.4.4",
128
128
  "postcss-less": "^5.0.0",
129
- "prettier": "^2.4.1",
130
- "puppeteer": "^11.0.0",
129
+ "prettier": "^2.5.0",
130
+ "puppeteer": "^12.0.0",
131
131
  "query-string": "^7.0.1",
132
132
  "react": "^17.0.2",
133
133
  "react-dom": "^17.0.2",
@@ -167,5 +167,5 @@
167
167
  "bugs": {
168
168
  "url": "https://github.com/kityandhero/antd-management-fast-framework/issues"
169
169
  },
170
- "gitHead": "11398bf0bfb60684cbbf10e6d713bae473a9e68f"
170
+ "gitHead": "48e23cd378dbe7cda1566614180397fdc06e066d"
171
171
  }
package/License.txt DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2021 luzhitao
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.