bhd-components 0.4.6 → 0.5.1
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/dist/table.esm.es5.development.js +2 -2
- package/dist/table.esm.es5.production.js +1 -1
- package/es2017/bhdAppLayout/components/BhdTableSimple/index.js +36 -35
- package/es2017/bhdAppLayout/index.d.ts +2 -2
- package/es2017/bhdAppLayout/index.js +1 -2
- package/es2017/bhdSelect/index.d.ts +9 -10
- package/es2017/bhdTipModal/index.module.less +87 -90
- package/es2017/i18n/en_US.d.ts +1 -7
- package/es2017/i18n/en_US.js +1 -1
- package/es2017/i18n/index.js +2 -3
- package/es2017/i18n/zh_CN.d.ts +1 -7
- package/es2017/i18n/zh_CN.js +1 -1
- package/es2017/message/index.d.ts +3 -3
- package/es2017/provider/index.js +2 -0
- package/es2017/table/index.js +2 -2
- package/es2017/theme/variable.less +1 -1
- package/es2017/titleBar/index.d.ts +4 -4
- package/esm/bhdAppLayout/components/BhdTableSimple/index.js +36 -35
- package/esm/bhdAppLayout/index.d.ts +2 -2
- package/esm/bhdAppLayout/index.js +3 -3
- package/esm/bhdSelect/index.d.ts +9 -10
- package/esm/bhdTipModal/index.module.less +87 -90
- package/esm/i18n/en_US.d.ts +1 -7
- package/esm/i18n/en_US.js +1 -1
- package/esm/i18n/index.js +2 -3
- package/esm/i18n/zh_CN.d.ts +1 -7
- package/esm/i18n/zh_CN.js +1 -1
- package/esm/message/index.d.ts +3 -3
- package/esm/provider/index.js +2 -0
- package/esm/table/index.js +2 -2
- package/esm/theme/variable.less +1 -1
- package/esm/titleBar/index.d.ts +4 -4
- package/package.json +1 -1
|
@@ -179,7 +179,7 @@ var Table = function(props) {
|
|
|
179
179
|
});
|
|
180
180
|
var diff = tableWidth - minWidth;
|
|
181
181
|
if (diff > 0) {
|
|
182
|
-
var avgWidth = 0;
|
|
182
|
+
var avgWidth = autoNum === 0 ? diff : 0;
|
|
183
183
|
// 有多余空间 平均分配至每个自适应的列
|
|
184
184
|
columns = columns.map(function(item) {
|
|
185
185
|
if (item.width === "auto") {
|
|
@@ -196,7 +196,7 @@ var Table = function(props) {
|
|
|
196
196
|
columns = columns.map(function(item, index) {
|
|
197
197
|
//存在适应自适应列侯 多余宽度 则平均分配每一列(除最后一列)
|
|
198
198
|
if (avgWidth > 0 && index !== columns.length - 1) {
|
|
199
|
-
item.width += avgWidth / columns.length - 1;
|
|
199
|
+
item.width += avgWidth / (columns.length - 1);
|
|
200
200
|
}
|
|
201
201
|
return item;
|
|
202
202
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,j as e,a as n,b as i,T as o,c as r}from"./28cd83d3.esm.es5.production.js";import{useState as l,useRef as d,useEffect as a}from"react";import"react/jsx-runtime";import"react-dom";var u={Table:"index_module_Table__dfa8dab0",SmallTable:"index_module_SmallTable__dfa8dab0",columnTootipClassName:"index_module_columnTootipClassName__dfa8dab0"},c=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:14,n=0,i=document.createElement("div");return i.style.position="absolute",i.style.whiteSpace="nowrap",i.style.fontSize=e+"px",i.style.opacity="0",i.innerText=t,document.body.append(i),n=i.getBoundingClientRect().width,document.body.removeChild(i),n},s=function(r){var d=r.children,a=r.title,u=r.width,s=t(l(!1),2),m=s[0],h=s[1];return e(o,n(i({},r),{open:m,children:e("span",{onMouseEnter:function(t){var e=0;(e="function"==typeof u?u(t):u)?h(!(c(a)<e)):h(!0)},onMouseLeave:function(){h(!1)},children:d})}))},m=/^\d+%$/,h=/^\d+px$/,f=function(t){var e={};return parseFloat((e=window.getComputedStyle?getComputedStyle(t,null):t.currentStyle)["padding-left"])+parseFloat(e["padding-right"])},p=function(t){try{for(;t&&"TD"!==t.nodeName;)t=t.parentElement;var e=f(t);return t.clientWidth-e}catch(t){return null}},w=0,C=function(o){var c=d(null),f=d({timer:null}),C=o.defaultWidthRang,v=void 0===C?[180,240,320]:C,E=o.isFixedLeft,T=void 0===E||E,N=o.isFixedRight,g=void 0===N||N,y=o.bordered,_=void 0!==y&&y,L=o.kind,b=t(l(o.columns||[]),2),x=b[0],S=b[1],R=t(l(o.scroll||void 0),2),O=R[0],F=R[1],I=o.columnTootipClassName,W=o.columnTootipColor,M=function(){(t=document.createElement("div")).style.visibility="hidden",t.style.overflow="scroll",document.body.appendChild(t),e=document.createElement("div"),t.appendChild(e),r=t.offsetWidth-e.offsetWidth,t.parentNode.removeChild(t),w=r||w;var t,e,r,l=_?c.current.offsetWidth-2-w:c.current.offsetWidth-w,d=A(o.columns,l).columns;S(d);var a=O||{};a=n(i({},a),{x:l}),F(a)},A=function(t,o){var r=0,l=0,d=0;t=t.map(function(t){return t.width=t.width||"auto",m.test(t.width)?t.width=parseFloat(t.width)>=100?"auto":o*parseFloat(t.width)/100:"number"==typeof t.width?t.width=t.width:h.test(t.width)?t.width=parseFloat(t.width):t.width="auto","auto"===t.width?(r+=1,t.widthRang||(t.widthRang=v),l+=t.widthRang[0],d+=t.widthRang[1]):(l+=t.width,d+=t.width),t.onColumnCell||(t.onColumnCell=t.onCell||function(){return{}}),t.render||(t.ellipsis={showTitle:!1},t.render=function(t){return e(s,{width:function(t){return p(t.target)},title:t,trigger:"hover",overlayClassName:I||u.columnTootipClassName,color:W||"#FFF",children:e("span",{children:t})})}),t});var a=o-l;if(a>0){var c=0;t=(t=t.map(function(t){return"auto"===t.width&&(t.width=t.widthRang[0]+a/r,t.width>t.widthRang[2]&&(c+=t.width-t.widthRang[2],t.width=t.widthRang[2])),t})).map(function(e,n){return c>0&&n!==t.length-1&&(e.width+=c/t.length-1),e})}else t=a<0?t.map(function(e,n){return T&&0===n&&(e.fixed="left"),g&&n===t.length-1&&(e.fixed="right"),"auto"===e.width&&(e.width=e.widthRang[1]),e}):t.map(function(t){return"auto"===t.width&&(t.width=t.widthRang[0]),t});return t.map(function(t){return t.onCell=function(e,o){var r="function"==typeof t.onColumnCell?t.onColumnCell(e,o):{};return r.style=r.style?r.style:{},n(i({},r),{style:i({maxWidth:t.width+"px"},r.style)})},t}),{columns:t,scrollWidth:d}},U=function(){clearTimeout(f.current.timer),f.current.timer=setTimeout(function(){M()},1e3)};a(function(){return M(),window.addEventListener("resize",U),function(){clearTimeout(f.current.timer),window.removeEventListener("resize",U)}},[o.columns]),a(function(){F(o.scroll||void 0)},[o.scroll]);var j=n(i({bordered:!1},o),{columns:x,scroll:O||{x:"auto"}});return e("div",{className:"".concat(u.Table," ").concat("simple"===L?u.SmallTable:""),ref:c,children:e(r,i({},j))})};C.SELECTION_COLUMN=r.SELECTION_COLUMN,C.EXPAND_COLUMN=r.EXPAND_COLUMN,C.SELECTION_ALL=r.SELECTION_ALL,C.SELECTION_INVERT=r.SELECTION_INVERT,C.SELECTION_NONE=r.SELECTION_NONE,C.Column=r.Column,C.ColumnGroup=r.ColumnGroup;export{C as default};
|
|
1
|
+
import{_ as t,j as e,a as n,b as i,T as o,c as r}from"./28cd83d3.esm.es5.production.js";import{useState as l,useRef as d,useEffect as a}from"react";import"react/jsx-runtime";import"react-dom";var u={Table:"index_module_Table__dfa8dab0",SmallTable:"index_module_SmallTable__dfa8dab0",columnTootipClassName:"index_module_columnTootipClassName__dfa8dab0"},c=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:14,n=0,i=document.createElement("div");return i.style.position="absolute",i.style.whiteSpace="nowrap",i.style.fontSize=e+"px",i.style.opacity="0",i.innerText=t,document.body.append(i),n=i.getBoundingClientRect().width,document.body.removeChild(i),n},s=function(r){var d=r.children,a=r.title,u=r.width,s=t(l(!1),2),m=s[0],h=s[1];return e(o,n(i({},r),{open:m,children:e("span",{onMouseEnter:function(t){var e=0;(e="function"==typeof u?u(t):u)?h(!(c(a)<e)):h(!0)},onMouseLeave:function(){h(!1)},children:d})}))},m=/^\d+%$/,h=/^\d+px$/,f=function(t){var e={};return parseFloat((e=window.getComputedStyle?getComputedStyle(t,null):t.currentStyle)["padding-left"])+parseFloat(e["padding-right"])},p=function(t){try{for(;t&&"TD"!==t.nodeName;)t=t.parentElement;var e=f(t);return t.clientWidth-e}catch(t){return null}},w=0,C=function(o){var c=d(null),f=d({timer:null}),C=o.defaultWidthRang,v=void 0===C?[180,240,320]:C,E=o.isFixedLeft,T=void 0===E||E,N=o.isFixedRight,g=void 0===N||N,y=o.bordered,_=void 0!==y&&y,L=o.kind,b=t(l(o.columns||[]),2),x=b[0],S=b[1],R=t(l(o.scroll||void 0),2),O=R[0],F=R[1],I=o.columnTootipClassName,W=o.columnTootipColor,M=function(){(t=document.createElement("div")).style.visibility="hidden",t.style.overflow="scroll",document.body.appendChild(t),e=document.createElement("div"),t.appendChild(e),r=t.offsetWidth-e.offsetWidth,t.parentNode.removeChild(t),w=r||w;var t,e,r,l=_?c.current.offsetWidth-2-w:c.current.offsetWidth-w,d=A(o.columns,l).columns;S(d);var a=O||{};a=n(i({},a),{x:l}),F(a)},A=function(t,o){var r=0,l=0,d=0;t=t.map(function(t){return t.width=t.width||"auto",m.test(t.width)?t.width=parseFloat(t.width)>=100?"auto":o*parseFloat(t.width)/100:"number"==typeof t.width?t.width=t.width:h.test(t.width)?t.width=parseFloat(t.width):t.width="auto","auto"===t.width?(r+=1,t.widthRang||(t.widthRang=v),l+=t.widthRang[0],d+=t.widthRang[1]):(l+=t.width,d+=t.width),t.onColumnCell||(t.onColumnCell=t.onCell||function(){return{}}),t.render||(t.ellipsis={showTitle:!1},t.render=function(t){return e(s,{width:function(t){return p(t.target)},title:t,trigger:"hover",overlayClassName:I||u.columnTootipClassName,color:W||"#FFF",children:e("span",{children:t})})}),t});var a=o-l;if(a>0){var c=0===r?a:0;t=(t=t.map(function(t){return"auto"===t.width&&(t.width=t.widthRang[0]+a/r,t.width>t.widthRang[2]&&(c+=t.width-t.widthRang[2],t.width=t.widthRang[2])),t})).map(function(e,n){return c>0&&n!==t.length-1&&(e.width+=c/(t.length-1)),e})}else t=a<0?t.map(function(e,n){return T&&0===n&&(e.fixed="left"),g&&n===t.length-1&&(e.fixed="right"),"auto"===e.width&&(e.width=e.widthRang[1]),e}):t.map(function(t){return"auto"===t.width&&(t.width=t.widthRang[0]),t});return t.map(function(t){return t.onCell=function(e,o){var r="function"==typeof t.onColumnCell?t.onColumnCell(e,o):{};return r.style=r.style?r.style:{},n(i({},r),{style:i({maxWidth:t.width+"px"},r.style)})},t}),{columns:t,scrollWidth:d}},U=function(){clearTimeout(f.current.timer),f.current.timer=setTimeout(function(){M()},1e3)};a(function(){return M(),window.addEventListener("resize",U),function(){clearTimeout(f.current.timer),window.removeEventListener("resize",U)}},[o.columns]),a(function(){F(o.scroll||void 0)},[o.scroll]);var j=n(i({bordered:!1},o),{columns:x,scroll:O||{x:"auto"}});return e("div",{className:"".concat(u.Table," ").concat("simple"===L?u.SmallTable:""),ref:c,children:e(r,i({},j))})};C.SELECTION_COLUMN=r.SELECTION_COLUMN,C.EXPAND_COLUMN=r.EXPAND_COLUMN,C.SELECTION_ALL=r.SELECTION_ALL,C.SELECTION_INVERT=r.SELECTION_INVERT,C.SELECTION_NONE=r.SELECTION_NONE,C.Column=r.Column,C.ColumnGroup=r.ColumnGroup;export{C as default};
|
|
@@ -28,7 +28,7 @@ import i18Conversion from "../../../i18n";
|
|
|
28
28
|
srcset: ""
|
|
29
29
|
}),
|
|
30
30
|
/*#__PURE__*/ _jsx("p", {
|
|
31
|
-
children: i18Conversion("
|
|
31
|
+
children: i18Conversion("系统繁忙,稍后重试!")
|
|
32
32
|
})
|
|
33
33
|
]
|
|
34
34
|
});
|
|
@@ -40,46 +40,40 @@ import i18Conversion from "../../../i18n";
|
|
|
40
40
|
minHeight: "150px"
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
-
} else {
|
|
44
|
-
return /*#__PURE__*/ _jsxs("div", {
|
|
45
|
-
className: "app_BhdTableSimple_noTable",
|
|
46
|
-
style: {
|
|
47
|
-
width: "100%"
|
|
48
|
-
},
|
|
49
|
-
children: [
|
|
50
|
-
/*#__PURE__*/ _jsx("img", {
|
|
51
|
-
src: NotData,
|
|
52
|
-
alt: ""
|
|
53
|
-
}),
|
|
54
|
-
/*#__PURE__*/ _jsx("div", {
|
|
55
|
-
children: notDataText
|
|
56
|
-
})
|
|
57
|
-
]
|
|
58
|
-
});
|
|
59
43
|
}
|
|
60
|
-
};
|
|
61
|
-
if (kind === "simple") {
|
|
62
|
-
/* simple 模式下 高度为48px */ className += " app_BhdTableSimple_simple";
|
|
63
|
-
}
|
|
64
|
-
if (loading) {
|
|
65
44
|
return /*#__PURE__*/ _jsxs("div", {
|
|
66
|
-
className: "app_BhdTableSimple_noTable
|
|
45
|
+
className: "app_BhdTableSimple_noTable",
|
|
46
|
+
style: {
|
|
47
|
+
width: "100%"
|
|
48
|
+
},
|
|
67
49
|
children: [
|
|
68
50
|
/*#__PURE__*/ _jsx("img", {
|
|
69
|
-
src:
|
|
70
|
-
alt: ""
|
|
71
|
-
style: {
|
|
72
|
-
width: "48px",
|
|
73
|
-
height: "48px"
|
|
74
|
-
}
|
|
51
|
+
src: NotData,
|
|
52
|
+
alt: ""
|
|
75
53
|
}),
|
|
76
|
-
/*#__PURE__*/ _jsx("
|
|
77
|
-
children:
|
|
54
|
+
/*#__PURE__*/ _jsx("div", {
|
|
55
|
+
children: notDataText
|
|
78
56
|
})
|
|
79
57
|
]
|
|
80
58
|
});
|
|
81
|
-
}
|
|
82
|
-
|
|
59
|
+
};
|
|
60
|
+
const loadingTable = /*#__PURE__*/ _jsxs("div", {
|
|
61
|
+
className: "app_BhdTableSimple_noTable app_BhdTableSimple_noTable_loadingTable",
|
|
62
|
+
children: [
|
|
63
|
+
/*#__PURE__*/ _jsx("img", {
|
|
64
|
+
src: Loading,
|
|
65
|
+
alt: "",
|
|
66
|
+
style: {
|
|
67
|
+
width: "48px",
|
|
68
|
+
height: "48px"
|
|
69
|
+
}
|
|
70
|
+
}),
|
|
71
|
+
/*#__PURE__*/ _jsx("p", {
|
|
72
|
+
children: i18Conversion("Load")
|
|
73
|
+
})
|
|
74
|
+
]
|
|
75
|
+
});
|
|
76
|
+
const tableProps = _object_spread_props(_object_spread({
|
|
83
77
|
style: {
|
|
84
78
|
width: "100%"
|
|
85
79
|
}
|
|
@@ -87,10 +81,17 @@ import i18Conversion from "../../../i18n";
|
|
|
87
81
|
loading: false,
|
|
88
82
|
dataSource: ajaxErr ? [] : dataSource,
|
|
89
83
|
className: `app_BhdTableSimple ${className || " "} ${rowSelection ? "app_BhdTableSimple_rowSelection" : ""}`,
|
|
90
|
-
locale:
|
|
84
|
+
locale: {
|
|
91
85
|
emptyText: renderTableText()
|
|
92
86
|
},
|
|
93
87
|
scroll: props.scroll
|
|
94
|
-
})
|
|
88
|
+
});
|
|
89
|
+
if (kind === "simple") {
|
|
90
|
+
className += " app_BhdTableSimple_simple";
|
|
91
|
+
}
|
|
92
|
+
if (loading) {
|
|
93
|
+
return loadingTable;
|
|
94
|
+
}
|
|
95
|
+
return /*#__PURE__*/ _jsx(Table, _object_spread({}, tableProps));
|
|
95
96
|
};
|
|
96
97
|
export default BhdTableSimple;
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { TitleBarProps } from "../titleBar";
|
|
3
3
|
import { PaginationProps } from "antd";
|
|
4
4
|
interface footerConfigProps extends PaginationProps {
|
|
5
|
-
leftDom
|
|
5
|
+
leftDom?: React.ReactElement;
|
|
6
6
|
}
|
|
7
7
|
interface BhdAppLayoutProps {
|
|
8
8
|
className?: string;
|
|
@@ -15,7 +15,7 @@ interface BhdAppLayoutProps {
|
|
|
15
15
|
title: string | number;
|
|
16
16
|
value: string | number;
|
|
17
17
|
}[];
|
|
18
|
-
onClearSingle: () => void;
|
|
18
|
+
onClearSingle: (id: string | number) => void;
|
|
19
19
|
onClearAll: () => void;
|
|
20
20
|
};
|
|
21
21
|
headContent?: any;
|
|
@@ -70,7 +70,6 @@ function BhdAppLayout(props) {
|
|
|
70
70
|
/*#__PURE__*/ _jsx("ul", {
|
|
71
71
|
className: styles.bhd_app_layout_main_filter_ul,
|
|
72
72
|
children: filterConfig.filterArr.map((ele, index)=>{
|
|
73
|
-
var _filterConfig_onClearSingle;
|
|
74
73
|
return /*#__PURE__*/ _jsxs("li", {
|
|
75
74
|
children: [
|
|
76
75
|
/*#__PURE__*/ _jsx("span", {
|
|
@@ -86,7 +85,7 @@ function BhdAppLayout(props) {
|
|
|
86
85
|
]
|
|
87
86
|
}),
|
|
88
87
|
/*#__PURE__*/ _jsx("i", {
|
|
89
|
-
onClick: filterConfig
|
|
88
|
+
onClick: ()=>filterConfig && filterConfig.onClearSingle && filterConfig.onClearSingle(ele.id),
|
|
90
89
|
className: "iconfont iconicon_guanbi_Close"
|
|
91
90
|
})
|
|
92
91
|
]
|
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
import { SelectProps } from "antd/lib/select/index";
|
|
3
|
+
interface BhdSelectProps extends SelectProps {
|
|
3
4
|
popupClassName?: string;
|
|
4
5
|
className?: string;
|
|
5
6
|
optionClassName?: string;
|
|
6
7
|
suffixIcon?: React.ReactNode;
|
|
7
8
|
children?: React.ReactNode | [React.ReactNode];
|
|
8
9
|
showSearch?: boolean;
|
|
9
|
-
dropdownRender?: (menu: React.ReactNode) =>
|
|
10
|
+
dropdownRender?: (menu: React.ReactNode) => any;
|
|
10
11
|
search_placeholder?: string;
|
|
11
12
|
select_title?: string;
|
|
12
13
|
search_label?: string;
|
|
13
14
|
mask?: boolean;
|
|
14
|
-
filterOption?: null | ((filterValue: string, item: React.ReactElement) => boolean) | boolean;
|
|
15
|
+
filterOption?: null | ((filterValue: string, item: React.ReactElement) => boolean) | boolean | any;
|
|
15
16
|
filterSort?: (a: any, b: any) => number;
|
|
16
17
|
onDropdownVisibleChange?: (open: boolean) => void;
|
|
17
18
|
onMouseEnter?: (e: React.MouseEvent) => void;
|
|
18
|
-
options:
|
|
19
|
-
value: React.Key;
|
|
20
|
-
disabled: boolean;
|
|
21
|
-
className: string;
|
|
22
|
-
title: string;
|
|
23
|
-
}[];
|
|
19
|
+
options: any;
|
|
24
20
|
arrowType?: string;
|
|
25
21
|
searchClassName?: string;
|
|
26
22
|
useType?: string;
|
|
27
23
|
listHeight?: number;
|
|
28
24
|
popupMatchSelectWidth?: number;
|
|
29
25
|
}
|
|
30
|
-
declare const BhdSelect:
|
|
26
|
+
declare const BhdSelect: {
|
|
27
|
+
(props: BhdSelectProps): React.JSX.Element;
|
|
28
|
+
Option: import("rc-select/lib/Option").OptionFC;
|
|
29
|
+
};
|
|
31
30
|
export default BhdSelect;
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
.bhd-modal-confirm-content {
|
|
22
22
|
margin-left: 0;
|
|
23
23
|
margin-top: 0;
|
|
24
|
+
max-width: none;
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
.bhd-modal-confirm-btns {
|
|
@@ -41,36 +42,33 @@
|
|
|
41
42
|
.bhd-modal-content {
|
|
42
43
|
border-radius: 8px;
|
|
43
44
|
}
|
|
44
|
-
.bhdTipModal-main{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
45
|
+
.bhdTipModal-main {
|
|
46
|
+
.bhdTipModal-comfirmTitle {
|
|
47
|
+
font-size: 16px;
|
|
48
|
+
font-weight: 500;
|
|
49
|
+
color: rgba(0, 0, 0, 0.85);
|
|
50
|
+
margin-bottom: 24px;
|
|
51
|
+
}
|
|
52
|
+
.bhdTipModal-comfirmContent {
|
|
53
|
+
width: 100%;
|
|
54
|
+
padding: 16px 32px;
|
|
55
|
+
background: rgba(255, 154, 1, 0.1);
|
|
56
|
+
border-radius: 8px;
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
border-radius: 8px;
|
|
60
|
+
& > img {
|
|
61
|
+
width: 40px;
|
|
62
|
+
height: 48px;
|
|
63
|
+
margin-right: 32px;
|
|
64
|
+
}
|
|
65
|
+
& > div {
|
|
66
|
+
color: rgba(0, 0, 0, 0.85);
|
|
67
|
+
font-size: 14px;
|
|
68
|
+
}
|
|
69
69
|
}
|
|
70
|
+
}
|
|
70
71
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
72
|
}
|
|
75
73
|
|
|
76
74
|
.success {
|
|
@@ -100,6 +98,7 @@
|
|
|
100
98
|
.bhd-modal-confirm-content {
|
|
101
99
|
margin-left: 0;
|
|
102
100
|
margin-top: 0;
|
|
101
|
+
max-width: none;
|
|
103
102
|
}
|
|
104
103
|
}
|
|
105
104
|
.bhd-modal-confirm-btns {
|
|
@@ -122,46 +121,44 @@
|
|
|
122
121
|
}
|
|
123
122
|
|
|
124
123
|
.bhdTipModal-main {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
124
|
+
.bhdTipModal-comfirmTitle {
|
|
125
|
+
font-size: 16px;
|
|
126
|
+
font-weight: 500;
|
|
127
|
+
color: rgba(0, 0, 0, 0.85);
|
|
128
|
+
margin-bottom: 24px;
|
|
129
|
+
}
|
|
130
|
+
.bhdTipModal-comfirmContent {
|
|
131
|
+
width: 100%;
|
|
132
|
+
padding: 16px 32px;
|
|
133
|
+
background: rgba(134, 168, 226, 0.1);
|
|
134
|
+
border-radius: 8px;
|
|
135
|
+
display: flex;
|
|
136
|
+
align-items: center;
|
|
137
|
+
border-radius: 8px;
|
|
138
|
+
& > img {
|
|
139
|
+
width: 48px;
|
|
140
|
+
height: 36px;
|
|
141
|
+
margin-right: 32px;
|
|
130
142
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
background: rgba(134, 168, 226, 0.1);
|
|
135
|
-
border-radius: 8px;
|
|
136
|
-
display: flex;
|
|
137
|
-
align-items: center;
|
|
138
|
-
border-radius: 8px;
|
|
139
|
-
& > img {
|
|
140
|
-
width: 48px;
|
|
141
|
-
height: 36px;
|
|
142
|
-
margin-right: 32px;
|
|
143
|
-
}
|
|
144
|
-
& > div {
|
|
145
|
-
color: rgba(0, 0, 0, 0.85);
|
|
146
|
-
font-size: 14px;
|
|
147
|
-
}
|
|
143
|
+
& > div {
|
|
144
|
+
color: rgba(0, 0, 0, 0.85);
|
|
145
|
+
font-size: 14px;
|
|
148
146
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&.bhdTipModal-infoMain {
|
|
150
|
+
.bhdTipModal-comfirmContent {
|
|
151
|
+
& > img {
|
|
152
|
+
width: 48px;
|
|
153
|
+
height: 52px;
|
|
156
154
|
}
|
|
157
155
|
}
|
|
158
156
|
}
|
|
159
|
-
|
|
157
|
+
}
|
|
160
158
|
}
|
|
161
|
-
|
|
162
159
|
}
|
|
163
160
|
|
|
164
|
-
.custom{
|
|
161
|
+
.custom {
|
|
165
162
|
width: 456px !important;
|
|
166
163
|
:global {
|
|
167
164
|
.bhd-modal-confirm-body
|
|
@@ -188,6 +185,7 @@
|
|
|
188
185
|
.bhd-modal-confirm-content {
|
|
189
186
|
margin-left: 0;
|
|
190
187
|
margin-top: 0;
|
|
188
|
+
max-width: none;
|
|
191
189
|
}
|
|
192
190
|
}
|
|
193
191
|
.bhd-modal-confirm-btns {
|
|
@@ -210,41 +208,40 @@
|
|
|
210
208
|
}
|
|
211
209
|
|
|
212
210
|
.bhdTipModal-main {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
211
|
+
.bhdTipModal-comfirmTitle {
|
|
212
|
+
font-size: 16px;
|
|
213
|
+
font-weight: 500;
|
|
214
|
+
color: rgba(0, 0, 0, 0.85);
|
|
215
|
+
margin-bottom: 24px;
|
|
216
|
+
}
|
|
217
|
+
.bhdTipModal-comfirmContent {
|
|
218
|
+
width: 100%;
|
|
219
|
+
padding: 16px 32px;
|
|
220
|
+
background: rgba(134, 168, 226, 0.1);
|
|
221
|
+
border-radius: 8px;
|
|
222
|
+
display: flex;
|
|
223
|
+
align-items: center;
|
|
224
|
+
border-radius: 8px;
|
|
225
|
+
& > img {
|
|
226
|
+
width: 48px;
|
|
227
|
+
height: 36px;
|
|
228
|
+
margin-right: 32px;
|
|
218
229
|
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
background: rgba(134, 168, 226, 0.1);
|
|
223
|
-
border-radius: 8px;
|
|
224
|
-
display: flex;
|
|
225
|
-
align-items: center;
|
|
226
|
-
border-radius: 8px;
|
|
227
|
-
& > img {
|
|
228
|
-
width: 48px;
|
|
229
|
-
height: 36px;
|
|
230
|
-
margin-right: 32px;
|
|
231
|
-
}
|
|
232
|
-
& > div {
|
|
233
|
-
color: rgba(0, 0, 0, 0.85);
|
|
234
|
-
font-size: 14px;
|
|
235
|
-
}
|
|
230
|
+
& > div {
|
|
231
|
+
color: rgba(0, 0, 0, 0.85);
|
|
232
|
+
font-size: 14px;
|
|
236
233
|
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
&.bhdTipModal-infoMain {
|
|
237
|
+
.bhdTipModal-comfirmContent {
|
|
238
|
+
& > img {
|
|
239
|
+
width: 48px;
|
|
240
|
+
height: 52px;
|
|
244
241
|
}
|
|
245
242
|
}
|
|
246
243
|
}
|
|
247
|
-
|
|
244
|
+
}
|
|
248
245
|
}
|
|
249
246
|
}
|
|
250
247
|
|
package/es2017/i18n/en_US.d.ts
CHANGED
package/es2017/i18n/en_US.js
CHANGED
package/es2017/i18n/index.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import zh_CN from "./zh_CN";
|
|
2
2
|
import en_US from "./en_US";
|
|
3
|
-
import {
|
|
3
|
+
import { ConfigProvider } from "antd";
|
|
4
4
|
const i18Conversion = (str, lang)=>{
|
|
5
5
|
if (!lang) {
|
|
6
|
-
lang =
|
|
6
|
+
lang = ConfigProvider.lang === "en" ? "en_US" : "zh_CN";
|
|
7
7
|
}
|
|
8
8
|
if (lang === "zh_CN") {
|
|
9
9
|
return zh_CN[str];
|
|
10
10
|
} else if (lang === "en_US") {
|
|
11
11
|
return en_US[str];
|
|
12
12
|
}
|
|
13
|
-
return str;
|
|
14
13
|
};
|
|
15
14
|
export default i18Conversion;
|
package/es2017/i18n/zh_CN.d.ts
CHANGED
package/es2017/i18n/zh_CN.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { ArgsProps } from "antd/es/message";
|
|
3
3
|
declare const BhdMessage: {
|
|
4
|
-
customSuccess: (config: ArgsProps) => import("antd/es/message/interface").MessageType;
|
|
5
|
-
customWarning: (config: ArgsProps) => import("antd/es/message/interface").MessageType;
|
|
6
|
-
customError: (config: ArgsProps) => import("antd/es/message/interface").MessageType;
|
|
4
|
+
customSuccess: (config: ArgsProps | string) => import("antd/es/message/interface").MessageType;
|
|
5
|
+
customWarning: (config: ArgsProps | string) => import("antd/es/message/interface").MessageType;
|
|
6
|
+
customError: (config: ArgsProps | string) => import("antd/es/message/interface").MessageType;
|
|
7
7
|
info: import("antd/es/message/interface").TypeOpen;
|
|
8
8
|
success: import("antd/es/message/interface").TypeOpen;
|
|
9
9
|
error: import("antd/es/message/interface").TypeOpen;
|
package/es2017/provider/index.js
CHANGED
|
@@ -11,6 +11,7 @@ import { StyleProvider, legacyLogicalPropertiesTransformer } from "@ant-design/c
|
|
|
11
11
|
const Provider = (Component, customConfig = {})=>{
|
|
12
12
|
let AppConfig = Object.assign(config, customConfig);
|
|
13
13
|
ConfigProvider.config(AppConfig);
|
|
14
|
+
ConfigProvider.__proto__.lang = AppConfig.locale.locale;
|
|
14
15
|
return (_param)=>{
|
|
15
16
|
var props = _extends({}, _object_destructuring_empty(_param));
|
|
16
17
|
return /*#__PURE__*/ _jsx(ConfigProvider, _object_spread_props(_object_spread({}, AppConfig), {
|
|
@@ -26,6 +27,7 @@ const Provider = (Component, customConfig = {})=>{
|
|
|
26
27
|
};
|
|
27
28
|
Provider.Component = (props)=>{
|
|
28
29
|
let AppConfig = Object.assign(config, props);
|
|
30
|
+
ConfigProvider.__proto__.lang = AppConfig.locale.locale;
|
|
29
31
|
ConfigProvider.config(AppConfig);
|
|
30
32
|
return /*#__PURE__*/ _jsx(ConfigProvider, _object_spread_props(_object_spread({}, AppConfig), {
|
|
31
33
|
children: /*#__PURE__*/ _jsx(StyleProvider, {
|
package/es2017/table/index.js
CHANGED
|
@@ -132,7 +132,7 @@ const Table = (props)=>{
|
|
|
132
132
|
});
|
|
133
133
|
let diff = tableWidth - minWidth;
|
|
134
134
|
if (diff > 0) {
|
|
135
|
-
let avgWidth = 0;
|
|
135
|
+
let avgWidth = autoNum === 0 ? diff : 0;
|
|
136
136
|
// 有多余空间 平均分配至每个自适应的列
|
|
137
137
|
columns = columns.map((item)=>{
|
|
138
138
|
if (item.width === "auto") {
|
|
@@ -149,7 +149,7 @@ const Table = (props)=>{
|
|
|
149
149
|
columns = columns.map((item, index)=>{
|
|
150
150
|
//存在适应自适应列侯 多余宽度 则平均分配每一列(除最后一列)
|
|
151
151
|
if (avgWidth > 0 && index !== columns.length - 1) {
|
|
152
|
-
item.width += avgWidth / columns.length - 1;
|
|
152
|
+
item.width += avgWidth / (columns.length - 1);
|
|
153
153
|
}
|
|
154
154
|
return item;
|
|
155
155
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
export interface TitleBarProps {
|
|
3
|
-
title?: React.
|
|
4
|
-
leftIcon?: React.
|
|
5
|
-
subTitle?: React.
|
|
6
|
-
rightContent?: (kind?: string) => React.
|
|
3
|
+
title?: React.ReactNode;
|
|
4
|
+
leftIcon?: React.ReactNode;
|
|
5
|
+
subTitle?: React.ReactNode;
|
|
6
|
+
rightContent?: (kind?: string) => React.ReactNode;
|
|
7
7
|
rightMaxWidth?: number;
|
|
8
8
|
wrapClassName?: string;
|
|
9
9
|
leftIconClassName?: string;
|
|
@@ -28,7 +28,7 @@ import i18Conversion from "../../../i18n";
|
|
|
28
28
|
srcset: ""
|
|
29
29
|
}),
|
|
30
30
|
/*#__PURE__*/ _jsx("p", {
|
|
31
|
-
children: i18Conversion("
|
|
31
|
+
children: i18Conversion("系统繁忙,稍后重试!")
|
|
32
32
|
})
|
|
33
33
|
]
|
|
34
34
|
});
|
|
@@ -40,46 +40,40 @@ import i18Conversion from "../../../i18n";
|
|
|
40
40
|
minHeight: "150px"
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
-
} else {
|
|
44
|
-
return /*#__PURE__*/ _jsxs("div", {
|
|
45
|
-
className: "app_BhdTableSimple_noTable",
|
|
46
|
-
style: {
|
|
47
|
-
width: "100%"
|
|
48
|
-
},
|
|
49
|
-
children: [
|
|
50
|
-
/*#__PURE__*/ _jsx("img", {
|
|
51
|
-
src: NotData,
|
|
52
|
-
alt: ""
|
|
53
|
-
}),
|
|
54
|
-
/*#__PURE__*/ _jsx("div", {
|
|
55
|
-
children: notDataText
|
|
56
|
-
})
|
|
57
|
-
]
|
|
58
|
-
});
|
|
59
43
|
}
|
|
60
|
-
};
|
|
61
|
-
if (kind === "simple") {
|
|
62
|
-
/* simple 模式下 高度为48px */ className += " app_BhdTableSimple_simple";
|
|
63
|
-
}
|
|
64
|
-
if (loading) {
|
|
65
44
|
return /*#__PURE__*/ _jsxs("div", {
|
|
66
|
-
className: "app_BhdTableSimple_noTable
|
|
45
|
+
className: "app_BhdTableSimple_noTable",
|
|
46
|
+
style: {
|
|
47
|
+
width: "100%"
|
|
48
|
+
},
|
|
67
49
|
children: [
|
|
68
50
|
/*#__PURE__*/ _jsx("img", {
|
|
69
|
-
src:
|
|
70
|
-
alt: ""
|
|
71
|
-
style: {
|
|
72
|
-
width: "48px",
|
|
73
|
-
height: "48px"
|
|
74
|
-
}
|
|
51
|
+
src: NotData,
|
|
52
|
+
alt: ""
|
|
75
53
|
}),
|
|
76
|
-
/*#__PURE__*/ _jsx("
|
|
77
|
-
children:
|
|
54
|
+
/*#__PURE__*/ _jsx("div", {
|
|
55
|
+
children: notDataText
|
|
78
56
|
})
|
|
79
57
|
]
|
|
80
58
|
});
|
|
81
|
-
}
|
|
82
|
-
|
|
59
|
+
};
|
|
60
|
+
var loadingTable = /*#__PURE__*/ _jsxs("div", {
|
|
61
|
+
className: "app_BhdTableSimple_noTable app_BhdTableSimple_noTable_loadingTable",
|
|
62
|
+
children: [
|
|
63
|
+
/*#__PURE__*/ _jsx("img", {
|
|
64
|
+
src: Loading,
|
|
65
|
+
alt: "",
|
|
66
|
+
style: {
|
|
67
|
+
width: "48px",
|
|
68
|
+
height: "48px"
|
|
69
|
+
}
|
|
70
|
+
}),
|
|
71
|
+
/*#__PURE__*/ _jsx("p", {
|
|
72
|
+
children: i18Conversion("Load")
|
|
73
|
+
})
|
|
74
|
+
]
|
|
75
|
+
});
|
|
76
|
+
var tableProps = _object_spread_props(_object_spread({
|
|
83
77
|
style: {
|
|
84
78
|
width: "100%"
|
|
85
79
|
}
|
|
@@ -87,10 +81,17 @@ import i18Conversion from "../../../i18n";
|
|
|
87
81
|
loading: false,
|
|
88
82
|
dataSource: ajaxErr ? [] : dataSource,
|
|
89
83
|
className: "app_BhdTableSimple ".concat(className || " ", " ").concat(rowSelection ? "app_BhdTableSimple_rowSelection" : ""),
|
|
90
|
-
locale:
|
|
84
|
+
locale: {
|
|
91
85
|
emptyText: renderTableText()
|
|
92
86
|
},
|
|
93
87
|
scroll: props.scroll
|
|
94
|
-
})
|
|
88
|
+
});
|
|
89
|
+
if (kind === "simple") {
|
|
90
|
+
className += " app_BhdTableSimple_simple";
|
|
91
|
+
}
|
|
92
|
+
if (loading) {
|
|
93
|
+
return loadingTable;
|
|
94
|
+
}
|
|
95
|
+
return /*#__PURE__*/ _jsx(Table, _object_spread({}, tableProps));
|
|
95
96
|
};
|
|
96
97
|
export default BhdTableSimple;
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { TitleBarProps } from "../titleBar";
|
|
3
3
|
import { PaginationProps } from "antd";
|
|
4
4
|
interface footerConfigProps extends PaginationProps {
|
|
5
|
-
leftDom
|
|
5
|
+
leftDom?: React.ReactElement;
|
|
6
6
|
}
|
|
7
7
|
interface BhdAppLayoutProps {
|
|
8
8
|
className?: string;
|
|
@@ -15,7 +15,7 @@ interface BhdAppLayoutProps {
|
|
|
15
15
|
title: string | number;
|
|
16
16
|
value: string | number;
|
|
17
17
|
}[];
|
|
18
|
-
onClearSingle: () => void;
|
|
18
|
+
onClearSingle: (id: string | number) => void;
|
|
19
19
|
onClearAll: () => void;
|
|
20
20
|
};
|
|
21
21
|
headContent?: any;
|
|
@@ -10,7 +10,6 @@ import { Pagination } from "antd";
|
|
|
10
10
|
import i18Conversion from "../i18n";
|
|
11
11
|
import BhdTableSimple from "./components/BhdTableSimple/index";
|
|
12
12
|
function BhdAppLayout(props) {
|
|
13
|
-
var _this = this;
|
|
14
13
|
var _filterRef_current, _headRef_current, _otherHeadRef_current, _otherContentRef_current;
|
|
15
14
|
var className = props.className, headerClassName = props.headerClassName, tableBoxClassName = props.tableBoxClassName, headConfig = props.headConfig, filterConfig = props.filterConfig, headContent = props.headContent, otherContent = props.otherContent, tableConfig = props.tableConfig, footerConfig = props.footerConfig;
|
|
16
15
|
var _useState = _sliced_to_array(useState(""), 2), scrollY = _useState[0], setScrollY = _useState[1];
|
|
@@ -72,7 +71,6 @@ function BhdAppLayout(props) {
|
|
|
72
71
|
/*#__PURE__*/ _jsx("ul", {
|
|
73
72
|
className: styles.bhd_app_layout_main_filter_ul,
|
|
74
73
|
children: filterConfig.filterArr.map(function(ele, index) {
|
|
75
|
-
var _filterConfig_onClearSingle;
|
|
76
74
|
return /*#__PURE__*/ _jsxs("li", {
|
|
77
75
|
children: [
|
|
78
76
|
/*#__PURE__*/ _jsx("span", {
|
|
@@ -88,7 +86,9 @@ function BhdAppLayout(props) {
|
|
|
88
86
|
]
|
|
89
87
|
}),
|
|
90
88
|
/*#__PURE__*/ _jsx("i", {
|
|
91
|
-
onClick:
|
|
89
|
+
onClick: function() {
|
|
90
|
+
return filterConfig && filterConfig.onClearSingle && filterConfig.onClearSingle(ele.id);
|
|
91
|
+
},
|
|
92
92
|
className: "iconfont iconicon_guanbi_Close"
|
|
93
93
|
})
|
|
94
94
|
]
|
package/esm/bhdSelect/index.d.ts
CHANGED
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
import { SelectProps } from "antd/lib/select/index";
|
|
3
|
+
interface BhdSelectProps extends SelectProps {
|
|
3
4
|
popupClassName?: string;
|
|
4
5
|
className?: string;
|
|
5
6
|
optionClassName?: string;
|
|
6
7
|
suffixIcon?: React.ReactNode;
|
|
7
8
|
children?: React.ReactNode | [React.ReactNode];
|
|
8
9
|
showSearch?: boolean;
|
|
9
|
-
dropdownRender?: (menu: React.ReactNode) =>
|
|
10
|
+
dropdownRender?: (menu: React.ReactNode) => any;
|
|
10
11
|
search_placeholder?: string;
|
|
11
12
|
select_title?: string;
|
|
12
13
|
search_label?: string;
|
|
13
14
|
mask?: boolean;
|
|
14
|
-
filterOption?: null | ((filterValue: string, item: React.ReactElement) => boolean) | boolean;
|
|
15
|
+
filterOption?: null | ((filterValue: string, item: React.ReactElement) => boolean) | boolean | any;
|
|
15
16
|
filterSort?: (a: any, b: any) => number;
|
|
16
17
|
onDropdownVisibleChange?: (open: boolean) => void;
|
|
17
18
|
onMouseEnter?: (e: React.MouseEvent) => void;
|
|
18
|
-
options:
|
|
19
|
-
value: React.Key;
|
|
20
|
-
disabled: boolean;
|
|
21
|
-
className: string;
|
|
22
|
-
title: string;
|
|
23
|
-
}[];
|
|
19
|
+
options: any;
|
|
24
20
|
arrowType?: string;
|
|
25
21
|
searchClassName?: string;
|
|
26
22
|
useType?: string;
|
|
27
23
|
listHeight?: number;
|
|
28
24
|
popupMatchSelectWidth?: number;
|
|
29
25
|
}
|
|
30
|
-
declare const BhdSelect:
|
|
26
|
+
declare const BhdSelect: {
|
|
27
|
+
(props: BhdSelectProps): React.JSX.Element;
|
|
28
|
+
Option: import("rc-select/lib/Option").OptionFC;
|
|
29
|
+
};
|
|
31
30
|
export default BhdSelect;
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
.bhd-modal-confirm-content {
|
|
22
22
|
margin-left: 0;
|
|
23
23
|
margin-top: 0;
|
|
24
|
+
max-width: none;
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
.bhd-modal-confirm-btns {
|
|
@@ -41,36 +42,33 @@
|
|
|
41
42
|
.bhd-modal-content {
|
|
42
43
|
border-radius: 8px;
|
|
43
44
|
}
|
|
44
|
-
.bhdTipModal-main{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
45
|
+
.bhdTipModal-main {
|
|
46
|
+
.bhdTipModal-comfirmTitle {
|
|
47
|
+
font-size: 16px;
|
|
48
|
+
font-weight: 500;
|
|
49
|
+
color: rgba(0, 0, 0, 0.85);
|
|
50
|
+
margin-bottom: 24px;
|
|
51
|
+
}
|
|
52
|
+
.bhdTipModal-comfirmContent {
|
|
53
|
+
width: 100%;
|
|
54
|
+
padding: 16px 32px;
|
|
55
|
+
background: rgba(255, 154, 1, 0.1);
|
|
56
|
+
border-radius: 8px;
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
border-radius: 8px;
|
|
60
|
+
& > img {
|
|
61
|
+
width: 40px;
|
|
62
|
+
height: 48px;
|
|
63
|
+
margin-right: 32px;
|
|
64
|
+
}
|
|
65
|
+
& > div {
|
|
66
|
+
color: rgba(0, 0, 0, 0.85);
|
|
67
|
+
font-size: 14px;
|
|
68
|
+
}
|
|
69
69
|
}
|
|
70
|
+
}
|
|
70
71
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
72
|
}
|
|
75
73
|
|
|
76
74
|
.success {
|
|
@@ -100,6 +98,7 @@
|
|
|
100
98
|
.bhd-modal-confirm-content {
|
|
101
99
|
margin-left: 0;
|
|
102
100
|
margin-top: 0;
|
|
101
|
+
max-width: none;
|
|
103
102
|
}
|
|
104
103
|
}
|
|
105
104
|
.bhd-modal-confirm-btns {
|
|
@@ -122,46 +121,44 @@
|
|
|
122
121
|
}
|
|
123
122
|
|
|
124
123
|
.bhdTipModal-main {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
124
|
+
.bhdTipModal-comfirmTitle {
|
|
125
|
+
font-size: 16px;
|
|
126
|
+
font-weight: 500;
|
|
127
|
+
color: rgba(0, 0, 0, 0.85);
|
|
128
|
+
margin-bottom: 24px;
|
|
129
|
+
}
|
|
130
|
+
.bhdTipModal-comfirmContent {
|
|
131
|
+
width: 100%;
|
|
132
|
+
padding: 16px 32px;
|
|
133
|
+
background: rgba(134, 168, 226, 0.1);
|
|
134
|
+
border-radius: 8px;
|
|
135
|
+
display: flex;
|
|
136
|
+
align-items: center;
|
|
137
|
+
border-radius: 8px;
|
|
138
|
+
& > img {
|
|
139
|
+
width: 48px;
|
|
140
|
+
height: 36px;
|
|
141
|
+
margin-right: 32px;
|
|
130
142
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
background: rgba(134, 168, 226, 0.1);
|
|
135
|
-
border-radius: 8px;
|
|
136
|
-
display: flex;
|
|
137
|
-
align-items: center;
|
|
138
|
-
border-radius: 8px;
|
|
139
|
-
& > img {
|
|
140
|
-
width: 48px;
|
|
141
|
-
height: 36px;
|
|
142
|
-
margin-right: 32px;
|
|
143
|
-
}
|
|
144
|
-
& > div {
|
|
145
|
-
color: rgba(0, 0, 0, 0.85);
|
|
146
|
-
font-size: 14px;
|
|
147
|
-
}
|
|
143
|
+
& > div {
|
|
144
|
+
color: rgba(0, 0, 0, 0.85);
|
|
145
|
+
font-size: 14px;
|
|
148
146
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&.bhdTipModal-infoMain {
|
|
150
|
+
.bhdTipModal-comfirmContent {
|
|
151
|
+
& > img {
|
|
152
|
+
width: 48px;
|
|
153
|
+
height: 52px;
|
|
156
154
|
}
|
|
157
155
|
}
|
|
158
156
|
}
|
|
159
|
-
|
|
157
|
+
}
|
|
160
158
|
}
|
|
161
|
-
|
|
162
159
|
}
|
|
163
160
|
|
|
164
|
-
.custom{
|
|
161
|
+
.custom {
|
|
165
162
|
width: 456px !important;
|
|
166
163
|
:global {
|
|
167
164
|
.bhd-modal-confirm-body
|
|
@@ -188,6 +185,7 @@
|
|
|
188
185
|
.bhd-modal-confirm-content {
|
|
189
186
|
margin-left: 0;
|
|
190
187
|
margin-top: 0;
|
|
188
|
+
max-width: none;
|
|
191
189
|
}
|
|
192
190
|
}
|
|
193
191
|
.bhd-modal-confirm-btns {
|
|
@@ -210,41 +208,40 @@
|
|
|
210
208
|
}
|
|
211
209
|
|
|
212
210
|
.bhdTipModal-main {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
211
|
+
.bhdTipModal-comfirmTitle {
|
|
212
|
+
font-size: 16px;
|
|
213
|
+
font-weight: 500;
|
|
214
|
+
color: rgba(0, 0, 0, 0.85);
|
|
215
|
+
margin-bottom: 24px;
|
|
216
|
+
}
|
|
217
|
+
.bhdTipModal-comfirmContent {
|
|
218
|
+
width: 100%;
|
|
219
|
+
padding: 16px 32px;
|
|
220
|
+
background: rgba(134, 168, 226, 0.1);
|
|
221
|
+
border-radius: 8px;
|
|
222
|
+
display: flex;
|
|
223
|
+
align-items: center;
|
|
224
|
+
border-radius: 8px;
|
|
225
|
+
& > img {
|
|
226
|
+
width: 48px;
|
|
227
|
+
height: 36px;
|
|
228
|
+
margin-right: 32px;
|
|
218
229
|
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
background: rgba(134, 168, 226, 0.1);
|
|
223
|
-
border-radius: 8px;
|
|
224
|
-
display: flex;
|
|
225
|
-
align-items: center;
|
|
226
|
-
border-radius: 8px;
|
|
227
|
-
& > img {
|
|
228
|
-
width: 48px;
|
|
229
|
-
height: 36px;
|
|
230
|
-
margin-right: 32px;
|
|
231
|
-
}
|
|
232
|
-
& > div {
|
|
233
|
-
color: rgba(0, 0, 0, 0.85);
|
|
234
|
-
font-size: 14px;
|
|
235
|
-
}
|
|
230
|
+
& > div {
|
|
231
|
+
color: rgba(0, 0, 0, 0.85);
|
|
232
|
+
font-size: 14px;
|
|
236
233
|
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
&.bhdTipModal-infoMain {
|
|
237
|
+
.bhdTipModal-comfirmContent {
|
|
238
|
+
& > img {
|
|
239
|
+
width: 48px;
|
|
240
|
+
height: 52px;
|
|
244
241
|
}
|
|
245
242
|
}
|
|
246
243
|
}
|
|
247
|
-
|
|
244
|
+
}
|
|
248
245
|
}
|
|
249
246
|
}
|
|
250
247
|
|
package/esm/i18n/en_US.d.ts
CHANGED
package/esm/i18n/en_US.js
CHANGED
package/esm/i18n/index.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import zh_CN from "./zh_CN";
|
|
2
2
|
import en_US from "./en_US";
|
|
3
|
-
import {
|
|
3
|
+
import { ConfigProvider } from "antd";
|
|
4
4
|
var i18Conversion = function(str, lang) {
|
|
5
5
|
if (!lang) {
|
|
6
|
-
lang =
|
|
6
|
+
lang = ConfigProvider.lang === "en" ? "en_US" : "zh_CN";
|
|
7
7
|
}
|
|
8
8
|
if (lang === "zh_CN") {
|
|
9
9
|
return zh_CN[str];
|
|
10
10
|
} else if (lang === "en_US") {
|
|
11
11
|
return en_US[str];
|
|
12
12
|
}
|
|
13
|
-
return str;
|
|
14
13
|
};
|
|
15
14
|
export default i18Conversion;
|
package/esm/i18n/zh_CN.d.ts
CHANGED
package/esm/i18n/zh_CN.js
CHANGED
package/esm/message/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { ArgsProps } from "antd/es/message";
|
|
3
3
|
declare const BhdMessage: {
|
|
4
|
-
customSuccess: (config: ArgsProps) => import("antd/es/message/interface").MessageType;
|
|
5
|
-
customWarning: (config: ArgsProps) => import("antd/es/message/interface").MessageType;
|
|
6
|
-
customError: (config: ArgsProps) => import("antd/es/message/interface").MessageType;
|
|
4
|
+
customSuccess: (config: ArgsProps | string) => import("antd/es/message/interface").MessageType;
|
|
5
|
+
customWarning: (config: ArgsProps | string) => import("antd/es/message/interface").MessageType;
|
|
6
|
+
customError: (config: ArgsProps | string) => import("antd/es/message/interface").MessageType;
|
|
7
7
|
info: import("antd/es/message/interface").TypeOpen;
|
|
8
8
|
success: import("antd/es/message/interface").TypeOpen;
|
|
9
9
|
error: import("antd/es/message/interface").TypeOpen;
|
package/esm/provider/index.js
CHANGED
|
@@ -12,6 +12,7 @@ var Provider = function(Component) {
|
|
|
12
12
|
var customConfig = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
13
13
|
var AppConfig = Object.assign(config, customConfig);
|
|
14
14
|
ConfigProvider.config(AppConfig);
|
|
15
|
+
ConfigProvider.__proto__.lang = AppConfig.locale.locale;
|
|
15
16
|
return function(_param) {
|
|
16
17
|
var props = _extends({}, _object_destructuring_empty(_param));
|
|
17
18
|
return /*#__PURE__*/ _jsx(ConfigProvider, _object_spread_props(_object_spread({}, AppConfig), {
|
|
@@ -27,6 +28,7 @@ var Provider = function(Component) {
|
|
|
27
28
|
};
|
|
28
29
|
Provider.Component = function(props) {
|
|
29
30
|
var AppConfig = Object.assign(config, props);
|
|
31
|
+
ConfigProvider.__proto__.lang = AppConfig.locale.locale;
|
|
30
32
|
ConfigProvider.config(AppConfig);
|
|
31
33
|
return /*#__PURE__*/ _jsx(ConfigProvider, _object_spread_props(_object_spread({}, AppConfig), {
|
|
32
34
|
children: /*#__PURE__*/ _jsx(StyleProvider, {
|
package/esm/table/index.js
CHANGED
|
@@ -137,7 +137,7 @@ var Table = function(props) {
|
|
|
137
137
|
});
|
|
138
138
|
var diff = tableWidth - minWidth;
|
|
139
139
|
if (diff > 0) {
|
|
140
|
-
var avgWidth = 0;
|
|
140
|
+
var avgWidth = autoNum === 0 ? diff : 0;
|
|
141
141
|
// 有多余空间 平均分配至每个自适应的列
|
|
142
142
|
columns = columns.map(function(item) {
|
|
143
143
|
if (item.width === "auto") {
|
|
@@ -154,7 +154,7 @@ var Table = function(props) {
|
|
|
154
154
|
columns = columns.map(function(item, index) {
|
|
155
155
|
//存在适应自适应列侯 多余宽度 则平均分配每一列(除最后一列)
|
|
156
156
|
if (avgWidth > 0 && index !== columns.length - 1) {
|
|
157
|
-
item.width += avgWidth / columns.length - 1;
|
|
157
|
+
item.width += avgWidth / (columns.length - 1);
|
|
158
158
|
}
|
|
159
159
|
return item;
|
|
160
160
|
});
|
package/esm/theme/variable.less
CHANGED
package/esm/titleBar/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
export interface TitleBarProps {
|
|
3
|
-
title?: React.
|
|
4
|
-
leftIcon?: React.
|
|
5
|
-
subTitle?: React.
|
|
6
|
-
rightContent?: (kind?: string) => React.
|
|
3
|
+
title?: React.ReactNode;
|
|
4
|
+
leftIcon?: React.ReactNode;
|
|
5
|
+
subTitle?: React.ReactNode;
|
|
6
|
+
rightContent?: (kind?: string) => React.ReactNode;
|
|
7
7
|
rightMaxWidth?: number;
|
|
8
8
|
wrapClassName?: string;
|
|
9
9
|
leftIconClassName?: string;
|