bhd-components 0.7.32 → 0.7.33
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/{01eedb30.esm.es5.development.js → 4601a61c.esm.es5.development.js} +1 -1
- package/dist/{2ec5f3fb.esm.es5.production.js → 560cbcc4.esm.es5.production.js} +1 -1
- package/dist/index.esm.es5.development.css +1 -2
- package/dist/index.esm.es5.development.js +35 -9
- 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 +31 -7
- package/es2017/bhdAppLayout/components/BhdTableSimple/index.less +1 -2
- package/esm/bhdAppLayout/components/BhdTableSimple/index.js +33 -7
- package/esm/bhdAppLayout/components/BhdTableSimple/index.less +1 -2
- package/package.json +1 -1
|
@@ -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")
|
|
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;
|
|
@@ -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
|
|
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;
|