antd-management-fast-framework 1.11.57 → 1.11.62
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/CHANGELOG.md +22 -0
- package/es/customComponents/MobileContainor/MobilePreviewDrawer/index.d.ts +9 -0
- package/es/framework/Common/index.d.ts +7 -6
- package/es/framework/Common/index.js +124 -99
- package/es/framework/DataDrawer/Base/index.d.ts +0 -5
- package/es/framework/DataDrawer/Base/index.js +6 -130
- package/es/framework/DataForm/BaseAddForm/index.js +1 -1
- package/es/framework/DataListView/Base/index.d.ts +1 -4
- package/es/framework/DataListView/Base/index.js +17 -104
- package/es/framework/DataSingleView/DataCore/index.d.ts +1 -4
- package/es/framework/DataSingleView/DataCore/index.js +6 -41
- package/es/framework/DataTabContainer/index.js +3 -3
- package/es/utils/constants.d.ts +33 -67
- package/es/utils/constants.js +60 -134
- package/es/utils/mediaDefault.d.ts +3 -0
- package/es/utils/mediaDefault.js +4 -0
- package/es/utils/tools.js +2 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.11.62](https://github.com/kityandhero/antd-management-fast-framework/compare/antd-management-fast-framework@1.11.61...antd-management-fast-framework@1.11.62) (2021-12-23)
|
|
6
|
+
|
|
7
|
+
**Note:** Version bump only for package antd-management-fast-framework
|
|
8
|
+
|
|
9
|
+
### [1.11.61](https://github.com/kityandhero/antd-management-fast-framework/compare/antd-management-fast-framework@1.11.60...antd-management-fast-framework@1.11.61) (2021-12-23)
|
|
10
|
+
|
|
11
|
+
**Note:** Version bump only for package antd-management-fast-framework
|
|
12
|
+
|
|
13
|
+
### [1.11.60](https://github.com/kityandhero/antd-management-fast-framework/compare/antd-management-fast-framework@1.11.59...antd-management-fast-framework@1.11.60) (2021-12-23)
|
|
14
|
+
|
|
15
|
+
**Note:** Version bump only for package antd-management-fast-framework
|
|
16
|
+
|
|
17
|
+
### [1.11.59](https://github.com/kityandhero/antd-management-fast-framework/compare/antd-management-fast-framework@1.11.58...antd-management-fast-framework@1.11.59) (2021-12-21)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package antd-management-fast-framework
|
|
20
|
+
|
|
21
|
+
### [1.11.58](https://github.com/kityandhero/antd-management-fast-framework/compare/antd-management-fast-framework@1.11.57...antd-management-fast-framework@1.11.58) (2021-12-21)
|
|
22
|
+
|
|
23
|
+
### Performance Improvements
|
|
24
|
+
|
|
25
|
+
- update ([05403da](https://github.com/kityandhero/antd-management-fast-framework/commit/05403da1c4e2f9423e32a8ad2f4b7a765465dd60))
|
|
26
|
+
|
|
5
27
|
### [1.11.57](https://github.com/kityandhero/antd-management-fast-framework/compare/antd-management-fast-framework@1.11.56...antd-management-fast-framework@1.11.57) (2021-12-21)
|
|
6
28
|
|
|
7
29
|
### Performance Improvements
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
export default MobilePreviewDrawer;
|
|
2
2
|
declare class MobilePreviewDrawer extends BaseNeedlessLoadDrawer {
|
|
3
3
|
constructor(props: any);
|
|
4
|
+
establishExtraActionConfig: () => {
|
|
5
|
+
list: {
|
|
6
|
+
buildType: string;
|
|
7
|
+
label: string;
|
|
8
|
+
value: any;
|
|
9
|
+
renderItemFunction: () => any[] | null;
|
|
10
|
+
onChangeCallback: (v: any) => void;
|
|
11
|
+
}[];
|
|
12
|
+
};
|
|
4
13
|
renderInnerView: () => null;
|
|
5
14
|
}
|
|
6
15
|
declare namespace MobilePreviewDrawer {
|
|
@@ -2,6 +2,7 @@ export default Common;
|
|
|
2
2
|
declare class Common extends Core {
|
|
3
3
|
static getDerivedStateFromProps(nextProps: any, prevState: any): any;
|
|
4
4
|
constructor(props: any);
|
|
5
|
+
showExtraActionDivider: boolean;
|
|
5
6
|
loadDataAfterMount: boolean;
|
|
6
7
|
lastRequestingData: {
|
|
7
8
|
type: string;
|
|
@@ -14,7 +15,6 @@ declare class Common extends Core {
|
|
|
14
15
|
dataSuccess: boolean;
|
|
15
16
|
};
|
|
16
17
|
};
|
|
17
|
-
getHtmlEditorContent: () => any;
|
|
18
18
|
/**
|
|
19
19
|
* 处理其他需要在组件挂在之后执行的流程
|
|
20
20
|
*
|
|
@@ -175,13 +175,14 @@ declare class Common extends Core {
|
|
|
175
175
|
items: any;
|
|
176
176
|
index: any;
|
|
177
177
|
}) => JSX.Element;
|
|
178
|
-
|
|
179
|
-
keyPrefix?: string | undefined;
|
|
180
|
-
configList: any;
|
|
181
|
-
}) => any[];
|
|
182
|
-
buildTabBarExtraContentItemsCore: ({ keyPrefix, configList }: {
|
|
178
|
+
buildByExtraBuildType: ({ keyPrefix, configList }: {
|
|
183
179
|
keyPrefix?: string | undefined;
|
|
184
180
|
configList: any;
|
|
185
181
|
}) => any[];
|
|
182
|
+
establishExtraActionConfig: () => null;
|
|
183
|
+
establishExtraActionGroupConfig: () => null;
|
|
184
|
+
establishExtraActionEllipsisConfig: () => null;
|
|
185
|
+
buildExtraBackAction: () => null;
|
|
186
|
+
buildExtraAction: () => JSX.Element;
|
|
186
187
|
}
|
|
187
188
|
import Core from "../Core";
|
|
@@ -151,6 +151,7 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
151
151
|
_classCallCheck(this, Common);
|
|
152
152
|
|
|
153
153
|
_this = _super.call(this, _props);
|
|
154
|
+
_this.showExtraActionDivider = false;
|
|
154
155
|
_this.loadDataAfterMount = true;
|
|
155
156
|
_this.lastRequestingData = {
|
|
156
157
|
type: '',
|
|
@@ -193,11 +194,6 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
193
194
|
};
|
|
194
195
|
};
|
|
195
196
|
|
|
196
|
-
_this.getHtmlEditorContent = function () {
|
|
197
|
-
var htmlEditor = _this.state.htmlEditor;
|
|
198
|
-
return html == null ? '' : htmlEditor.toHTML();
|
|
199
|
-
};
|
|
200
|
-
|
|
201
197
|
_this.initOther = function () {};
|
|
202
198
|
|
|
203
199
|
_this.init = function () {
|
|
@@ -1433,7 +1429,11 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
1433
1429
|
});
|
|
1434
1430
|
}
|
|
1435
1431
|
|
|
1436
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
1432
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1433
|
+
style: {
|
|
1434
|
+
backgroundColor: '#f0f2f5'
|
|
1435
|
+
}
|
|
1436
|
+
}, /*#__PURE__*/_react.default.createElement(_space.default, {
|
|
1437
1437
|
style: {
|
|
1438
1438
|
width: '100%'
|
|
1439
1439
|
},
|
|
@@ -1447,7 +1447,7 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
1447
1447
|
config: item,
|
|
1448
1448
|
key: index
|
|
1449
1449
|
});
|
|
1450
|
-
}));
|
|
1450
|
+
})));
|
|
1451
1451
|
};
|
|
1452
1452
|
|
|
1453
1453
|
_this.renderSiderArea = function () {
|
|
@@ -1509,7 +1509,12 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
1509
1509
|
minHeight: 'auto'
|
|
1510
1510
|
}
|
|
1511
1511
|
}), layoutConfig || {});
|
|
1512
|
-
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,
|
|
1512
|
+
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, {
|
|
1513
|
+
style: {
|
|
1514
|
+
backgroundColor: '#fff',
|
|
1515
|
+
borderRadius: '4px'
|
|
1516
|
+
}
|
|
1517
|
+
}, contentArea), siderPosition !== 'left' ? /*#__PURE__*/_react.default.createElement(Sider, siderConfig, siderArea) : null);
|
|
1513
1518
|
|
|
1514
1519
|
var toolbar = _this.buildToolBarWrapper();
|
|
1515
1520
|
|
|
@@ -1626,7 +1631,7 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
1626
1631
|
});
|
|
1627
1632
|
}
|
|
1628
1633
|
|
|
1629
|
-
var extraItems = _this.
|
|
1634
|
+
var extraItems = _this.buildByExtraBuildType({
|
|
1630
1635
|
keyPrefix: "formContent_key_".concat(cardItemKey, "_extra"),
|
|
1631
1636
|
configList: extraListData
|
|
1632
1637
|
});
|
|
@@ -2154,7 +2159,7 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
2154
2159
|
split: (0, _tools.isBoolean)(contentItem.split || false) ? contentItem.split || false ? /*#__PURE__*/_react.default.createElement(_divider.default, {
|
|
2155
2160
|
type: "vertical"
|
|
2156
2161
|
}) : null : contentItem.split
|
|
2157
|
-
}, _this.
|
|
2162
|
+
}, _this.buildByExtraBuildType({
|
|
2158
2163
|
keyPrefix: "form_card_".concat(contentIndex, "_action_key"),
|
|
2159
2164
|
configList: contentItem.config || []
|
|
2160
2165
|
})) : null, type === _constants.cardConfig.contentItemType.component ? contentItem.component || null : null, type === _constants.cardConfig.contentItemType.jsonView ? _this.renderJsonView(contentItem.value) : null, type === _constants.cardConfig.contentItemType.nowTime ? _this.renderFormNowTimeField({
|
|
@@ -2163,7 +2168,7 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
2163
2168
|
}) : null);
|
|
2164
2169
|
};
|
|
2165
2170
|
|
|
2166
|
-
_this.
|
|
2171
|
+
_this.buildByExtraBuildType = function (_ref9) {
|
|
2167
2172
|
var _ref9$keyPrefix = _ref9.keyPrefix,
|
|
2168
2173
|
keyPrefix = _ref9$keyPrefix === void 0 ? '' : _ref9$keyPrefix,
|
|
2169
2174
|
configList = _ref9.configList;
|
|
@@ -2182,15 +2187,15 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
2182
2187
|
componentSource = _hidden$buildType$ico.component;
|
|
2183
2188
|
|
|
2184
2189
|
if (!hidden) {
|
|
2185
|
-
var itemKey = "".concat(keyPrefix
|
|
2190
|
+
var itemKey = "".concat(keyPrefix, "_").concat(index);
|
|
2186
2191
|
var itemAdjust = item;
|
|
2187
2192
|
|
|
2188
2193
|
switch (buildType) {
|
|
2189
|
-
case _constants.
|
|
2194
|
+
case _constants.extraBuildType.refresh:
|
|
2190
2195
|
itemAdjust = _this.renderRefreshButton(item);
|
|
2191
2196
|
break;
|
|
2192
2197
|
|
|
2193
|
-
case _constants.
|
|
2198
|
+
case _constants.extraBuildType.save:
|
|
2194
2199
|
itemAdjust = _this.renderSaveButton(item);
|
|
2195
2200
|
break;
|
|
2196
2201
|
|
|
@@ -2198,35 +2203,43 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
2198
2203
|
itemAdjust = _this.renderGeneralButton(item);
|
|
2199
2204
|
break;
|
|
2200
2205
|
|
|
2201
|
-
case _constants.
|
|
2206
|
+
case _constants.extraBuildType.flexSelect:
|
|
2202
2207
|
itemAdjust = (0, _FunctionComponent.buildCustomSelect)(item);
|
|
2203
2208
|
break;
|
|
2204
2209
|
|
|
2205
|
-
case _constants.
|
|
2210
|
+
case _constants.extraBuildType.button:
|
|
2206
2211
|
itemAdjust = (0, _FunctionComponent.buildButton)(item);
|
|
2207
2212
|
break;
|
|
2208
2213
|
|
|
2209
|
-
case _constants.
|
|
2214
|
+
case _constants.extraBuildType.dropdown:
|
|
2210
2215
|
itemAdjust = (0, _FunctionComponent.buildDropdown)(item);
|
|
2211
2216
|
break;
|
|
2212
2217
|
|
|
2213
|
-
case _constants.
|
|
2218
|
+
case _constants.extraBuildType.dropdownButton:
|
|
2214
2219
|
itemAdjust = (0, _FunctionComponent.buildDropdownButton)(item);
|
|
2215
2220
|
break;
|
|
2216
2221
|
|
|
2217
|
-
case _constants.
|
|
2222
|
+
case _constants.extraBuildType.dropdownEllipsis:
|
|
2218
2223
|
itemAdjust = (0, _FunctionComponent.buildDropdownEllipsis)(item);
|
|
2219
2224
|
break;
|
|
2220
2225
|
|
|
2221
|
-
case _constants.
|
|
2222
|
-
itemAdjust = /*#__PURE__*/_react.default.createElement(
|
|
2226
|
+
case _constants.extraBuildType.iconInfo:
|
|
2227
|
+
itemAdjust = /*#__PURE__*/_react.default.createElement("div", {
|
|
2228
|
+
style: {
|
|
2229
|
+
padding: '0 8px'
|
|
2230
|
+
}
|
|
2231
|
+
}, /*#__PURE__*/_react.default.createElement(_IconInfo.default, item));
|
|
2223
2232
|
break;
|
|
2224
2233
|
|
|
2225
|
-
case _constants.
|
|
2226
|
-
itemAdjust = /*#__PURE__*/_react.default.createElement(
|
|
2234
|
+
case _constants.extraBuildType.colorText:
|
|
2235
|
+
itemAdjust = /*#__PURE__*/_react.default.createElement("div", {
|
|
2236
|
+
style: {
|
|
2237
|
+
padding: '0 8px'
|
|
2238
|
+
}
|
|
2239
|
+
}, /*#__PURE__*/_react.default.createElement(_ColorText.default, item));
|
|
2227
2240
|
break;
|
|
2228
2241
|
|
|
2229
|
-
case _constants.
|
|
2242
|
+
case _constants.extraBuildType.component:
|
|
2230
2243
|
itemAdjust = componentSource || null;
|
|
2231
2244
|
break;
|
|
2232
2245
|
|
|
@@ -2248,91 +2261,103 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
2248
2261
|
return list;
|
|
2249
2262
|
};
|
|
2250
2263
|
|
|
2251
|
-
_this.
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
configList = _ref10.configList;
|
|
2255
|
-
var list = [];
|
|
2256
|
-
((0, _tools.isArray)(configList) ? configList : []).forEach(function (item, index) {
|
|
2257
|
-
if ((item || null) != null) {
|
|
2258
|
-
var _hidden$buildType$ico2 = _objectSpread(_objectSpread({}, {
|
|
2259
|
-
hidden: false,
|
|
2260
|
-
buildType: null,
|
|
2261
|
-
icon: null,
|
|
2262
|
-
text: '',
|
|
2263
|
-
component: null
|
|
2264
|
-
}), item),
|
|
2265
|
-
hidden = _hidden$buildType$ico2.hidden,
|
|
2266
|
-
buildType = _hidden$buildType$ico2.buildType,
|
|
2267
|
-
componentSource = _hidden$buildType$ico2.component;
|
|
2264
|
+
_this.establishExtraActionConfig = function () {
|
|
2265
|
+
return null;
|
|
2266
|
+
};
|
|
2268
2267
|
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2268
|
+
_this.establishExtraActionGroupConfig = function () {
|
|
2269
|
+
return null;
|
|
2270
|
+
};
|
|
2272
2271
|
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
break;
|
|
2272
|
+
_this.establishExtraActionEllipsisConfig = function () {
|
|
2273
|
+
return null;
|
|
2274
|
+
};
|
|
2277
2275
|
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2276
|
+
_this.buildExtraBackAction = function () {
|
|
2277
|
+
return null;
|
|
2278
|
+
};
|
|
2281
2279
|
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2280
|
+
_this.buildExtraAction = function () {
|
|
2281
|
+
var _this$state2 = _this.state,
|
|
2282
|
+
dataLoading = _this$state2.dataLoading,
|
|
2283
|
+
reloading = _this$state2.reloading,
|
|
2284
|
+
refreshing = _this$state2.refreshing,
|
|
2285
|
+
showReloadButton = _this$state2.showReloadButton;
|
|
2285
2286
|
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2287
|
+
var _keyPrefix$list$_this = _objectSpread(_objectSpread({}, {
|
|
2288
|
+
keyPrefix: '',
|
|
2289
|
+
list: []
|
|
2290
|
+
}), _this.establishExtraActionConfig()),
|
|
2291
|
+
keyPrefix = _keyPrefix$list$_this.keyPrefix,
|
|
2292
|
+
configList = _keyPrefix$list$_this.list;
|
|
2289
2293
|
|
|
2290
|
-
|
|
2291
|
-
itemAdjust = (0, _FunctionComponent.buildDropdownEllipsis)(item);
|
|
2292
|
-
break;
|
|
2294
|
+
var keyPrefixAdjust = keyPrefix || 'extraActionItem';
|
|
2293
2295
|
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
}
|
|
2299
|
-
}, /*#__PURE__*/_react.default.createElement(_IconInfo.default, item));
|
|
2300
|
-
break;
|
|
2296
|
+
var listAction = _this.buildByExtraBuildType({
|
|
2297
|
+
keyPrefix: keyPrefixAdjust,
|
|
2298
|
+
configList: configList
|
|
2299
|
+
});
|
|
2301
2300
|
|
|
2302
|
-
|
|
2303
|
-
itemAdjust = /*#__PURE__*/_react.default.createElement("div", {
|
|
2304
|
-
style: {
|
|
2305
|
-
padding: '0 8px'
|
|
2306
|
-
}
|
|
2307
|
-
}, /*#__PURE__*/_react.default.createElement(_ColorText.default, item));
|
|
2308
|
-
break;
|
|
2301
|
+
var buttonGroupData = _this.establishExtraActionGroupConfig();
|
|
2309
2302
|
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
break;
|
|
2303
|
+
if ((buttonGroupData || null) != null) {
|
|
2304
|
+
var buttonGroup = (0, _FunctionComponent.buildButtonGroup)(buttonGroupData);
|
|
2313
2305
|
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
break;
|
|
2321
|
-
}
|
|
2306
|
+
if ((buttonGroup || null) != null) {
|
|
2307
|
+
listAction.push( /*#__PURE__*/_react.default.createElement(_react.Fragment, {
|
|
2308
|
+
key: "".concat(keyPrefixAdjust, "_buttonGroup")
|
|
2309
|
+
}, buttonGroup));
|
|
2310
|
+
}
|
|
2311
|
+
}
|
|
2322
2312
|
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2313
|
+
var ellipsisActionData = _this.establishExtraActionEllipsisConfig();
|
|
2314
|
+
|
|
2315
|
+
if ((ellipsisActionData || null) != null) {
|
|
2316
|
+
var dropdownEllipsis = (0, _FunctionComponent.buildDropdownEllipsis)(ellipsisActionData);
|
|
2317
|
+
|
|
2318
|
+
if ((dropdownEllipsis || null) != null) {
|
|
2319
|
+
listAction.push( /*#__PURE__*/_react.default.createElement(_react.Fragment, {
|
|
2320
|
+
key: "".concat(keyPrefixAdjust, "_dropdownEllipsis")
|
|
2321
|
+
}, dropdownEllipsis));
|
|
2327
2322
|
}
|
|
2328
|
-
}
|
|
2329
|
-
|
|
2323
|
+
}
|
|
2324
|
+
|
|
2325
|
+
var backAction = _this.buildExtraBackAction();
|
|
2326
|
+
|
|
2327
|
+
if ((backAction || null) != null) {
|
|
2328
|
+
listAction.push( /*#__PURE__*/_react.default.createElement(_react.Fragment, {
|
|
2329
|
+
key: "".concat(keyPrefixAdjust, "_dropdownEllipsis")
|
|
2330
|
+
}, backAction));
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
if (showReloadButton) {
|
|
2334
|
+
listAction.push( /*#__PURE__*/_react.default.createElement(_react.Fragment, {
|
|
2335
|
+
key: "".concat(keyPrefixAdjust, "_dropdownEllipsis")
|
|
2336
|
+
}, /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
2337
|
+
placement: "top",
|
|
2338
|
+
title: "\u5237\u65B0"
|
|
2339
|
+
}, /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
2340
|
+
disabled: dataLoading || reloading || refreshing,
|
|
2341
|
+
type: "dashed",
|
|
2342
|
+
onClick: function onClick() {
|
|
2343
|
+
_this.reloadData();
|
|
2344
|
+
}
|
|
2345
|
+
}, reloading || refreshing ? /*#__PURE__*/_react.default.createElement(_icons.LoadingOutlined, null) : /*#__PURE__*/_react.default.createElement(_icons.ReloadOutlined, null)))));
|
|
2346
|
+
}
|
|
2347
|
+
|
|
2348
|
+
return /*#__PURE__*/_react.default.createElement(_space.default, {
|
|
2349
|
+
split: !!_this.showExtraActionDivider || false ? /*#__PURE__*/_react.default.createElement(_divider.default, {
|
|
2350
|
+
type: "vertical"
|
|
2351
|
+
}) : null
|
|
2352
|
+
}, listAction.map(function (o) {
|
|
2353
|
+
return o;
|
|
2354
|
+
}));
|
|
2330
2355
|
};
|
|
2331
2356
|
|
|
2332
2357
|
var defaultState = (0, _tools.defaultCommonState)();
|
|
2333
2358
|
_this.state = _objectSpread(_objectSpread({}, defaultState), {
|
|
2334
2359
|
backPath: '',
|
|
2335
|
-
|
|
2360
|
+
showReloadButton: false
|
|
2336
2361
|
});
|
|
2337
2362
|
return _this;
|
|
2338
2363
|
}
|
|
@@ -2369,13 +2394,13 @@ var Common = /*#__PURE__*/function (_Core) {
|
|
|
2369
2394
|
}, {
|
|
2370
2395
|
key: "checkWorkDoing",
|
|
2371
2396
|
value: function checkWorkDoing() {
|
|
2372
|
-
var _this$
|
|
2373
|
-
dataLoading = _this$
|
|
2374
|
-
reloading = _this$
|
|
2375
|
-
searching = _this$
|
|
2376
|
-
refreshing = _this$
|
|
2377
|
-
paging = _this$
|
|
2378
|
-
processing = _this$
|
|
2397
|
+
var _this$state3 = this.state,
|
|
2398
|
+
dataLoading = _this$state3.dataLoading,
|
|
2399
|
+
reloading = _this$state3.reloading,
|
|
2400
|
+
searching = _this$state3.searching,
|
|
2401
|
+
refreshing = _this$state3.refreshing,
|
|
2402
|
+
paging = _this$state3.paging,
|
|
2403
|
+
processing = _this$state3.processing;
|
|
2379
2404
|
|
|
2380
2405
|
if (dataLoading || reloading || searching || refreshing || paging || processing) {
|
|
2381
2406
|
var text = '数据正在处理中,请稍等一下再点哦';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export default Base;
|
|
2
2
|
declare class Base extends BaseWindow {
|
|
3
3
|
constructor(props: any);
|
|
4
|
-
showExtraActionDivider: boolean;
|
|
5
4
|
state: {
|
|
6
5
|
title: string;
|
|
7
6
|
width: number;
|
|
@@ -40,10 +39,6 @@ declare class Base extends BaseWindow {
|
|
|
40
39
|
establishWrapperTypeConfig: () => {
|
|
41
40
|
mode: string;
|
|
42
41
|
};
|
|
43
|
-
establishExtraActionConfig: () => null;
|
|
44
|
-
establishExtraActionGroupConfig: () => null;
|
|
45
|
-
establishExtraActionEllipsisConfig: () => null;
|
|
46
|
-
buildExtraAction: () => JSX.Element;
|
|
47
42
|
formContent: () => any;
|
|
48
43
|
renderContentContainor: () => JSX.Element;
|
|
49
44
|
renderCloseButton: (option: any) => any;
|
|
@@ -49,8 +49,6 @@ var _constants = require("../../../utils/constants");
|
|
|
49
49
|
|
|
50
50
|
var _IconInfo = _interopRequireDefault(require("../../../customComponents/IconInfo"));
|
|
51
51
|
|
|
52
|
-
var _ColorText = _interopRequireDefault(require("../../../customComponents/ColorText"));
|
|
53
|
-
|
|
54
52
|
var _FunctionComponent = require("../../../customComponents/FunctionComponent");
|
|
55
53
|
|
|
56
54
|
var _BaseWindow2 = _interopRequireDefault(require("../../DataOperation/BaseWindow"));
|
|
@@ -117,7 +115,6 @@ var Base = /*#__PURE__*/function (_BaseWindow) {
|
|
|
117
115
|
_classCallCheck(this, Base);
|
|
118
116
|
|
|
119
117
|
_this = _super.call(this, props);
|
|
120
|
-
_this.showExtraActionDivider = true;
|
|
121
118
|
|
|
122
119
|
_this.onClose = function () {
|
|
123
120
|
var afterClose = _this.props.afterClose;
|
|
@@ -195,127 +192,6 @@ var Base = /*#__PURE__*/function (_BaseWindow) {
|
|
|
195
192
|
};
|
|
196
193
|
};
|
|
197
194
|
|
|
198
|
-
_this.establishExtraActionConfig = function () {
|
|
199
|
-
return null;
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
_this.establishExtraActionGroupConfig = function () {
|
|
203
|
-
return null;
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
_this.establishExtraActionEllipsisConfig = function () {
|
|
207
|
-
return null;
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
_this.buildExtraAction = function () {
|
|
211
|
-
var listAction = [];
|
|
212
|
-
|
|
213
|
-
var _keyPrefix$list$_this = _objectSpread(_objectSpread({}, {
|
|
214
|
-
keyPrefix: '',
|
|
215
|
-
list: []
|
|
216
|
-
}), _this.establishExtraActionConfig()),
|
|
217
|
-
keyPrefix = _keyPrefix$list$_this.keyPrefix,
|
|
218
|
-
configList = _keyPrefix$list$_this.list;
|
|
219
|
-
|
|
220
|
-
((0, _tools.isArray)(configList) ? configList : []).forEach(function (item, index) {
|
|
221
|
-
if ((item || null) != null) {
|
|
222
|
-
var _hidden$buildType$ico = _objectSpread(_objectSpread({}, {
|
|
223
|
-
hidden: false,
|
|
224
|
-
buildType: null,
|
|
225
|
-
icon: null,
|
|
226
|
-
text: '',
|
|
227
|
-
component: null
|
|
228
|
-
}), item),
|
|
229
|
-
hidden = _hidden$buildType$ico.hidden,
|
|
230
|
-
buildType = _hidden$buildType$ico.buildType,
|
|
231
|
-
componentSource = _hidden$buildType$ico.component;
|
|
232
|
-
|
|
233
|
-
if (!hidden) {
|
|
234
|
-
var itemKey = "".concat(keyPrefix || 'drawerExtraActionItem', "_").concat(index);
|
|
235
|
-
var itemAdjust = item;
|
|
236
|
-
|
|
237
|
-
switch (buildType) {
|
|
238
|
-
case _constants.drawerConfig.extraBuildType.flexSelect:
|
|
239
|
-
itemAdjust = (0, _FunctionComponent.buildCustomSelect)(item);
|
|
240
|
-
break;
|
|
241
|
-
|
|
242
|
-
case _constants.drawerConfig.extraBuildType.button:
|
|
243
|
-
itemAdjust = (0, _FunctionComponent.buildButton)(item);
|
|
244
|
-
break;
|
|
245
|
-
|
|
246
|
-
case _constants.drawerConfig.extraBuildType.dropdown:
|
|
247
|
-
itemAdjust = (0, _FunctionComponent.buildDropdown)(item);
|
|
248
|
-
break;
|
|
249
|
-
|
|
250
|
-
case _constants.drawerConfig.extraBuildType.dropdownButton:
|
|
251
|
-
itemAdjust = (0, _FunctionComponent.buildDropdownButton)(item);
|
|
252
|
-
break;
|
|
253
|
-
|
|
254
|
-
case _constants.drawerConfig.extraBuildType.dropdownEllipsis:
|
|
255
|
-
itemAdjust = (0, _FunctionComponent.buildDropdownEllipsis)(item);
|
|
256
|
-
break;
|
|
257
|
-
|
|
258
|
-
case _constants.drawerConfig.extraBuildType.iconInfo:
|
|
259
|
-
itemAdjust = /*#__PURE__*/_react.default.createElement(_IconInfo.default, item);
|
|
260
|
-
break;
|
|
261
|
-
|
|
262
|
-
case _constants.drawerConfig.extraBuildType.colorText:
|
|
263
|
-
itemAdjust = /*#__PURE__*/_react.default.createElement(_ColorText.default, item);
|
|
264
|
-
break;
|
|
265
|
-
|
|
266
|
-
case _constants.drawerConfig.extraBuildType.component:
|
|
267
|
-
itemAdjust = componentSource || null;
|
|
268
|
-
break;
|
|
269
|
-
|
|
270
|
-
default:
|
|
271
|
-
recordObject({
|
|
272
|
-
message: '未找到匹配的构建模式',
|
|
273
|
-
config: item
|
|
274
|
-
});
|
|
275
|
-
itemAdjust = null;
|
|
276
|
-
break;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
listAction.push( /*#__PURE__*/_react.default.createElement(_react.Fragment, {
|
|
280
|
-
key: itemKey
|
|
281
|
-
}, itemAdjust));
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
});
|
|
285
|
-
|
|
286
|
-
var buttonGroupData = _this.establishExtraActionGroupConfig();
|
|
287
|
-
|
|
288
|
-
if ((buttonGroupData || null) != null) {
|
|
289
|
-
var buttonGroup = (0, _FunctionComponent.buildButtonGroup)(buttonGroupData);
|
|
290
|
-
|
|
291
|
-
if ((buttonGroup || null) != null) {
|
|
292
|
-
listAction.push( /*#__PURE__*/_react.default.createElement(_react.Fragment, {
|
|
293
|
-
key: "".concat(keyPrefix || 'drawerExtraActionItem', "_buttonGroup")
|
|
294
|
-
}, buttonGroup));
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
var ellipsisActionData = _this.establishExtraActionEllipsisConfig();
|
|
299
|
-
|
|
300
|
-
if ((ellipsisActionData || null) != null) {
|
|
301
|
-
var dropdownEllipsis = (0, _FunctionComponent.buildDropdownEllipsis)(ellipsisActionData);
|
|
302
|
-
|
|
303
|
-
if ((dropdownEllipsis || null) != null) {
|
|
304
|
-
listAction.push( /*#__PURE__*/_react.default.createElement(_react.Fragment, {
|
|
305
|
-
key: "".concat(keyPrefix || 'drawerExtraActionItem', "_dropdownEllipsis")
|
|
306
|
-
}, dropdownEllipsis));
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
return /*#__PURE__*/_react.default.createElement(_space.default, {
|
|
311
|
-
split: !!_this.showExtraActionDivider || false ? /*#__PURE__*/_react.default.createElement(_divider.default, {
|
|
312
|
-
type: "vertical"
|
|
313
|
-
}) : null
|
|
314
|
-
}, listAction.map(function (o) {
|
|
315
|
-
return o;
|
|
316
|
-
}));
|
|
317
|
-
};
|
|
318
|
-
|
|
319
195
|
_this.formContent = function () {
|
|
320
196
|
return _this.buildCardCollection(_this.establishCardCollectionConfig());
|
|
321
197
|
};
|
|
@@ -367,18 +243,18 @@ var Base = /*#__PURE__*/function (_BaseWindow) {
|
|
|
367
243
|
|
|
368
244
|
configList.forEach(function (item, index) {
|
|
369
245
|
if ((item || null) != null) {
|
|
370
|
-
var _hidden$buildType$
|
|
246
|
+
var _hidden$buildType$ico = _objectSpread(_objectSpread({}, {
|
|
371
247
|
hidden: false,
|
|
372
248
|
buildType: null,
|
|
373
249
|
icon: null,
|
|
374
250
|
text: '',
|
|
375
251
|
component: null
|
|
376
252
|
}), item),
|
|
377
|
-
hidden = _hidden$buildType$
|
|
378
|
-
itemBuildType = _hidden$buildType$
|
|
379
|
-
itemIcon = _hidden$buildType$
|
|
380
|
-
itemText = _hidden$buildType$
|
|
381
|
-
itemComponent = _hidden$buildType$
|
|
253
|
+
hidden = _hidden$buildType$ico.hidden,
|
|
254
|
+
itemBuildType = _hidden$buildType$ico.buildType,
|
|
255
|
+
itemIcon = _hidden$buildType$ico.icon,
|
|
256
|
+
itemText = _hidden$buildType$ico.text,
|
|
257
|
+
itemComponent = _hidden$buildType$ico.component;
|
|
382
258
|
|
|
383
259
|
var itemHidden = hidden;
|
|
384
260
|
|
|
@@ -311,7 +311,7 @@ var BaseAddForm = /*#__PURE__*/function (_DataCore) {
|
|
|
311
311
|
title: (0, _FunctionComponent.buildPageHeaderTitle)(this.getPageName(), this.establishPageHeaderTitlePrefix()),
|
|
312
312
|
subTitle: this.buildPageHeaderSubTitle(),
|
|
313
313
|
tags: (0, _FunctionComponent.buildPageHeaderTagWrapper)(this.establishPageHeaderTagConfig()),
|
|
314
|
-
extra: this.
|
|
314
|
+
extra: this.buildExtraAction(),
|
|
315
315
|
content: (0, _FunctionComponent.buildPageHeaderContent)(pageHeaderContentConfig),
|
|
316
316
|
extraContent: (0, _FunctionComponent.pageHeaderExtraContent)(this.establishPageHeaderExtraContentConfig()) // onBack={() => {
|
|
317
317
|
// this.backToList();
|
|
@@ -90,7 +90,7 @@ declare class ListBase extends AuthorizationWrapper {
|
|
|
90
90
|
renderAlertOption: () => void;
|
|
91
91
|
renderAboveTable: () => JSX.Element | null;
|
|
92
92
|
establishDataContainerExtraActionCollectionConfig: () => never[];
|
|
93
|
-
buildDataContainerExtraActionCollection: () => any
|
|
93
|
+
buildDataContainerExtraActionCollection: () => any;
|
|
94
94
|
renderExtraActionView: () => JSX.Element | null;
|
|
95
95
|
renderBatchActionMenu: () => never[];
|
|
96
96
|
renderBatchAction: () => JSX.Element | null;
|
|
@@ -124,9 +124,6 @@ declare class ListBase extends AuthorizationWrapper {
|
|
|
124
124
|
* 不要在框架之外重载或覆盖该该函数,否则分页视图将功能异常
|
|
125
125
|
*/
|
|
126
126
|
supplementPaginationConfig: () => any;
|
|
127
|
-
establishPageHeaderActionExtraGroupConfig: () => null;
|
|
128
|
-
establishPageHeaderActionExtraEllipsisConfig: () => null;
|
|
129
|
-
buildPageHeaderAction: () => JSX.Element;
|
|
130
127
|
establishPageHeaderTagCollectionConfig: () => never[];
|
|
131
128
|
establishPageHeaderTagConfig: () => JSX.Element | null;
|
|
132
129
|
establishPageHeaderAvatarConfig: () => null;
|