bhd-components 0.7.32 → 0.7.34

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.
@@ -16,7 +16,19 @@ import i18Conversion from "../../../i18n";
16
16
  className
17
17
  超长内容 出现滚动条 需在管理列定义好width 没有定义的max-width:300
18
18
  */ const BhdTableSimple = (props)=>{
19
- let { className , locale , borderBottom =false , rowSelection , ajaxErr , dataSource , kind ="simple" , loading , notDataText =i18Conversion("noData") } = 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;
20
32
  const renderTableText = ()=>{
21
33
  if (ajaxErr) {
22
34
  return /*#__PURE__*/ _jsxs("div", {
@@ -72,12 +84,30 @@ import i18Conversion from "../../../i18n";
72
84
  })
73
85
  ]
74
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
+ }
75
104
  const tableProps = _object_spread_props(_object_spread({
76
105
  style: {
77
106
  width: "100%"
78
107
  }
79
108
  }, props), {
80
109
  loading: false,
110
+ components,
81
111
  dataSource: ajaxErr ? [] : dataSource,
82
112
  className: `app_BhdTableSimple ${className || " "} ${rowSelection ? "app_BhdTableSimple_rowSelection" : ""}`,
83
113
  locale: {
@@ -85,12 +115,6 @@ import i18Conversion from "../../../i18n";
85
115
  },
86
116
  scroll: props.scroll
87
117
  });
88
- if (kind === "simple") {
89
- className += " app_BhdTableSimple_simple";
90
- }
91
- if (loading) {
92
- return loadingTable;
93
- }
94
118
  return /*#__PURE__*/ _jsx(Table, _object_spread({}, tableProps));
95
119
  };
96
120
  export default BhdTableSimple;
@@ -43,9 +43,8 @@
43
43
  justify-content: center;
44
44
  flex-direction: column;
45
45
  position: absolute;
46
- top: 50%;
47
46
  left: 50%;
48
- transform: translate(-50%, -50%);
47
+ transform: translateX(-50%);
49
48
  img {
50
49
  margin-bottom: 24px;
51
50
  }
package/es2017/index.d.ts CHANGED
@@ -69,12 +69,13 @@ export { default as TextTootip } from "./textTootip";
69
69
  export { default as zh_CN } from "antd/locale/zh_CN";
70
70
  export { default as en_US } from "antd/locale/en_US";
71
71
  export { default as Table } from "./table";
72
- export { default as message } from './message';
73
- export { default as Pagination } from './pagination';
74
- export { default as BhdTableSelect } from './tableSelect';
72
+ export { default as BhdTableSimple } from "./bhdAppLayout/components/BhdTableSimple";
73
+ export { default as message } from "./message";
74
+ export { default as Pagination } from "./pagination";
75
+ export { default as BhdTableSelect } from "./tableSelect";
75
76
  export { default as TitleBar } from "./titleBar";
76
77
  export { default as ViewImage } from "./viewImage";
77
78
  export { default as BhdTipModal } from "./bhdTipModal";
78
- export { default as BhdSelect } from './bhdSelect';
79
- export { default as BhdAppLayout } from './bhdAppLayout';
80
- export { default as CustomerService } from './customerService';
79
+ export { default as BhdSelect } from "./bhdSelect";
80
+ export { default as BhdAppLayout } from "./bhdAppLayout";
81
+ export { default as CustomerService } from "./customerService";
package/es2017/index.js CHANGED
@@ -74,6 +74,7 @@ export { default as TextTootip } from "./textTootip/index";
74
74
  export { default as zh_CN } from "antd/locale/zh_CN";
75
75
  export { default as en_US } from "antd/locale/en_US";
76
76
  export { default as Table } from "./table/index"; //改写table逻辑
77
+ export { default as BhdTableSimple } from "./bhdAppLayout/components/BhdTableSimple/index"; //改写table逻辑
77
78
  export { default as message } from "./message/index"; //封装message
78
79
  export { default as Pagination } from "./pagination/index"; //封装Pagination
79
80
  export { default as BhdTableSelect } from "./tableSelect/index"; //封装 Table Head Select
@@ -16,7 +16,19 @@ import i18Conversion from "../../../i18n";
16
16
  className
17
17
  超长内容 出现滚动条 需在管理列定义好width 没有定义的max-width:300
18
18
  */ var BhdTableSimple = function(props) {
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;
19
+ var _props_className = props.className, className = _props_className === void 0 ? "" : _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, _props_components = props.components, components = _props_components === void 0 ? {
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;
20
32
  var renderTableText = function() {
21
33
  if (ajaxErr) {
22
34
  return /*#__PURE__*/ _jsxs("div", {
@@ -72,12 +84,32 @@ import i18Conversion from "../../../i18n";
72
84
  })
73
85
  ]
74
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: function() {
101
+ return loadingTable;
102
+ }
103
+ }
104
+ });
105
+ }
75
106
  var tableProps = _object_spread_props(_object_spread({
76
107
  style: {
77
108
  width: "100%"
78
109
  }
79
110
  }, props), {
80
111
  loading: false,
112
+ components: components,
81
113
  dataSource: ajaxErr ? [] : dataSource,
82
114
  className: "app_BhdTableSimple ".concat(className || " ", " ").concat(rowSelection ? "app_BhdTableSimple_rowSelection" : ""),
83
115
  locale: {
@@ -85,12 +117,6 @@ import i18Conversion from "../../../i18n";
85
117
  },
86
118
  scroll: props.scroll
87
119
  });
88
- if (kind === "simple") {
89
- className += " app_BhdTableSimple_simple";
90
- }
91
- if (loading) {
92
- return loadingTable;
93
- }
94
120
  return /*#__PURE__*/ _jsx(Table, _object_spread({}, tableProps));
95
121
  };
96
122
  export default BhdTableSimple;
@@ -43,9 +43,8 @@
43
43
  justify-content: center;
44
44
  flex-direction: column;
45
45
  position: absolute;
46
- top: 50%;
47
46
  left: 50%;
48
- transform: translate(-50%, -50%);
47
+ transform: translateX(-50%);
49
48
  img {
50
49
  margin-bottom: 24px;
51
50
  }
package/esm/index.d.ts CHANGED
@@ -69,12 +69,13 @@ export { default as TextTootip } from "./textTootip";
69
69
  export { default as zh_CN } from "antd/locale/zh_CN";
70
70
  export { default as en_US } from "antd/locale/en_US";
71
71
  export { default as Table } from "./table";
72
- export { default as message } from './message';
73
- export { default as Pagination } from './pagination';
74
- export { default as BhdTableSelect } from './tableSelect';
72
+ export { default as BhdTableSimple } from "./bhdAppLayout/components/BhdTableSimple";
73
+ export { default as message } from "./message";
74
+ export { default as Pagination } from "./pagination";
75
+ export { default as BhdTableSelect } from "./tableSelect";
75
76
  export { default as TitleBar } from "./titleBar";
76
77
  export { default as ViewImage } from "./viewImage";
77
78
  export { default as BhdTipModal } from "./bhdTipModal";
78
- export { default as BhdSelect } from './bhdSelect';
79
- export { default as BhdAppLayout } from './bhdAppLayout';
80
- export { default as CustomerService } from './customerService';
79
+ export { default as BhdSelect } from "./bhdSelect";
80
+ export { default as BhdAppLayout } from "./bhdAppLayout";
81
+ export { default as CustomerService } from "./customerService";
package/esm/index.js CHANGED
@@ -74,6 +74,7 @@ export { default as TextTootip } from "./textTootip/index";
74
74
  export { default as zh_CN } from "antd/locale/zh_CN";
75
75
  export { default as en_US } from "antd/locale/en_US";
76
76
  export { default as Table } from "./table/index"; //改写table逻辑
77
+ export { default as BhdTableSimple } from "./bhdAppLayout/components/BhdTableSimple/index"; //改写table逻辑
77
78
  export { default as message } from "./message/index"; //封装message
78
79
  export { default as Pagination } from "./pagination/index"; //封装Pagination
79
80
  export { default as BhdTableSelect } from "./tableSelect/index"; //封装 Table Head Select
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bhd-components",
3
- "version": "0.7.32",
3
+ "version": "0.7.34",
4
4
  "description": "组件功能描述",
5
5
  "files": [
6
6
  "esm",