bhd-components 0.7.34 → 0.7.35
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/README.md +1 -1
- package/dist/{8f785a2d.esm.es5.development.js → 051147c0.esm.es5.development.js} +256 -256
- package/dist/{e6319651.esm.es5.production.js → 56407e62.esm.es5.production.js} +10 -10
- package/dist/index.esm.es5.development.css +0 -3
- package/dist/index.esm.es5.development.js +127 -48
- package/dist/index.esm.es5.production.css +1 -1
- package/dist/index.esm.es5.production.js +1 -1
- package/es2017/bhdAppLayout/components/BhdTableSimple/index.js +24 -35
- package/es2017/bhdAppLayout/components/BhdTableSimple/index.less +0 -6
- package/es2017/bhdAppLayout/components/BhdTableSimple/index/347/232/204/345/211/257/346/234/254.js +120 -0
- package/es2017/bhdTipModal/index.js +4 -1
- package/es2017/bhdTipModal/modal.d.ts +6 -0
- package/es2017/bhdTipModal/modal.js +15 -0
- package/es2017/index.d.ts +1 -0
- package/es2017/index.js +1 -0
- package/es2017/message/index.d.ts +12 -14
- package/es2017/message/index.js +14 -4
- package/es2017/provider/config.d.ts +7 -1
- package/es2017/provider/config.js +7 -1
- package/es2017/provider/index.js +21 -4
- package/esm/bhdAppLayout/components/BhdTableSimple/index.js +24 -37
- package/esm/bhdAppLayout/components/BhdTableSimple/index.less +0 -6
- package/esm/bhdAppLayout/components/BhdTableSimple/index/347/232/204/345/211/257/346/234/254.js +122 -0
- package/esm/bhdTipModal/index.js +4 -1
- package/esm/bhdTipModal/modal.d.ts +6 -0
- package/esm/bhdTipModal/modal.js +15 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/message/index.d.ts +12 -14
- package/esm/message/index.js +60 -3
- package/esm/provider/config.d.ts +7 -1
- package/esm/provider/config.js +7 -1
- package/esm/provider/index.js +21 -4
- package/package.json +1 -1
|
@@ -16,19 +16,7 @@ import i18Conversion from "../../../i18n";
|
|
|
16
16
|
className
|
|
17
17
|
超长内容 出现滚动条 需在管理列定义好width 没有定义的max-width:300
|
|
18
18
|
*/ const BhdTableSimple = (props)=>{
|
|
19
|
-
let { className
|
|
20
|
-
table: null,
|
|
21
|
-
header: {
|
|
22
|
-
wrapper: null,
|
|
23
|
-
row: null,
|
|
24
|
-
cell: null
|
|
25
|
-
},
|
|
26
|
-
body: {
|
|
27
|
-
wrapper: null,
|
|
28
|
-
row: null,
|
|
29
|
-
cell: null
|
|
30
|
-
}
|
|
31
|
-
} } = props;
|
|
19
|
+
let { className , locale , borderBottom =false , rowSelection , ajaxErr , dataSource , kind ="simple" , loading , notDataText =i18Conversion("noData") } = props;
|
|
32
20
|
const renderTableText = ()=>{
|
|
33
21
|
if (ajaxErr) {
|
|
34
22
|
return /*#__PURE__*/ _jsxs("div", {
|
|
@@ -45,11 +33,24 @@ import i18Conversion from "../../../i18n";
|
|
|
45
33
|
});
|
|
46
34
|
}
|
|
47
35
|
if (loading) {
|
|
48
|
-
return /*#__PURE__*/
|
|
49
|
-
className: "app_BhdTableSimple_noTable",
|
|
36
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
37
|
+
className: "app_BhdTableSimple_noTable app_BhdTableSimple_noTable_loadingTable",
|
|
50
38
|
style: {
|
|
51
39
|
minHeight: "150px"
|
|
52
|
-
}
|
|
40
|
+
},
|
|
41
|
+
children: [
|
|
42
|
+
/*#__PURE__*/ _jsx("img", {
|
|
43
|
+
src: Loading,
|
|
44
|
+
alt: "",
|
|
45
|
+
style: {
|
|
46
|
+
width: "48px",
|
|
47
|
+
height: "48px"
|
|
48
|
+
}
|
|
49
|
+
}),
|
|
50
|
+
/*#__PURE__*/ _jsx("p", {
|
|
51
|
+
children: i18Conversion("Load")
|
|
52
|
+
})
|
|
53
|
+
]
|
|
53
54
|
});
|
|
54
55
|
}
|
|
55
56
|
return /*#__PURE__*/ _jsxs("div", {
|
|
@@ -84,37 +85,25 @@ import i18Conversion from "../../../i18n";
|
|
|
84
85
|
})
|
|
85
86
|
]
|
|
86
87
|
});
|
|
87
|
-
if (kind === "simple") {
|
|
88
|
-
className += " app_BhdTableSimple_simple";
|
|
89
|
-
}
|
|
90
|
-
if (loading) {
|
|
91
|
-
if (!components.body) {
|
|
92
|
-
components.body = {
|
|
93
|
-
wrapper: null,
|
|
94
|
-
row: null,
|
|
95
|
-
cell: null
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
components = _object_spread_props(_object_spread({}, components.body), {
|
|
99
|
-
body: {
|
|
100
|
-
wrapper: ()=>loadingTable
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
88
|
const tableProps = _object_spread_props(_object_spread({
|
|
105
89
|
style: {
|
|
106
90
|
width: "100%"
|
|
107
91
|
}
|
|
108
92
|
}, props), {
|
|
109
93
|
loading: false,
|
|
110
|
-
|
|
111
|
-
dataSource: ajaxErr ? [] : dataSource,
|
|
94
|
+
dataSource: ajaxErr || loading ? [] : dataSource,
|
|
112
95
|
className: `app_BhdTableSimple ${className || " "} ${rowSelection ? "app_BhdTableSimple_rowSelection" : ""}`,
|
|
113
96
|
locale: {
|
|
114
97
|
emptyText: renderTableText()
|
|
115
98
|
},
|
|
116
99
|
scroll: props.scroll
|
|
117
100
|
});
|
|
101
|
+
if (kind === "simple") {
|
|
102
|
+
className += " app_BhdTableSimple_simple";
|
|
103
|
+
}
|
|
104
|
+
// if (loading) {
|
|
105
|
+
// return loadingTable;
|
|
106
|
+
// }
|
|
118
107
|
return /*#__PURE__*/ _jsx(Table, _object_spread({}, tableProps));
|
|
119
108
|
};
|
|
120
109
|
export default BhdTableSimple;
|
|
@@ -31,9 +31,6 @@
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
34
|
}
|
|
38
35
|
|
|
39
36
|
/* 加载样式 */
|
|
@@ -42,9 +39,6 @@
|
|
|
42
39
|
align-items: center;
|
|
43
40
|
justify-content: center;
|
|
44
41
|
flex-direction: column;
|
|
45
|
-
position: absolute;
|
|
46
|
-
left: 50%;
|
|
47
|
-
transform: translateX(-50%);
|
|
48
42
|
img {
|
|
49
43
|
margin-bottom: 24px;
|
|
50
44
|
}
|
package/es2017/bhdAppLayout/components/BhdTableSimple/index/347/232/204/345/211/257/346/234/254.js
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
2
|
+
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@ice/jsx-runtime/jsx-runtime";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import "./index.less";
|
|
6
|
+
import Table from "../../../table";
|
|
7
|
+
import { Loading, NotData, ServerError } from "../../../images";
|
|
8
|
+
import i18Conversion from "../../../i18n";
|
|
9
|
+
/*
|
|
10
|
+
参数与Table一致
|
|
11
|
+
|
|
12
|
+
ajaxErr:接口是否报错
|
|
13
|
+
notDataText:无数据时,显示的文案
|
|
14
|
+
borderBottom: 是否显示下边框线
|
|
15
|
+
loading:是否加载中
|
|
16
|
+
className
|
|
17
|
+
超长内容 出现滚动条 需在管理列定义好width 没有定义的max-width:300
|
|
18
|
+
*/ const BhdTableSimple = (props)=>{
|
|
19
|
+
let { className ="" , locale , borderBottom =false , rowSelection , ajaxErr , dataSource , kind ="simple" , loading , notDataText =i18Conversion("noData") , components ={
|
|
20
|
+
table: null,
|
|
21
|
+
header: {
|
|
22
|
+
wrapper: null,
|
|
23
|
+
row: null,
|
|
24
|
+
cell: null
|
|
25
|
+
},
|
|
26
|
+
body: {
|
|
27
|
+
wrapper: null,
|
|
28
|
+
row: null,
|
|
29
|
+
cell: null
|
|
30
|
+
}
|
|
31
|
+
} } = props;
|
|
32
|
+
const renderTableText = ()=>{
|
|
33
|
+
if (ajaxErr) {
|
|
34
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
35
|
+
className: "app_BhdTableSimple_errorTable",
|
|
36
|
+
children: [
|
|
37
|
+
/*#__PURE__*/ _jsx("img", {
|
|
38
|
+
src: ServerError,
|
|
39
|
+
alt: ""
|
|
40
|
+
}),
|
|
41
|
+
/*#__PURE__*/ _jsx("p", {
|
|
42
|
+
children: i18Conversion("系统繁忙,稍后重试!")
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
if (loading) {
|
|
48
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
49
|
+
className: "app_BhdTableSimple_noTable",
|
|
50
|
+
style: {
|
|
51
|
+
minHeight: "150px"
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
56
|
+
className: "app_BhdTableSimple_noTable",
|
|
57
|
+
style: {
|
|
58
|
+
width: "100%"
|
|
59
|
+
},
|
|
60
|
+
children: [
|
|
61
|
+
/*#__PURE__*/ _jsx("img", {
|
|
62
|
+
src: NotData,
|
|
63
|
+
alt: ""
|
|
64
|
+
}),
|
|
65
|
+
/*#__PURE__*/ _jsx("div", {
|
|
66
|
+
children: notDataText
|
|
67
|
+
})
|
|
68
|
+
]
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
const loadingTable = /*#__PURE__*/ _jsxs("div", {
|
|
72
|
+
className: "app_BhdTableSimple_noTable app_BhdTableSimple_noTable_loadingTable",
|
|
73
|
+
children: [
|
|
74
|
+
/*#__PURE__*/ _jsx("img", {
|
|
75
|
+
src: Loading,
|
|
76
|
+
alt: "",
|
|
77
|
+
style: {
|
|
78
|
+
width: "48px",
|
|
79
|
+
height: "48px"
|
|
80
|
+
}
|
|
81
|
+
}),
|
|
82
|
+
/*#__PURE__*/ _jsx("p", {
|
|
83
|
+
children: i18Conversion("Load")
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
});
|
|
87
|
+
if (kind === "simple") {
|
|
88
|
+
className += " app_BhdTableSimple_simple";
|
|
89
|
+
}
|
|
90
|
+
if (loading) {
|
|
91
|
+
if (!components.body) {
|
|
92
|
+
components.body = {
|
|
93
|
+
wrapper: null,
|
|
94
|
+
row: null,
|
|
95
|
+
cell: null
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
components = _object_spread_props(_object_spread({}, components.body), {
|
|
99
|
+
body: {
|
|
100
|
+
wrapper: ()=>loadingTable
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
const tableProps = _object_spread_props(_object_spread({
|
|
105
|
+
style: {
|
|
106
|
+
width: "100%"
|
|
107
|
+
}
|
|
108
|
+
}, props), {
|
|
109
|
+
loading: false,
|
|
110
|
+
components,
|
|
111
|
+
dataSource: ajaxErr ? [] : dataSource,
|
|
112
|
+
className: `app_BhdTableSimple ${className || " "} ${rowSelection ? "app_BhdTableSimple_rowSelection" : ""}`,
|
|
113
|
+
locale: {
|
|
114
|
+
emptyText: renderTableText()
|
|
115
|
+
},
|
|
116
|
+
scroll: props.scroll
|
|
117
|
+
});
|
|
118
|
+
return /*#__PURE__*/ _jsx(Table, _object_spread({}, tableProps));
|
|
119
|
+
};
|
|
120
|
+
export default BhdTableSimple;
|
|
@@ -2,7 +2,7 @@ import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
|
2
2
|
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
3
3
|
import { jsx as _jsx, jsxs as _jsxs } from "@ice/jsx-runtime/jsx-runtime";
|
|
4
4
|
import * as React from "react";
|
|
5
|
-
import { Modal } from "
|
|
5
|
+
import { Modal } from "./modal";
|
|
6
6
|
import { Confirm, Success, Info } from "../images/index";
|
|
7
7
|
import styles from "./index.module.less";
|
|
8
8
|
const initConFirmModal = (obj)=>{
|
|
@@ -182,6 +182,7 @@ const initWarnModal = (obj)=>{
|
|
|
182
182
|
};
|
|
183
183
|
const BhdTipModal = {
|
|
184
184
|
confirm: (obj)=>{
|
|
185
|
+
console.log("Modal", Modal);
|
|
185
186
|
let modal = Modal.confirm(initConFirmModal(obj));
|
|
186
187
|
modal.updateModal = (updateObj = {})=>{
|
|
187
188
|
modal.update(initConFirmModal(_object_spread({}, obj, updateObj)));
|
|
@@ -189,6 +190,7 @@ const BhdTipModal = {
|
|
|
189
190
|
return modal;
|
|
190
191
|
},
|
|
191
192
|
success: (obj)=>{
|
|
193
|
+
console.log("Modal", Modal);
|
|
192
194
|
let modal = Modal.confirm(initSuccessModal(obj));
|
|
193
195
|
modal.updateModal = (updateObj = {})=>{
|
|
194
196
|
modal.update(initSuccessModal(_object_spread({}, obj, updateObj)));
|
|
@@ -196,6 +198,7 @@ const BhdTipModal = {
|
|
|
196
198
|
return modal;
|
|
197
199
|
},
|
|
198
200
|
custom: (obj)=>{
|
|
201
|
+
console.log("Modal", Modal);
|
|
199
202
|
let modal = Modal.confirm(initCustomModal(obj));
|
|
200
203
|
modal.updateModal = (updateObj = {})=>{
|
|
201
204
|
modal.update(initCustomModal(_object_spread({}, obj, updateObj)));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { App, message as AntdMessage, Modal as AntdModal, notification as AntdNotification } from "antd";
|
|
4
|
+
let Modal = {};
|
|
5
|
+
let message = {};
|
|
6
|
+
let notification = {};
|
|
7
|
+
export default (()=>{
|
|
8
|
+
const staticFunction = App.useApp();
|
|
9
|
+
message = _object_spread({}, AntdMessage, staticFunction.message);
|
|
10
|
+
Modal = _object_spread({}, AntdModal, staticFunction.modal);
|
|
11
|
+
notification = _object_spread({}, AntdNotification, staticFunction.notification);
|
|
12
|
+
console.log("mess1", staticFunction, message);
|
|
13
|
+
return null;
|
|
14
|
+
});
|
|
15
|
+
export { Modal, message, notification };
|
package/es2017/index.d.ts
CHANGED
|
@@ -64,6 +64,7 @@ export { default as Upload } from "antd/es/upload";
|
|
|
64
64
|
export { default as Watermark } from "antd/es/watermark";
|
|
65
65
|
export { default as QRCode } from "antd/es/qrcode";
|
|
66
66
|
export { default as version } from "antd/es/version";
|
|
67
|
+
export { default as AntdMessage } from "antd/es/message";
|
|
67
68
|
export { default as Provider } from "./provider";
|
|
68
69
|
export { default as TextTootip } from "./textTootip";
|
|
69
70
|
export { default as zh_CN } from "antd/locale/zh_CN";
|
package/es2017/index.js
CHANGED
|
@@ -69,6 +69,7 @@ export { default as Upload } from "antd/es/upload";
|
|
|
69
69
|
export { default as Watermark } from "antd/es/watermark";
|
|
70
70
|
export { default as QRCode } from "antd/es/qrcode";
|
|
71
71
|
export { default as version } from "antd/es/version";
|
|
72
|
+
export { default as AntdMessage } from "antd/es/message";
|
|
72
73
|
/* 自定义修改 */ export { default as Provider } from "./provider/index";
|
|
73
74
|
export { default as TextTootip } from "./textTootip/index";
|
|
74
75
|
export { default as zh_CN } from "antd/locale/zh_CN";
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import type { ArgsProps } from "antd/es/message";
|
|
3
2
|
declare const BhdMessage: {
|
|
4
|
-
customSuccess: (config: ArgsProps | string) =>
|
|
5
|
-
customWarning: (config: ArgsProps | string) =>
|
|
6
|
-
customError: (config: ArgsProps | string) =>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
error:
|
|
10
|
-
|
|
11
|
-
loading:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
_InternalPanelDoNotUseOrYouWillBeFired: typeof import("antd/es/message/PurePanel").default;
|
|
3
|
+
customSuccess: (config: ArgsProps | string) => any;
|
|
4
|
+
customWarning: (config: ArgsProps | string) => any;
|
|
5
|
+
customError: (config: ArgsProps | string) => any;
|
|
6
|
+
open: (...arg: any) => any;
|
|
7
|
+
destroy: (...arg: any) => any;
|
|
8
|
+
error: (...arg: any) => any;
|
|
9
|
+
info: (...arg: any) => any;
|
|
10
|
+
loading: (...arg: any) => any;
|
|
11
|
+
success: (...arg: any) => any;
|
|
12
|
+
useMessage: (...arg: any) => any;
|
|
13
|
+
warning: (...arg: any) => any;
|
|
14
|
+
_InternalPanelDoNotUseOrYouWillBeFired: (...arg: any) => any;
|
|
17
15
|
};
|
|
18
16
|
export default BhdMessage;
|
package/es2017/message/index.js
CHANGED
|
@@ -3,11 +3,12 @@ import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
|
3
3
|
import { jsx as _jsx } from "@ice/jsx-runtime/jsx-runtime";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import styles from "./index.module.less";
|
|
6
|
-
import { message } from "
|
|
6
|
+
import { message } from "../bhdTipModal/modal";
|
|
7
7
|
import { ExclamationCircleFilled } from "../icons/index";
|
|
8
|
-
const BhdMessage =
|
|
8
|
+
const BhdMessage = {
|
|
9
9
|
customSuccess: (config)=>{
|
|
10
10
|
let className = styles.customSuccess;
|
|
11
|
+
console.log("customSuccess", message);
|
|
11
12
|
if (typeof config === "string") {
|
|
12
13
|
return message.success({
|
|
13
14
|
content: config,
|
|
@@ -43,6 +44,15 @@ const BhdMessage = _object_spread_props(_object_spread({}, message), {
|
|
|
43
44
|
className: `${className} ${config.className || ""}`,
|
|
44
45
|
icon: config.icon || /*#__PURE__*/ _jsx(ExclamationCircleFilled, {})
|
|
45
46
|
}));
|
|
46
|
-
}
|
|
47
|
-
|
|
47
|
+
},
|
|
48
|
+
open: (...arg)=>message.open(...arg),
|
|
49
|
+
destroy: (...arg)=>message.destroy(...arg),
|
|
50
|
+
error: (...arg)=>message.error(...arg),
|
|
51
|
+
info: (...arg)=>message.info(...arg),
|
|
52
|
+
loading: (...arg)=>message.loading(...arg),
|
|
53
|
+
success: (...arg)=>message.success(...arg),
|
|
54
|
+
useMessage: (...arg)=>message.useMessage(...arg),
|
|
55
|
+
warning: (...arg)=>message.warning(...arg),
|
|
56
|
+
_InternalPanelDoNotUseOrYouWillBeFired: (...arg)=>message._InternalPanelDoNotUseOrYouWillBeFired(...arg)
|
|
57
|
+
};
|
|
48
58
|
export default BhdMessage;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import type { ConfigProviderProps } from "antd/es/config-provider";
|
|
2
|
-
|
|
2
|
+
import type { ConfigOptions } from "antd/es/message/interface";
|
|
3
|
+
import type { NotificationConfig } from "antd/es/notification/interface";
|
|
4
|
+
interface IConfigProviderProps extends ConfigProviderProps {
|
|
5
|
+
message: ConfigOptions;
|
|
6
|
+
notification: NotificationConfig;
|
|
7
|
+
}
|
|
8
|
+
declare const config: IConfigProviderProps;
|
|
3
9
|
export default config;
|
package/es2017/provider/index.js
CHANGED
|
@@ -2,14 +2,16 @@ import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
|
2
2
|
import { _ as _object_destructuring_empty } from "@swc/helpers/_/_object_destructuring_empty";
|
|
3
3
|
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
4
4
|
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
5
|
-
import { jsx as _jsx } from "@ice/jsx-runtime/jsx-runtime";
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@ice/jsx-runtime/jsx-runtime";
|
|
6
6
|
import * as React from "react";
|
|
7
|
-
import { ConfigProvider } from "antd";
|
|
7
|
+
import { ConfigProvider, App } from "antd";
|
|
8
8
|
import config from "./config";
|
|
9
9
|
import "../theme/variable.less";
|
|
10
10
|
import { StyleProvider, legacyLogicalPropertiesTransformer } from "@ant-design/cssinjs";
|
|
11
|
+
import BhdTipModal from "../bhdTipModal/modal";
|
|
11
12
|
const Provider = (Component, customConfig = {})=>{
|
|
12
13
|
let AppConfig = Object.assign(config, customConfig);
|
|
14
|
+
const { message ={} , notification ={} } = AppConfig;
|
|
13
15
|
ConfigProvider.config(AppConfig);
|
|
14
16
|
ConfigProvider.__proto__.lang = AppConfig.locale.locale;
|
|
15
17
|
return (_param)=>{
|
|
@@ -20,7 +22,14 @@ const Provider = (Component, customConfig = {})=>{
|
|
|
20
22
|
transformers: [
|
|
21
23
|
legacyLogicalPropertiesTransformer
|
|
22
24
|
],
|
|
23
|
-
children: /*#__PURE__*/
|
|
25
|
+
children: /*#__PURE__*/ _jsxs(App, {
|
|
26
|
+
message: message,
|
|
27
|
+
notification: notification,
|
|
28
|
+
children: [
|
|
29
|
+
/*#__PURE__*/ _jsx(BhdTipModal, {}),
|
|
30
|
+
/*#__PURE__*/ _jsx(Component, _object_spread({}, props))
|
|
31
|
+
]
|
|
32
|
+
})
|
|
24
33
|
})
|
|
25
34
|
}));
|
|
26
35
|
};
|
|
@@ -29,13 +38,21 @@ Provider.Component = (props)=>{
|
|
|
29
38
|
let AppConfig = Object.assign(config, props);
|
|
30
39
|
ConfigProvider.__proto__.lang = AppConfig.locale.locale;
|
|
31
40
|
ConfigProvider.config(AppConfig);
|
|
41
|
+
const { message ={} , notification ={} } = AppConfig;
|
|
32
42
|
return /*#__PURE__*/ _jsx(ConfigProvider, _object_spread_props(_object_spread({}, AppConfig), {
|
|
33
43
|
children: /*#__PURE__*/ _jsx(StyleProvider, {
|
|
34
44
|
hashPriority: "high",
|
|
35
45
|
transformers: [
|
|
36
46
|
legacyLogicalPropertiesTransformer
|
|
37
47
|
],
|
|
38
|
-
children:
|
|
48
|
+
children: /*#__PURE__*/ _jsxs(App, {
|
|
49
|
+
message: message,
|
|
50
|
+
notification: notification,
|
|
51
|
+
children: [
|
|
52
|
+
/*#__PURE__*/ _jsx(BhdTipModal, {}),
|
|
53
|
+
props.children
|
|
54
|
+
]
|
|
55
|
+
})
|
|
39
56
|
})
|
|
40
57
|
}));
|
|
41
58
|
};
|
|
@@ -16,19 +16,7 @@ import i18Conversion from "../../../i18n";
|
|
|
16
16
|
className
|
|
17
17
|
超长内容 出现滚动条 需在管理列定义好width 没有定义的max-width:300
|
|
18
18
|
*/ var BhdTableSimple = function(props) {
|
|
19
|
-
var
|
|
20
|
-
table: null,
|
|
21
|
-
header: {
|
|
22
|
-
wrapper: null,
|
|
23
|
-
row: null,
|
|
24
|
-
cell: null
|
|
25
|
-
},
|
|
26
|
-
body: {
|
|
27
|
-
wrapper: null,
|
|
28
|
-
row: null,
|
|
29
|
-
cell: null
|
|
30
|
-
}
|
|
31
|
-
} : _props_components;
|
|
19
|
+
var className = props.className, locale = props.locale, _props_borderBottom = props.borderBottom, borderBottom = _props_borderBottom === void 0 ? false : _props_borderBottom, rowSelection = props.rowSelection, ajaxErr = props.ajaxErr, dataSource = props.dataSource, _props_kind = props.kind, kind = _props_kind === void 0 ? "simple" : _props_kind, loading = props.loading, _props_notDataText = props.notDataText, notDataText = _props_notDataText === void 0 ? i18Conversion("noData") : _props_notDataText;
|
|
32
20
|
var renderTableText = function() {
|
|
33
21
|
if (ajaxErr) {
|
|
34
22
|
return /*#__PURE__*/ _jsxs("div", {
|
|
@@ -45,11 +33,24 @@ import i18Conversion from "../../../i18n";
|
|
|
45
33
|
});
|
|
46
34
|
}
|
|
47
35
|
if (loading) {
|
|
48
|
-
return /*#__PURE__*/
|
|
49
|
-
className: "app_BhdTableSimple_noTable",
|
|
36
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
37
|
+
className: "app_BhdTableSimple_noTable app_BhdTableSimple_noTable_loadingTable",
|
|
50
38
|
style: {
|
|
51
39
|
minHeight: "150px"
|
|
52
|
-
}
|
|
40
|
+
},
|
|
41
|
+
children: [
|
|
42
|
+
/*#__PURE__*/ _jsx("img", {
|
|
43
|
+
src: Loading,
|
|
44
|
+
alt: "",
|
|
45
|
+
style: {
|
|
46
|
+
width: "48px",
|
|
47
|
+
height: "48px"
|
|
48
|
+
}
|
|
49
|
+
}),
|
|
50
|
+
/*#__PURE__*/ _jsx("p", {
|
|
51
|
+
children: i18Conversion("Load")
|
|
52
|
+
})
|
|
53
|
+
]
|
|
53
54
|
});
|
|
54
55
|
}
|
|
55
56
|
return /*#__PURE__*/ _jsxs("div", {
|
|
@@ -84,39 +85,25 @@ import i18Conversion from "../../../i18n";
|
|
|
84
85
|
})
|
|
85
86
|
]
|
|
86
87
|
});
|
|
87
|
-
if (kind === "simple") {
|
|
88
|
-
className += " app_BhdTableSimple_simple";
|
|
89
|
-
}
|
|
90
|
-
if (loading) {
|
|
91
|
-
if (!components.body) {
|
|
92
|
-
components.body = {
|
|
93
|
-
wrapper: null,
|
|
94
|
-
row: null,
|
|
95
|
-
cell: null
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
components = _object_spread_props(_object_spread({}, components.body), {
|
|
99
|
-
body: {
|
|
100
|
-
wrapper: function() {
|
|
101
|
-
return loadingTable;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
88
|
var tableProps = _object_spread_props(_object_spread({
|
|
107
89
|
style: {
|
|
108
90
|
width: "100%"
|
|
109
91
|
}
|
|
110
92
|
}, props), {
|
|
111
93
|
loading: false,
|
|
112
|
-
|
|
113
|
-
dataSource: ajaxErr ? [] : dataSource,
|
|
94
|
+
dataSource: ajaxErr || loading ? [] : dataSource,
|
|
114
95
|
className: "app_BhdTableSimple ".concat(className || " ", " ").concat(rowSelection ? "app_BhdTableSimple_rowSelection" : ""),
|
|
115
96
|
locale: {
|
|
116
97
|
emptyText: renderTableText()
|
|
117
98
|
},
|
|
118
99
|
scroll: props.scroll
|
|
119
100
|
});
|
|
101
|
+
if (kind === "simple") {
|
|
102
|
+
className += " app_BhdTableSimple_simple";
|
|
103
|
+
}
|
|
104
|
+
// if (loading) {
|
|
105
|
+
// return loadingTable;
|
|
106
|
+
// }
|
|
120
107
|
return /*#__PURE__*/ _jsx(Table, _object_spread({}, tableProps));
|
|
121
108
|
};
|
|
122
109
|
export default BhdTableSimple;
|
|
@@ -31,9 +31,6 @@
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
34
|
}
|
|
38
35
|
|
|
39
36
|
/* 加载样式 */
|
|
@@ -42,9 +39,6 @@
|
|
|
42
39
|
align-items: center;
|
|
43
40
|
justify-content: center;
|
|
44
41
|
flex-direction: column;
|
|
45
|
-
position: absolute;
|
|
46
|
-
left: 50%;
|
|
47
|
-
transform: translateX(-50%);
|
|
48
42
|
img {
|
|
49
43
|
margin-bottom: 24px;
|
|
50
44
|
}
|