antd-management-fast-framework 1.9.11 → 1.9.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/configGroup/configGeneral.d.ts +47 -0
- package/es/configGroup/configGeneral.js +61 -0
- package/es/configGroup/themeCollection.d.ts +29 -0
- package/es/configGroup/themeCollection.js +117 -0
- package/es/configGroup/webpackPlugin.d.ts +11 -0
- package/es/configGroup/webpackPlugin.js +166 -0
- package/es/customComponents/ArticleListContent/index.js +5 -2
- package/es/customComponents/FunctionComponent/index.d.ts +4 -2
- package/es/customComponents/FunctionComponent/index.js +22 -3
- package/es/customComponents/PageLoading/index.d.ts +2 -0
- package/es/customComponents/PageLoading/index.js +13 -0
- package/es/customComponents/TimeLineCustom/index.d.ts +2 -2
- package/es/customComponents/TimeLineCustom/index.js +12 -4
- package/es/framework/Base/index.d.ts +25 -2
- package/es/framework/Base/index.js +164 -6
- package/es/framework/ButtonExtension/SelectButton/Base/index.d.ts +1 -1
- package/es/framework/ButtonExtension/SelectButton/Base/index.js +2 -2
- package/es/framework/Common/index.d.ts +20 -8
- package/es/framework/Common/index.js +278 -161
- package/es/framework/DataDrawer/Base/index.d.ts +1 -1
- package/es/framework/DataDrawer/Base/index.js +2 -2
- package/es/framework/DataDrawer/BaseLoadDrawer/index.js +2 -6
- package/es/framework/DataDrawer/BaseNeedlessLoadDrawer/index.js +4 -1
- package/es/framework/DataForm/BaseAddForm/index.js +46 -28
- package/es/framework/DataForm/BaseUpdateForm/index.js +42 -31
- package/es/framework/DataForm/BaseUpdateFormContent/index.js +2 -2
- package/es/framework/DataListView/Base/index.d.ts +2 -1
- package/es/framework/DataListView/Base/index.js +15 -17
- package/es/framework/DataMenuContainer/index.d.ts +1 -1
- package/es/framework/DataMenuContainer/index.js +2 -2
- package/es/framework/DataModal/Base/index.d.ts +1 -1
- package/es/framework/DataModal/Base/index.js +3 -3
- package/es/framework/DataModal/BaseLoadModal/index.js +3 -11
- package/es/framework/DataModal/BaseNeedlessLoadModal/index.js +4 -1
- package/es/framework/DataModal/BaseUpdateTransferModal/index.js +1 -1
- package/es/framework/DataMultiPageView/MultiPage/index.js +3 -4
- package/es/framework/DataMultiPageView/MultiPageDrawer/index.js +6 -10
- package/es/framework/DataOperation/BaseWindow/index.js +41 -30
- package/es/framework/DataSinglePageView/SinglePage/index.js +1 -3
- package/es/framework/DataSinglePageView/SinglePageDrawer/index.js +2 -2
- package/es/framework/DataSingleView/DataCore/index.d.ts +1 -1
- package/es/framework/DataSingleView/DataCore/index.js +2 -2
- package/es/framework/DataTabContainer/index.js +2 -2
- package/es/framework/FieldExtension/SelectFieldDrawer/SelectFieldBase/index.d.ts +1 -1
- package/es/framework/FieldExtension/SelectFieldDrawer/SelectFieldBase/index.js +4 -7
- package/es/utils/actionAssist.js +67 -54
- package/es/utils/constants.d.ts +4 -0
- package/es/utils/constants.js +5 -1
- package/es/utils/requestAssistor.js +15 -6
- package/es/utils/tools.d.ts +22 -6
- package/es/utils/tools.js +123 -68
- package/package.json +18 -17
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 占位函数
|
|
3
|
+
*
|
|
4
|
+
* @export
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export function empty(): {};
|
|
8
|
+
export namespace configGeneral {
|
|
9
|
+
export const hash: boolean;
|
|
10
|
+
export const alias: {};
|
|
11
|
+
export const antd: {};
|
|
12
|
+
export const analytics: boolean;
|
|
13
|
+
export namespace dva {
|
|
14
|
+
export const hmr: boolean;
|
|
15
|
+
}
|
|
16
|
+
export const locale: {
|
|
17
|
+
default: string;
|
|
18
|
+
antd: boolean;
|
|
19
|
+
baseNavigator: boolean;
|
|
20
|
+
};
|
|
21
|
+
export namespace targets {
|
|
22
|
+
export const ie: number;
|
|
23
|
+
}
|
|
24
|
+
export const title: boolean;
|
|
25
|
+
export const theme: {
|
|
26
|
+
'@border-radius-base': string;
|
|
27
|
+
};
|
|
28
|
+
export namespace define {
|
|
29
|
+
export const REACT_APP_ENV: string | boolean;
|
|
30
|
+
}
|
|
31
|
+
export const ignoreMomentLocale: boolean;
|
|
32
|
+
export namespace lessLoader {
|
|
33
|
+
export const javascriptEnabled: boolean;
|
|
34
|
+
}
|
|
35
|
+
export namespace manifest {
|
|
36
|
+
export const basePath: string;
|
|
37
|
+
}
|
|
38
|
+
export const history: {
|
|
39
|
+
type: string;
|
|
40
|
+
};
|
|
41
|
+
export const ssr: boolean;
|
|
42
|
+
export const mfsu: {};
|
|
43
|
+
export const fastRefresh: {};
|
|
44
|
+
export namespace extraCustomOption {
|
|
45
|
+
export const babelCompact: boolean;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.configGeneral = void 0;
|
|
7
|
+
exports.empty = empty;
|
|
8
|
+
var REACT_APP_ENV = process.env.REACT_APP_ENV;
|
|
9
|
+
var configGeneral = {
|
|
10
|
+
hash: true,
|
|
11
|
+
alias: {},
|
|
12
|
+
antd: {// dark: true,
|
|
13
|
+
},
|
|
14
|
+
analytics: false,
|
|
15
|
+
dva: {
|
|
16
|
+
hmr: true
|
|
17
|
+
},
|
|
18
|
+
locale: {
|
|
19
|
+
"default": 'zh-CN',
|
|
20
|
+
antd: true,
|
|
21
|
+
baseNavigator: true
|
|
22
|
+
},
|
|
23
|
+
targets: {
|
|
24
|
+
ie: 11
|
|
25
|
+
},
|
|
26
|
+
title: false,
|
|
27
|
+
theme: {
|
|
28
|
+
'@border-radius-base': '4px'
|
|
29
|
+
},
|
|
30
|
+
define: {
|
|
31
|
+
REACT_APP_ENV: REACT_APP_ENV || false
|
|
32
|
+
},
|
|
33
|
+
ignoreMomentLocale: true,
|
|
34
|
+
lessLoader: {
|
|
35
|
+
javascriptEnabled: true
|
|
36
|
+
},
|
|
37
|
+
manifest: {
|
|
38
|
+
basePath: '/'
|
|
39
|
+
},
|
|
40
|
+
history: {
|
|
41
|
+
type: 'hash'
|
|
42
|
+
},
|
|
43
|
+
ssr: false,
|
|
44
|
+
mfsu: {},
|
|
45
|
+
fastRefresh: {},
|
|
46
|
+
extraCustomOption: {
|
|
47
|
+
babelCompact: false
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* 占位函数
|
|
52
|
+
*
|
|
53
|
+
* @export
|
|
54
|
+
* @returns
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
exports.configGeneral = configGeneral;
|
|
58
|
+
|
|
59
|
+
function empty() {
|
|
60
|
+
return {};
|
|
61
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 占位函数
|
|
3
|
+
*
|
|
4
|
+
* @export
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export function empty(): {};
|
|
8
|
+
export namespace configGeneral {
|
|
9
|
+
export const list: ({
|
|
10
|
+
key: string;
|
|
11
|
+
fileName: string;
|
|
12
|
+
theme: string;
|
|
13
|
+
modifyVars?: undefined;
|
|
14
|
+
} | {
|
|
15
|
+
key: string;
|
|
16
|
+
fileName: string;
|
|
17
|
+
modifyVars: {
|
|
18
|
+
'@primary-color': string;
|
|
19
|
+
};
|
|
20
|
+
theme?: undefined;
|
|
21
|
+
} | {
|
|
22
|
+
key: string;
|
|
23
|
+
theme: string;
|
|
24
|
+
fileName: string;
|
|
25
|
+
modifyVars: {
|
|
26
|
+
'@primary-color': string;
|
|
27
|
+
};
|
|
28
|
+
})[];
|
|
29
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.configGeneral = void 0;
|
|
7
|
+
exports.empty = empty;
|
|
8
|
+
var configGeneral = {
|
|
9
|
+
list: [{
|
|
10
|
+
key: 'dark',
|
|
11
|
+
fileName: 'dark.css',
|
|
12
|
+
theme: 'dark'
|
|
13
|
+
}, {
|
|
14
|
+
key: 'dust',
|
|
15
|
+
fileName: 'dust.css',
|
|
16
|
+
modifyVars: {
|
|
17
|
+
'@primary-color': '#F5222D'
|
|
18
|
+
}
|
|
19
|
+
}, {
|
|
20
|
+
key: 'volcano',
|
|
21
|
+
fileName: 'volcano.css',
|
|
22
|
+
modifyVars: {
|
|
23
|
+
'@primary-color': '#FA541C'
|
|
24
|
+
}
|
|
25
|
+
}, {
|
|
26
|
+
key: 'sunset',
|
|
27
|
+
fileName: 'sunset.css',
|
|
28
|
+
modifyVars: {
|
|
29
|
+
'@primary-color': '#FAAD14'
|
|
30
|
+
}
|
|
31
|
+
}, {
|
|
32
|
+
key: 'cyan',
|
|
33
|
+
fileName: 'cyan.css',
|
|
34
|
+
modifyVars: {
|
|
35
|
+
'@primary-color': '#13C2C2'
|
|
36
|
+
}
|
|
37
|
+
}, {
|
|
38
|
+
key: 'green',
|
|
39
|
+
fileName: 'green.css',
|
|
40
|
+
modifyVars: {
|
|
41
|
+
'@primary-color': '#52C41A'
|
|
42
|
+
}
|
|
43
|
+
}, {
|
|
44
|
+
key: 'geekblue',
|
|
45
|
+
fileName: 'geekblue.css',
|
|
46
|
+
modifyVars: {
|
|
47
|
+
'@primary-color': '#2F54EB'
|
|
48
|
+
}
|
|
49
|
+
}, {
|
|
50
|
+
key: 'purple',
|
|
51
|
+
fileName: 'purple.css',
|
|
52
|
+
modifyVars: {
|
|
53
|
+
'@primary-color': '#722ED1'
|
|
54
|
+
}
|
|
55
|
+
}, {
|
|
56
|
+
key: 'dust',
|
|
57
|
+
theme: 'dark',
|
|
58
|
+
fileName: 'dark-dust.css',
|
|
59
|
+
modifyVars: {
|
|
60
|
+
'@primary-color': '#F5222D'
|
|
61
|
+
}
|
|
62
|
+
}, {
|
|
63
|
+
key: 'volcano',
|
|
64
|
+
theme: 'dark',
|
|
65
|
+
fileName: 'dark-volcano.css',
|
|
66
|
+
modifyVars: {
|
|
67
|
+
'@primary-color': '#FA541C'
|
|
68
|
+
}
|
|
69
|
+
}, {
|
|
70
|
+
key: 'sunset',
|
|
71
|
+
theme: 'dark',
|
|
72
|
+
fileName: 'dark-sunset.css',
|
|
73
|
+
modifyVars: {
|
|
74
|
+
'@primary-color': '#FAAD14'
|
|
75
|
+
}
|
|
76
|
+
}, {
|
|
77
|
+
key: 'cyan',
|
|
78
|
+
theme: 'dark',
|
|
79
|
+
fileName: 'dark-cyan.css',
|
|
80
|
+
modifyVars: {
|
|
81
|
+
'@primary-color': '#13C2C2'
|
|
82
|
+
}
|
|
83
|
+
}, {
|
|
84
|
+
key: 'green',
|
|
85
|
+
theme: 'dark',
|
|
86
|
+
fileName: 'dark-green.css',
|
|
87
|
+
modifyVars: {
|
|
88
|
+
'@primary-color': '#52C41A'
|
|
89
|
+
}
|
|
90
|
+
}, {
|
|
91
|
+
key: 'geekblue',
|
|
92
|
+
theme: 'dark',
|
|
93
|
+
fileName: 'dark-geekblue.css',
|
|
94
|
+
modifyVars: {
|
|
95
|
+
'@primary-color': '#2F54EB'
|
|
96
|
+
}
|
|
97
|
+
}, {
|
|
98
|
+
key: 'purple',
|
|
99
|
+
theme: 'dark',
|
|
100
|
+
fileName: 'dark-purple.css',
|
|
101
|
+
modifyVars: {
|
|
102
|
+
'@primary-color': '#722ED1'
|
|
103
|
+
}
|
|
104
|
+
}]
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* 占位函数
|
|
108
|
+
*
|
|
109
|
+
* @export
|
|
110
|
+
* @returns
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
exports.configGeneral = configGeneral;
|
|
114
|
+
|
|
115
|
+
function empty() {
|
|
116
|
+
return {};
|
|
117
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.empty = empty;
|
|
7
|
+
exports.webpackPlugin5 = exports.webpackPlugin = void 0;
|
|
8
|
+
|
|
9
|
+
var _path = _interopRequireDefault(require("path"));
|
|
10
|
+
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
|
+
|
|
13
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
14
|
+
|
|
15
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16
|
+
|
|
17
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
18
|
+
|
|
19
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
20
|
+
|
|
21
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
22
|
+
|
|
23
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
24
|
+
|
|
25
|
+
function getModulePackageName(module) {
|
|
26
|
+
if (!module.context) return null;
|
|
27
|
+
|
|
28
|
+
var nodeModulesPath = _path["default"].join(__dirname, '../node_modules/');
|
|
29
|
+
|
|
30
|
+
if (module.context.substring(0, nodeModulesPath.length) !== nodeModulesPath) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
var moduleRelativePath = module.context.substring(nodeModulesPath.length);
|
|
35
|
+
|
|
36
|
+
var _moduleRelativePath$s = moduleRelativePath.split(_path["default"].sep),
|
|
37
|
+
_moduleRelativePath$s2 = _slicedToArray(_moduleRelativePath$s, 1),
|
|
38
|
+
moduleDirName = _moduleRelativePath$s2[0];
|
|
39
|
+
|
|
40
|
+
var packageName = moduleDirName; // handle tree shaking
|
|
41
|
+
|
|
42
|
+
if (packageName && packageName.match('^_')) {
|
|
43
|
+
// eslint-disable-next-line prefer-destructuring
|
|
44
|
+
var matchResult = packageName.match(/^_(@?[^@]+)/) || [];
|
|
45
|
+
|
|
46
|
+
if (matchResult.length > 0) {
|
|
47
|
+
packageName = packageName.match(/^_(@?[^@]+)/)[1];
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return packageName;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
var webpackPlugin = function webpackPlugin(config) {
|
|
55
|
+
// console.dir(config);
|
|
56
|
+
// config.profile(true);
|
|
57
|
+
// optimize chunks
|
|
58
|
+
config.optimization // .minimize(process.env.NODE_ENV === 'production' ? true : false)
|
|
59
|
+
// share the same chunks across different modules
|
|
60
|
+
.runtimeChunk(false).splitChunks({
|
|
61
|
+
chunks: 'async',
|
|
62
|
+
name: 'vendors',
|
|
63
|
+
// minSize: 30000,
|
|
64
|
+
// minChunks: 1, // 模块被引用>=1次,便分割
|
|
65
|
+
// maxAsyncRequests: 5, // 异步加载chunk的并发请求数量<=5
|
|
66
|
+
// maxInitialRequests: 3, // 一个入口并发加载的chunk数量<=3
|
|
67
|
+
maxInitialRequests: Infinity,
|
|
68
|
+
cacheGroups: {
|
|
69
|
+
// default: {
|
|
70
|
+
// // 模块缓存规则,设置为false,默认缓存组将禁用
|
|
71
|
+
// minChunks: 2, // 模块被引用>=2次,拆分至vendors公共模块
|
|
72
|
+
// priority: -20, // 优先级
|
|
73
|
+
// reuseExistingChunk: true, // 默认使用已有的模块
|
|
74
|
+
// },
|
|
75
|
+
vendors: {
|
|
76
|
+
test: function test(module) {
|
|
77
|
+
var packageName = getModulePackageName(module) || '';
|
|
78
|
+
|
|
79
|
+
if (packageName) {
|
|
80
|
+
return ['antd', 'bizcharts', 'gg-editor', 'g6', '@antv', 'l7', 'gg-editor-core', 'bizcharts-plugin-slider', 'braft-editor', 'classnames', 'lodash', 'numeral'].includes(packageName);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return false;
|
|
84
|
+
},
|
|
85
|
+
name: function name(module) {
|
|
86
|
+
var packageName = getModulePackageName(module);
|
|
87
|
+
|
|
88
|
+
if (packageName) {
|
|
89
|
+
if (['bizcharts', '@antv/data-set', '@ant-design/icons', '@antv/l7', '@antv/l7-maps', 'braft-editor', 'gg-editor'].indexOf(packageName) >= 0) {
|
|
90
|
+
return 'viz'; // visualization package
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return 'misc';
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
exports.webpackPlugin = webpackPlugin;
|
|
102
|
+
|
|
103
|
+
var webpackPlugin5 = function webpackPlugin5(config, _ref) {
|
|
104
|
+
var env = _ref.env;
|
|
105
|
+
config.module.rule('mjs-rule').test(/.m?js/).resolve.set('fullySpecified', false);
|
|
106
|
+
config.optimization.store["delete"]('noEmitOnErrors');
|
|
107
|
+
console.log({
|
|
108
|
+
currentEnv: env
|
|
109
|
+
});
|
|
110
|
+
config.merge({
|
|
111
|
+
// mode: 'development',
|
|
112
|
+
optimization: {
|
|
113
|
+
emitOnErrors: true,
|
|
114
|
+
minimize: env === 'production',
|
|
115
|
+
concatenateModules: env === 'production',
|
|
116
|
+
splitChunks: {
|
|
117
|
+
// chunks: 'async',
|
|
118
|
+
// minSize: 1,
|
|
119
|
+
// minChunks: 2,
|
|
120
|
+
// automaticNameDelimiter: '.',
|
|
121
|
+
cacheGroups: {
|
|
122
|
+
"default": {
|
|
123
|
+
minChunks: 2,
|
|
124
|
+
priority: -20,
|
|
125
|
+
reuseExistingChunk: true
|
|
126
|
+
},
|
|
127
|
+
viz: {
|
|
128
|
+
test: function test(module) {
|
|
129
|
+
var packageName = getModulePackageName(module) || '';
|
|
130
|
+
|
|
131
|
+
if (packageName) {
|
|
132
|
+
return ['antd', 'bizcharts', 'gg-editor', 'g6', '@antv', 'l7', 'gg-editor-core', 'bizcharts-plugin-slider', 'braft-editor', 'classnames', 'lodash', 'numeral'].includes(packageName);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
misc: {
|
|
139
|
+
test: function test(module) {
|
|
140
|
+
var packageName = getModulePackageName(module) || '';
|
|
141
|
+
|
|
142
|
+
if (packageName) {
|
|
143
|
+
return !['antd', 'bizcharts', 'gg-editor', 'g6', '@antv', 'l7', 'gg-editor-core', 'bizcharts-plugin-slider', 'braft-editor', 'classnames', 'lodash', 'numeral'].includes(packageName);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* 占位函数
|
|
156
|
+
*
|
|
157
|
+
* @export
|
|
158
|
+
* @returns
|
|
159
|
+
*/
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
exports.webpackPlugin5 = webpackPlugin5;
|
|
163
|
+
|
|
164
|
+
function empty() {
|
|
165
|
+
return {};
|
|
166
|
+
}
|
|
@@ -11,7 +11,7 @@ var _avatar = _interopRequireDefault(require("antd/es/avatar"));
|
|
|
11
11
|
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _tools = require("../../utils/tools");
|
|
15
15
|
|
|
16
16
|
var _constants = require("../../utils/constants");
|
|
17
17
|
|
|
@@ -39,7 +39,10 @@ var ArticleListContent = function ArticleListContent(_ref) {
|
|
|
39
39
|
href: href
|
|
40
40
|
}, owner), " \u53D1\u5E03\u5728 ", /*#__PURE__*/_react["default"].createElement("a", {
|
|
41
41
|
href: href
|
|
42
|
-
}, href), /*#__PURE__*/_react["default"].createElement("em", null, (0,
|
|
42
|
+
}, href), /*#__PURE__*/_react["default"].createElement("em", null, (0, _tools.formatDatetime)({
|
|
43
|
+
data: updatedAt,
|
|
44
|
+
format: _constants.datetimeFormat.yearMonthDayHourMinute
|
|
45
|
+
}))));
|
|
43
46
|
};
|
|
44
47
|
|
|
45
48
|
var _default = ArticleListContent;
|
|
@@ -207,10 +207,11 @@ export function buildSearchInput({ label, name, helper, icon, inputProps, canOpe
|
|
|
207
207
|
canOperate?: boolean | undefined;
|
|
208
208
|
formItemLayout?: {} | undefined;
|
|
209
209
|
}): JSX.Element;
|
|
210
|
-
export function buildSearchInputNumber({ label, name, helper, inputProps, canOperate, formItemLayout, }: {
|
|
210
|
+
export function buildSearchInputNumber({ label, name, helper, icon, inputProps, canOperate, formItemLayout, }: {
|
|
211
211
|
label: any;
|
|
212
212
|
name: any;
|
|
213
213
|
helper?: any;
|
|
214
|
+
icon?: JSX.Element | undefined;
|
|
214
215
|
inputProps?: {} | undefined;
|
|
215
216
|
canOperate?: boolean | undefined;
|
|
216
217
|
formItemLayout?: {} | undefined;
|
|
@@ -330,11 +331,12 @@ export function buildFormOnlyShowInput({ label, value, helper, icon, inputProps,
|
|
|
330
331
|
} | undefined;
|
|
331
332
|
formItemLayout?: {} | undefined;
|
|
332
333
|
}): JSX.Element;
|
|
333
|
-
export function buildFormInputNumber({ label, name, required, helper, inputNumberProps, canOperate, formItemLayout, }: {
|
|
334
|
+
export function buildFormInputNumber({ label, name, required, helper, icon, inputNumberProps, canOperate, formItemLayout, }: {
|
|
334
335
|
label: any;
|
|
335
336
|
name: any;
|
|
336
337
|
required?: boolean | undefined;
|
|
337
338
|
helper?: any;
|
|
339
|
+
icon?: JSX.Element | undefined;
|
|
338
340
|
inputNumberProps?: {} | undefined;
|
|
339
341
|
canOperate?: boolean | undefined;
|
|
340
342
|
formItemLayout?: {} | undefined;
|
|
@@ -1265,7 +1265,14 @@ function pageHeaderExtraContent(data) {
|
|
|
1265
1265
|
sm: 12
|
|
1266
1266
|
}, /*#__PURE__*/_react["default"].createElement("div", null, "\u521B\u5EFA\u65E5\u671F"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
1267
1267
|
style: textStyle
|
|
1268
|
-
}, (0, _tools.formatDatetime)(
|
|
1268
|
+
}, (0, _tools.formatDatetime)({
|
|
1269
|
+
data: v.time,
|
|
1270
|
+
format: 'HH:mm:ss',
|
|
1271
|
+
defaultValue: '--'
|
|
1272
|
+
}), /*#__PURE__*/_react["default"].createElement("br", null), (0, _tools.formatDatetime)({
|
|
1273
|
+
data: v.time,
|
|
1274
|
+
format: 'YYYY-MM-DD'
|
|
1275
|
+
}))), /*#__PURE__*/_react["default"].createElement(_col["default"], {
|
|
1269
1276
|
xs: 24,
|
|
1270
1277
|
sm: 12
|
|
1271
1278
|
}, /*#__PURE__*/_react["default"].createElement("div", null, v.textLabel), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -1795,7 +1802,10 @@ function buildFormNowTimeField(_ref24) {
|
|
|
1795
1802
|
label: resultCheck.label,
|
|
1796
1803
|
extra: (0, _tools.stringIsNullOrWhiteSpace)(resultCheck.helper || '') ? null : (0, _tools.buildFieldHelper)(resultCheck.helper)
|
|
1797
1804
|
}), /*#__PURE__*/_react["default"].createElement(_input["default"], {
|
|
1798
|
-
value: (0, _tools.formatDatetime)(
|
|
1805
|
+
value: (0, _tools.formatDatetime)({
|
|
1806
|
+
data: new Date(),
|
|
1807
|
+
format: _constants.datetimeFormat.yearMonthDayHourMinute
|
|
1808
|
+
}),
|
|
1799
1809
|
addonBefore: /*#__PURE__*/_react["default"].createElement(_icons.FormOutlined, null),
|
|
1800
1810
|
disabled: true,
|
|
1801
1811
|
placeholder: (0, _tools.buildFieldDescription)(resultCheck.label)
|
|
@@ -1900,6 +1910,8 @@ function buildSearchInputNumber(_ref28) {
|
|
|
1900
1910
|
name = _ref28.name,
|
|
1901
1911
|
_ref28$helper = _ref28.helper,
|
|
1902
1912
|
helper = _ref28$helper === void 0 ? null : _ref28$helper,
|
|
1913
|
+
_ref28$icon = _ref28.icon,
|
|
1914
|
+
icon = _ref28$icon === void 0 ? /*#__PURE__*/_react["default"].createElement(_icons.FormOutlined, null) : _ref28$icon,
|
|
1903
1915
|
_ref28$inputProps = _ref28.inputProps,
|
|
1904
1916
|
inputProps = _ref28$inputProps === void 0 ? {} : _ref28$inputProps,
|
|
1905
1917
|
_ref28$canOperate = _ref28.canOperate,
|
|
@@ -1909,6 +1921,7 @@ function buildSearchInputNumber(_ref28) {
|
|
|
1909
1921
|
var title = label;
|
|
1910
1922
|
|
|
1911
1923
|
var otherInputProps = _objectSpread(_objectSpread({}, {
|
|
1924
|
+
addonBefore: icon,
|
|
1912
1925
|
style: {
|
|
1913
1926
|
width: '100%'
|
|
1914
1927
|
},
|
|
@@ -2443,6 +2456,8 @@ function buildFormInputNumber(_ref45) {
|
|
|
2443
2456
|
required = _ref45$required === void 0 ? false : _ref45$required,
|
|
2444
2457
|
_ref45$helper = _ref45.helper,
|
|
2445
2458
|
helper = _ref45$helper === void 0 ? null : _ref45$helper,
|
|
2459
|
+
_ref45$icon = _ref45.icon,
|
|
2460
|
+
icon = _ref45$icon === void 0 ? /*#__PURE__*/_react["default"].createElement(_icons.FormOutlined, null) : _ref45$icon,
|
|
2446
2461
|
_ref45$inputNumberPro = _ref45.inputNumberProps,
|
|
2447
2462
|
inputNumberProps = _ref45$inputNumberPro === void 0 ? {} : _ref45$inputNumberPro,
|
|
2448
2463
|
_ref45$canOperate = _ref45.canOperate,
|
|
@@ -2452,6 +2467,7 @@ function buildFormInputNumber(_ref45) {
|
|
|
2452
2467
|
var title = label;
|
|
2453
2468
|
|
|
2454
2469
|
var otherInputNumberProps = _objectSpread(_objectSpread({}, {
|
|
2470
|
+
addonBefore: icon,
|
|
2455
2471
|
style: {
|
|
2456
2472
|
width: '100%'
|
|
2457
2473
|
},
|
|
@@ -2795,7 +2811,10 @@ function buildColumnItem(_ref49) {
|
|
|
2795
2811
|
styleMerge = _objectSpread(_objectSpread({}, styleMerge), (color || null) == null ? {} : {
|
|
2796
2812
|
color: color
|
|
2797
2813
|
});
|
|
2798
|
-
val = (0, _tools.stringIsNullOrWhiteSpace)(val) ? '' : (0, _tools.formatDatetime)(
|
|
2814
|
+
val = (0, _tools.stringIsNullOrWhiteSpace)(val) ? '' : (0, _tools.formatDatetime)({
|
|
2815
|
+
data: val,
|
|
2816
|
+
format: datetimeFormatValue
|
|
2817
|
+
}) || '';
|
|
2799
2818
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, (addonBefore || null) == null ? null : addonBefore, /*#__PURE__*/_react["default"].createElement(_IconInfo["default"], {
|
|
2800
2819
|
icon: icon || null,
|
|
2801
2820
|
iconPosition: iconPosition || 'left',
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _proLayout = require("@ant-design/pro-layout");
|
|
9
|
+
|
|
10
|
+
// loading components from code split
|
|
11
|
+
// https://umijs.org/plugin/umi-plugin-react.html#dynamicimport
|
|
12
|
+
var _default = _proLayout.PageLoading;
|
|
13
|
+
exports["default"] = _default;
|
|
@@ -8,8 +8,8 @@ declare class TimeLineCustom extends CustomBase {
|
|
|
8
8
|
currentTime: any;
|
|
9
9
|
currentPageStart: boolean;
|
|
10
10
|
doWhenGetSnapshotBeforeUpdate: (preProps: any, preState: any) => null;
|
|
11
|
-
getCreateTimeDatePart: (v: any) =>
|
|
12
|
-
getCreateTimeTimePart: (v: any) =>
|
|
11
|
+
getCreateTimeDatePart: (v: any) => any;
|
|
12
|
+
getCreateTimeTimePart: (v: any) => any;
|
|
13
13
|
handleTableChange: (pageNo: any, pageSize: any) => void;
|
|
14
14
|
renderDateLabel: (v: any) => false | JSX.Element;
|
|
15
15
|
renderInfo: (item: any) => JSX.Element;
|
|
@@ -13,10 +13,12 @@ var _list = _interopRequireDefault(require("antd/es/list"));
|
|
|
13
13
|
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
15
|
|
|
16
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
17
|
-
|
|
18
16
|
var _icons = require("@ant-design/icons");
|
|
19
17
|
|
|
18
|
+
var _tools = require("../../utils/tools");
|
|
19
|
+
|
|
20
|
+
var _constants = require("../../utils/constants");
|
|
21
|
+
|
|
20
22
|
var _CustomBase2 = _interopRequireDefault(require("../../framework/CustomBase"));
|
|
21
23
|
|
|
22
24
|
var _index = _interopRequireDefault(require("./index.less"));
|
|
@@ -68,11 +70,17 @@ var TimeLineCustom = /*#__PURE__*/function (_CustomBase) {
|
|
|
68
70
|
};
|
|
69
71
|
|
|
70
72
|
_this.getCreateTimeDatePart = function (v) {
|
|
71
|
-
return (0,
|
|
73
|
+
return (0, _tools.formatDatetime)({
|
|
74
|
+
data: v,
|
|
75
|
+
format: _constants.datetimeFormat.yearMonthDay
|
|
76
|
+
});
|
|
72
77
|
};
|
|
73
78
|
|
|
74
79
|
_this.getCreateTimeTimePart = function (v) {
|
|
75
|
-
return (0,
|
|
80
|
+
return (0, _tools.formatDatetime)({
|
|
81
|
+
data: v,
|
|
82
|
+
format: _constants.datetimeFormat.hourMinute
|
|
83
|
+
});
|
|
76
84
|
};
|
|
77
85
|
|
|
78
86
|
_this.handleTableChange = function (pageNo, pageSize) {
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
export default Base;
|
|
2
|
-
declare class Base extends
|
|
2
|
+
declare class Base extends Component<any, any, any> {
|
|
3
3
|
static getDerivedStateFromProps(nextProps: any, prevState: any): null;
|
|
4
4
|
constructor(props: any);
|
|
5
5
|
mounted: boolean;
|
|
6
|
+
/**
|
|
7
|
+
*显示render次数开关,用于开发时候调试页面渲染性能
|
|
8
|
+
*/
|
|
9
|
+
showRenderCountInConsole: boolean;
|
|
10
|
+
renderCount: number;
|
|
6
11
|
doDidMountTask: () => void;
|
|
12
|
+
doOtherCheckComponentUpdate: (nextProps: any, nextState: any) => null;
|
|
7
13
|
doWhenGetSnapshotBeforeUpdate: (preProps: any, preState: any) => null;
|
|
8
14
|
doWorkWhenDidUpdate: (preProps: any, preState: any, snapshot: any) => void;
|
|
9
15
|
beforeDidMount: () => void;
|
|
@@ -13,5 +19,22 @@ declare class Base extends PureComponent<any, any, any> {
|
|
|
13
19
|
goToPath: (path: any) => void;
|
|
14
20
|
redirectToPath: (path: any) => void;
|
|
15
21
|
checkHasMore: (pageNo: any, pageSize: any, total: any) => boolean;
|
|
22
|
+
showRenderCount(): void;
|
|
23
|
+
/**
|
|
24
|
+
* check loading progress,if loading or load fail,return false,else return true
|
|
25
|
+
* @returns bool
|
|
26
|
+
*/
|
|
27
|
+
checkLoadingProgress(): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* check operability,if loading or or processing or load fail,return false,else return true
|
|
30
|
+
* @returns bool
|
|
31
|
+
*/
|
|
32
|
+
checkOperability(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* check in progress,if loading or or processing,return false,else return true
|
|
35
|
+
* @returns bool
|
|
36
|
+
*/
|
|
37
|
+
checkInProgress(): boolean;
|
|
38
|
+
renderFurther(): null;
|
|
16
39
|
}
|
|
17
|
-
import {
|
|
40
|
+
import { Component } from "react";
|