bhd-components 0.2.2 → 0.2.4
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 +0 -10
- package/dist/table.esm.es5.development.css +113 -23
- package/dist/table.esm.es5.development.js +14 -9
- package/dist/table.esm.es5.production.css +1 -1
- package/dist/table.esm.es5.production.js +1 -1
- package/es2017/index.d.ts +72 -68
- package/es2017/index.js +9 -2
- package/es2017/message/index.d.ts +18 -0
- package/es2017/message/index.js +42 -0
- package/es2017/message/index.module.less +91 -0
- package/es2017/pagination/index.d.ts +4 -0
- package/es2017/pagination/index.js +13 -0
- package/es2017/pagination/index.module.less +49 -0
- package/es2017/table/index.js +12 -8
- package/es2017/table/index.module.less +128 -5
- package/es2017/tableSelect/index.d.ts +3 -0
- package/es2017/tableSelect/index.js +74 -0
- package/es2017/tableSelect/index.module.less +21 -0
- package/es2017/theme/variable.less +625 -0
- package/es2017/titleBar/index.d.ts +11 -0
- package/es2017/titleBar/index.js +51 -0
- package/es2017/titleBar/index.module.less +44 -0
- package/es2017/viewImage/index.d.ts +3 -0
- package/es2017/viewImage/index.js +180 -0
- package/es2017/viewImage/index.module.less +170 -0
- package/esm/index.d.ts +72 -68
- package/esm/index.js +9 -2
- package/esm/message/index.d.ts +18 -0
- package/esm/message/index.js +42 -0
- package/esm/message/index.module.less +91 -0
- package/esm/pagination/index.d.ts +4 -0
- package/esm/pagination/index.js +13 -0
- package/esm/pagination/index.module.less +49 -0
- package/esm/table/index.js +12 -8
- package/esm/table/index.module.less +128 -5
- package/esm/tableSelect/index.d.ts +3 -0
- package/esm/tableSelect/index.js +74 -0
- package/esm/tableSelect/index.module.less +21 -0
- package/esm/theme/variable.less +625 -0
- package/esm/titleBar/index.d.ts +11 -0
- package/esm/titleBar/index.js +51 -0
- package/esm/titleBar/index.module.less +44 -0
- package/esm/viewImage/index.d.ts +3 -0
- package/esm/viewImage/index.js +185 -0
- package/esm/viewImage/index.module.less +170 -0
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -21,14 +21,4 @@ import BhdComponents from 'bhd-components';
|
|
|
21
21
|
- **文档插件:** https://docusaurus.io/docs/api/plugin-methods
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
待研究事宜:
|
|
25
|
-
1.文档语法熟悉 初步熟悉
|
|
26
|
-
2.antd组件的样式污染问题
|
|
27
|
-
1.通过provider 配置专属主题
|
|
28
|
-
3.中英文等全局配置问题
|
|
29
|
-
1.通过provider 配置专属主题
|
|
30
|
-
4.构建版本时 支持umd
|
|
31
|
-
5.构建版本后 按需加载问题
|
|
32
|
-
6.构建es6的包时,less需转成css
|
|
33
|
-
|
|
34
24
|
https://pkg.ice.work/guide/preview#%E6%96%87%E6%A1%A3%E7%BB%93%E6%9E%84
|
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
.
|
|
1
|
+
.index_module_Table__5278674b {
|
|
2
2
|
width: 100%;
|
|
3
3
|
}
|
|
4
|
-
.
|
|
4
|
+
.index_module_Table__5278674b {
|
|
5
5
|
/* 多选框间距问题 */
|
|
6
|
+
/* 分页器 */
|
|
6
7
|
}
|
|
7
|
-
.
|
|
8
|
-
.
|
|
8
|
+
.index_module_Table__5278674b table th,
|
|
9
|
+
.index_module_Table__5278674b table td {
|
|
9
10
|
border: none;
|
|
10
11
|
border-bottom: 1px solid #e8e8e8;
|
|
11
12
|
}
|
|
12
|
-
.
|
|
13
|
+
.index_module_Table__5278674b table > .bhd-table-thead > tr > .bhd-table-cell {
|
|
13
14
|
font-weight: 400;
|
|
14
15
|
font-size: 16px;
|
|
15
16
|
color: rgba(0, 0, 0, 0.85);
|
|
16
17
|
white-space: nowrap;
|
|
17
18
|
background: #fafafa;
|
|
18
19
|
}
|
|
19
|
-
.
|
|
20
|
+
.index_module_Table__5278674b table > .bhd-table-thead > tr > .bhd-table-cell:nth-child(1) {
|
|
20
21
|
padding-left: 40px;
|
|
21
22
|
}
|
|
22
|
-
.
|
|
23
|
+
.index_module_Table__5278674b table > .bhd-table-thead > tr > .bhd-table-cell:last-child {
|
|
23
24
|
padding-right: 40px;
|
|
24
25
|
}
|
|
25
|
-
.
|
|
26
|
+
.index_module_Table__5278674b table > .bhd-table-thead > tr > .bhd-table-cell::before {
|
|
26
27
|
display: none;
|
|
27
28
|
}
|
|
28
|
-
.
|
|
29
|
+
.index_module_Table__5278674b table tbody tr.bhd-table-placeholder:hover td {
|
|
29
30
|
background-color: #ffffff;
|
|
30
31
|
}
|
|
31
|
-
.
|
|
32
|
+
.index_module_Table__5278674b table tbody tr:not(.bhd-table-placeholder) {
|
|
32
33
|
background: transparent;
|
|
33
34
|
}
|
|
34
|
-
.
|
|
35
|
+
.index_module_Table__5278674b table tbody tr:not(.bhd-table-placeholder):hover td {
|
|
35
36
|
background-color: #ffeeeb !important;
|
|
36
37
|
}
|
|
37
|
-
.
|
|
38
|
+
.index_module_Table__5278674b table tbody tr:not(.bhd-table-placeholder) td {
|
|
38
39
|
word-wrap: break-word;
|
|
39
40
|
word-break: break-all;
|
|
40
41
|
overflow: hidden;
|
|
@@ -42,35 +43,124 @@
|
|
|
42
43
|
text-overflow: ellipsis;
|
|
43
44
|
/* 多选框 距右的距离 */
|
|
44
45
|
}
|
|
45
|
-
.
|
|
46
|
+
.index_module_Table__5278674b table tbody tr:not(.bhd-table-placeholder) td:nth-child(1) {
|
|
46
47
|
padding-left: 40px;
|
|
47
48
|
}
|
|
48
|
-
.
|
|
49
|
+
.index_module_Table__5278674b table tbody tr:not(.bhd-table-placeholder) td:last-child {
|
|
49
50
|
padding-right: 40px;
|
|
50
51
|
}
|
|
51
|
-
.
|
|
52
|
+
.index_module_Table__5278674b table tbody tr:not(.bhd-table-placeholder) td.bhd-table-selection-column {
|
|
52
53
|
-webkit-padding-end: 16px;
|
|
53
54
|
padding-inline-end: 16px;
|
|
54
55
|
}
|
|
55
|
-
.
|
|
56
|
+
.index_module_Table__5278674b .bhd-table-wrapper {
|
|
56
57
|
/* check 选中变色 */
|
|
57
58
|
/* scroll 固定列 设置overflow:hidden 阴影消失问题 */
|
|
58
59
|
}
|
|
59
|
-
.
|
|
60
|
+
.index_module_Table__5278674b .bhd-table-wrapper .bhd-table-selection-col {
|
|
60
61
|
width: 72px !important;
|
|
61
62
|
}
|
|
62
|
-
.
|
|
63
|
+
.index_module_Table__5278674b .bhd-table-wrapper .bhd-table-tbody > tr.bhd-table-row-selected > td {
|
|
63
64
|
background: #ffffff;
|
|
64
65
|
}
|
|
65
|
-
.
|
|
66
|
-
.
|
|
66
|
+
.index_module_Table__5278674b .bhd-table-wrapper .bhd-table-cell-fix-left-first::after,
|
|
67
|
+
.index_module_Table__5278674b .bhd-table-wrapper .bhd-table-cell-fix-left-last::after {
|
|
67
68
|
right: 2px;
|
|
68
69
|
}
|
|
69
|
-
.
|
|
70
|
-
.
|
|
70
|
+
.index_module_Table__5278674b .bhd-table-wrapper .bhd-table-cell-fix-right-first::after,
|
|
71
|
+
.index_module_Table__5278674b .bhd-table-wrapper .bhd-table-cell-fix-right-last::after {
|
|
71
72
|
left: 2px;
|
|
72
73
|
}
|
|
73
|
-
.
|
|
74
|
+
.index_module_Table__5278674b .bhd-pagination .bhd-pagination-item {
|
|
75
|
+
border-color: transparent;
|
|
76
|
+
}
|
|
77
|
+
.index_module_Table__5278674b .bhd-pagination .bhd-pagination-item-link {
|
|
78
|
+
border: none !important;
|
|
79
|
+
background: none !important;
|
|
80
|
+
}
|
|
81
|
+
.index_module_Table__5278674b .bhd-pagination .bhd-pagination-item-active {
|
|
82
|
+
background-color: #f4523b;
|
|
83
|
+
}
|
|
84
|
+
.index_module_Table__5278674b .bhd-pagination .bhd-pagination-item-active:hover {
|
|
85
|
+
background-color: #ff7d66;
|
|
86
|
+
}
|
|
87
|
+
.index_module_Table__5278674b .bhd-pagination .bhd-pagination-item-active:hover > a {
|
|
88
|
+
color: #ffffff;
|
|
89
|
+
}
|
|
90
|
+
.index_module_Table__5278674b .bhd-pagination .bhd-pagination-item-active > a {
|
|
91
|
+
color: #ffffff;
|
|
92
|
+
}
|
|
93
|
+
.index_module_Table__5278674b .bhd-pagination.bhd-pagination-disabled .bhd-pagination-item {
|
|
94
|
+
border: none !important;
|
|
95
|
+
background: none !important;
|
|
96
|
+
color: rgba(0, 0, 0, 0.25) !important;
|
|
97
|
+
}
|
|
98
|
+
.index_module_Table__5278674b .bhd-pagination.bhd-pagination-disabled .bhd-pagination-item a {
|
|
99
|
+
color: rgba(0, 0, 0, 0.25) !important;
|
|
100
|
+
}
|
|
101
|
+
.index_module_Table__5278674b .bhd-pagination.bhd-pagination-mini .bhd-pagination-item {
|
|
102
|
+
margin-right: 8px !important;
|
|
103
|
+
}
|
|
104
|
+
.index_module_Table__5278674b .bhd-pagination.bhd-pagination-mini .bhd-pagination-item:not(.bhd-pagination-item-active):hover {
|
|
105
|
+
background-color: transparent !important;
|
|
106
|
+
}
|
|
107
|
+
.index_module_Table__5278674b.index_module_SmallTable__5278674b table th,
|
|
108
|
+
.index_module_Table__5278674b.index_module_SmallTable__5278674b table td {
|
|
109
|
+
border: none;
|
|
110
|
+
border-bottom: 1px solid #EBEBEB;
|
|
111
|
+
}
|
|
112
|
+
.index_module_Table__5278674b.index_module_SmallTable__5278674b table > .bhd-table-thead > tr > .bhd-table-cell {
|
|
113
|
+
font-weight: 500;
|
|
114
|
+
font-size: 16px;
|
|
115
|
+
color: rgba(0, 0, 0, 0.85);
|
|
116
|
+
white-space: nowrap;
|
|
117
|
+
padding-top: 8px;
|
|
118
|
+
padding-bottom: 8px;
|
|
119
|
+
background-color: #fafafa;
|
|
120
|
+
}
|
|
121
|
+
.index_module_Table__5278674b.index_module_SmallTable__5278674b table > .bhd-table-thead > tr > .bhd-table-cell:nth-child(1) {
|
|
122
|
+
padding-left: 40px;
|
|
123
|
+
}
|
|
124
|
+
.index_module_Table__5278674b.index_module_SmallTable__5278674b table > .bhd-table-thead > tr > .bhd-table-cell:last-child {
|
|
125
|
+
padding-right: 40px;
|
|
126
|
+
}
|
|
127
|
+
.index_module_Table__5278674b.index_module_SmallTable__5278674b table > .bhd-table-thead > tr > .bhd-table-cell::before {
|
|
128
|
+
display: none;
|
|
129
|
+
}
|
|
130
|
+
.index_module_Table__5278674b.index_module_SmallTable__5278674b table > .bhd-table-thead > tr > .bhd-table-cell.bhd-table-selection-column {
|
|
131
|
+
-webkit-padding-end: 16px;
|
|
132
|
+
padding-inline-end: 16px;
|
|
133
|
+
}
|
|
134
|
+
.index_module_Table__5278674b.index_module_SmallTable__5278674b table tbody tr.bhd-table-placeholder:hover td {
|
|
135
|
+
background-color: #ffffff;
|
|
136
|
+
}
|
|
137
|
+
.index_module_Table__5278674b.index_module_SmallTable__5278674b table tbody tr:not(.bhd-table-placeholder) {
|
|
138
|
+
background: transparent;
|
|
139
|
+
}
|
|
140
|
+
.index_module_Table__5278674b.index_module_SmallTable__5278674b table tbody tr:not(.bhd-table-placeholder):hover td {
|
|
141
|
+
background-color: #F5F5F5 !important;
|
|
142
|
+
}
|
|
143
|
+
.index_module_Table__5278674b.index_module_SmallTable__5278674b table tbody tr:not(.bhd-table-placeholder) td {
|
|
144
|
+
word-wrap: break-word;
|
|
145
|
+
word-break: break-all;
|
|
146
|
+
overflow: hidden;
|
|
147
|
+
white-space: nowrap;
|
|
148
|
+
text-overflow: ellipsis;
|
|
149
|
+
padding-top: 13.5px;
|
|
150
|
+
padding-bottom: 13.5px;
|
|
151
|
+
/* 多选框 距右的距离 */
|
|
152
|
+
}
|
|
153
|
+
.index_module_Table__5278674b.index_module_SmallTable__5278674b table tbody tr:not(.bhd-table-placeholder) td:nth-child(1) {
|
|
154
|
+
padding-left: 40px;
|
|
155
|
+
}
|
|
156
|
+
.index_module_Table__5278674b.index_module_SmallTable__5278674b table tbody tr:not(.bhd-table-placeholder) td:last-child {
|
|
157
|
+
padding-right: 40px;
|
|
158
|
+
}
|
|
159
|
+
.index_module_Table__5278674b.index_module_SmallTable__5278674b table tbody tr:not(.bhd-table-placeholder) td.bhd-table-selection-column {
|
|
160
|
+
-webkit-padding-end: 16px;
|
|
161
|
+
padding-inline-end: 16px;
|
|
162
|
+
}
|
|
163
|
+
.index_module_columnTootipClassName__5278674b .bhd-tooltip-content .bhd-tooltip-inner {
|
|
74
164
|
color: rgba(0, 0, 0, 0.85);
|
|
75
165
|
word-break: break-all;
|
|
76
166
|
}
|
|
@@ -3,11 +3,12 @@ import 'core-js/modules/es.array.map.js';
|
|
|
3
3
|
import 'core-js/modules/es.regexp.test.js';
|
|
4
4
|
import 'core-js/modules/es.regexp.exec.js';
|
|
5
5
|
import 'core-js/modules/es.string.fixed.js';
|
|
6
|
+
import 'core-js/modules/es.array.concat.js';
|
|
6
7
|
import { useState, useRef, useEffect } from 'react';
|
|
7
8
|
import 'react/jsx-runtime';
|
|
8
9
|
import 'react-dom';
|
|
9
10
|
|
|
10
|
-
var modules_63b47c51 = {"Table":"
|
|
11
|
+
var modules_63b47c51 = {"Table":"index_module_Table__5278674b","SmallTable":"index_module_SmallTable__5278674b","columnTootipClassName":"index_module_columnTootipClassName__5278674b"};
|
|
11
12
|
|
|
12
13
|
var getTextSize = function(str) {
|
|
13
14
|
var fontSize = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 14;
|
|
@@ -87,16 +88,20 @@ var Table = function(props) {
|
|
|
87
88
|
180,
|
|
88
89
|
240,
|
|
89
90
|
320
|
|
90
|
-
] : _props_defaultWidthRang, _props_isFixedLeft = props.isFixedLeft, isFixedLeft = _props_isFixedLeft === void 0 ? true : _props_isFixedLeft, _props_isFixedRight = props.isFixedRight, isFixedRight = _props_isFixedRight === void 0 ? true : _props_isFixedRight;
|
|
91
|
+
] : _props_defaultWidthRang, _props_isFixedLeft = props.isFixedLeft, isFixedLeft = _props_isFixedLeft === void 0 ? true : _props_isFixedLeft, _props_isFixedRight = props.isFixedRight, isFixedRight = _props_isFixedRight === void 0 ? true : _props_isFixedRight, _props_bordered = props.bordered, bordered = _props_bordered === void 0 ? false : _props_bordered, kind = props.kind;
|
|
91
92
|
var _useState = _slicedToArray(useState(props.columns || []), 2), columns = _useState[0], setColumns = _useState[1];
|
|
92
93
|
var _useState1 = _slicedToArray(useState(props.scroll || undefined), 2), scrollObject = _useState1[0], setScrollObject = _useState1[1];
|
|
93
94
|
var columnTootipClassName = props.columnTootipClassName, columnTootipColor = props.columnTootipColor;
|
|
94
95
|
var initColumns = function() {
|
|
95
|
-
var
|
|
96
|
+
var scrollBarDom = tableRef.current.getElementsByClassName("bhd-table-cell-scrollbar")[0];
|
|
97
|
+
var scrollBarWidth = scrollBarDom ? scrollBarDom.clientWidth : 0;
|
|
98
|
+
var tableWidth = bordered ? tableRef.current.offsetWidth - 2 - scrollBarWidth : tableRef.current.offsetWidth - scrollBarWidth;
|
|
99
|
+
console.log("gaodug", scrollBarWidth);
|
|
100
|
+
var _initColumnsWidth = initColumnsWidth(props.columns, tableWidth), selfColumns = _initColumnsWidth.columns;
|
|
96
101
|
setColumns(selfColumns);
|
|
97
102
|
var obj = scrollObject ? scrollObject : {};
|
|
98
103
|
obj = _objectSpreadProps(_objectSpread({}, obj), {
|
|
99
|
-
x:
|
|
104
|
+
x: tableWidth
|
|
100
105
|
});
|
|
101
106
|
setScrollObject(obj);
|
|
102
107
|
};
|
|
@@ -109,7 +114,7 @@ var Table = function(props) {
|
|
|
109
114
|
// item.width=parseFloat(item.width)
|
|
110
115
|
if (widthPercentage.test(item.width)) {
|
|
111
116
|
//检测到宽度为百分比 则转换为具体px 如大于100% 则视为自适应
|
|
112
|
-
item.width = parseFloat(item.width) >= 100 ? "auto" : tableWidth * item.width;
|
|
117
|
+
item.width = parseFloat(item.width) >= 100 ? "auto" : tableWidth * parseFloat(item.width) / 100;
|
|
113
118
|
} else if (typeof item.width === "number") {
|
|
114
119
|
//检测为number 则为具体的像素值
|
|
115
120
|
item.width = item.width;
|
|
@@ -174,7 +179,6 @@ var Table = function(props) {
|
|
|
174
179
|
}
|
|
175
180
|
return item;
|
|
176
181
|
});
|
|
177
|
-
// console.log("diffdiff",diff,tableWidth,minWidth,avgWidth,columns,autoNum)
|
|
178
182
|
columns = columns.map(function(item, index) {
|
|
179
183
|
//存在适应自适应列侯 多余宽度 则平均分配每一列(除最后一列)
|
|
180
184
|
if (avgWidth > 0 && index !== columns.length - 1) {
|
|
@@ -215,7 +219,9 @@ var Table = function(props) {
|
|
|
215
219
|
}, obj.style)
|
|
216
220
|
});
|
|
217
221
|
};
|
|
218
|
-
|
|
222
|
+
// if(isNaN(item.width)){
|
|
223
|
+
// console.log("宽度宽度",item,item.width,item.widthRang)
|
|
224
|
+
// }
|
|
219
225
|
return item;
|
|
220
226
|
});
|
|
221
227
|
return {
|
|
@@ -248,12 +254,11 @@ var Table = function(props) {
|
|
|
248
254
|
}
|
|
249
255
|
});
|
|
250
256
|
return /*#__PURE__*/ jsx("div", {
|
|
251
|
-
className: modules_63b47c51.Table,
|
|
257
|
+
className: "".concat(modules_63b47c51.Table, " ").concat(kind === "simple" ? modules_63b47c51.SmallTable : ""),
|
|
252
258
|
ref: tableRef,
|
|
253
259
|
children: /*#__PURE__*/ jsx(Table$1, _objectSpread({}, config))
|
|
254
260
|
});
|
|
255
261
|
};
|
|
256
|
-
// let BhdTable=Provider(Table)
|
|
257
262
|
Table.SELECTION_COLUMN = Table$1.SELECTION_COLUMN;
|
|
258
263
|
Table.EXPAND_COLUMN = Table$1.EXPAND_COLUMN;
|
|
259
264
|
Table.SELECTION_ALL = Table$1.SELECTION_ALL;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.index_module_Table__5278674b{width:100%}.index_module_Table__5278674b table td,.index_module_Table__5278674b table th{border:none;border-bottom:1px solid #e8e8e8}.index_module_Table__5278674b table>.bhd-table-thead>tr>.bhd-table-cell{background:#fafafa;color:rgba(0,0,0,.85);font-size:16px;font-weight:400;white-space:nowrap}.index_module_Table__5278674b table>.bhd-table-thead>tr>.bhd-table-cell:first-child{padding-left:40px}.index_module_Table__5278674b table>.bhd-table-thead>tr>.bhd-table-cell:last-child{padding-right:40px}.index_module_Table__5278674b table>.bhd-table-thead>tr>.bhd-table-cell:before{display:none}.index_module_Table__5278674b table tbody tr.bhd-table-placeholder:hover td{background-color:#fff}.index_module_Table__5278674b table tbody tr:not(.bhd-table-placeholder){background:transparent}.index_module_Table__5278674b table tbody tr:not(.bhd-table-placeholder):hover td{background-color:#ffeeeb!important}.index_module_Table__5278674b table tbody tr:not(.bhd-table-placeholder) td{word-wrap:break-word;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.index_module_Table__5278674b table tbody tr:not(.bhd-table-placeholder) td:first-child{padding-left:40px}.index_module_Table__5278674b table tbody tr:not(.bhd-table-placeholder) td:last-child{padding-right:40px}.index_module_Table__5278674b table tbody tr:not(.bhd-table-placeholder) td.bhd-table-selection-column{-webkit-padding-end:16px;padding-inline-end:16px}.index_module_Table__5278674b .bhd-table-wrapper .bhd-table-selection-col{width:72px!important}.index_module_Table__5278674b .bhd-table-wrapper .bhd-table-tbody>tr.bhd-table-row-selected>td{background:#fff}.index_module_Table__5278674b .bhd-table-wrapper .bhd-table-cell-fix-left-first:after,.index_module_Table__5278674b .bhd-table-wrapper .bhd-table-cell-fix-left-last:after{right:2px}.index_module_Table__5278674b .bhd-table-wrapper .bhd-table-cell-fix-right-first:after,.index_module_Table__5278674b .bhd-table-wrapper .bhd-table-cell-fix-right-last:after{left:2px}.index_module_Table__5278674b .bhd-pagination .bhd-pagination-item{border-color:transparent}.index_module_Table__5278674b .bhd-pagination .bhd-pagination-item-link{background:none!important;border:none!important}.index_module_Table__5278674b .bhd-pagination .bhd-pagination-item-active{background-color:#f4523b}.index_module_Table__5278674b .bhd-pagination .bhd-pagination-item-active:hover{background-color:#ff7d66}.index_module_Table__5278674b .bhd-pagination .bhd-pagination-item-active:hover>a,.index_module_Table__5278674b .bhd-pagination .bhd-pagination-item-active>a{color:#fff}.index_module_Table__5278674b .bhd-pagination.bhd-pagination-disabled .bhd-pagination-item{background:none!important;border:none!important;color:rgba(0,0,0,.25)!important}.index_module_Table__5278674b .bhd-pagination.bhd-pagination-disabled .bhd-pagination-item a{color:rgba(0,0,0,.25)!important}.index_module_Table__5278674b .bhd-pagination.bhd-pagination-mini .bhd-pagination-item{margin-right:8px!important}.index_module_Table__5278674b .bhd-pagination.bhd-pagination-mini .bhd-pagination-item:not(.bhd-pagination-item-active):hover{background-color:transparent!important}.index_module_Table__5278674b.index_module_SmallTable__5278674b table td,.index_module_Table__5278674b.index_module_SmallTable__5278674b table th{border:none;border-bottom:1px solid #ebebeb}.index_module_Table__5278674b.index_module_SmallTable__5278674b table>.bhd-table-thead>tr>.bhd-table-cell{background-color:#fafafa;color:rgba(0,0,0,.85);font-size:16px;font-weight:500;padding-bottom:8px;padding-top:8px;white-space:nowrap}.index_module_Table__5278674b.index_module_SmallTable__5278674b table>.bhd-table-thead>tr>.bhd-table-cell:first-child{padding-left:40px}.index_module_Table__5278674b.index_module_SmallTable__5278674b table>.bhd-table-thead>tr>.bhd-table-cell:last-child{padding-right:40px}.index_module_Table__5278674b.index_module_SmallTable__5278674b table>.bhd-table-thead>tr>.bhd-table-cell:before{display:none}.index_module_Table__5278674b.index_module_SmallTable__5278674b table>.bhd-table-thead>tr>.bhd-table-cell.bhd-table-selection-column{-webkit-padding-end:16px;padding-inline-end:16px}.index_module_Table__5278674b.index_module_SmallTable__5278674b table tbody tr.bhd-table-placeholder:hover td{background-color:#fff}.index_module_Table__5278674b.index_module_SmallTable__5278674b table tbody tr:not(.bhd-table-placeholder){background:transparent}.index_module_Table__5278674b.index_module_SmallTable__5278674b table tbody tr:not(.bhd-table-placeholder):hover td{background-color:#f5f5f5!important}.index_module_Table__5278674b.index_module_SmallTable__5278674b table tbody tr:not(.bhd-table-placeholder) td{word-wrap:break-word;overflow:hidden;padding-bottom:13.5px;padding-top:13.5px;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.index_module_Table__5278674b.index_module_SmallTable__5278674b table tbody tr:not(.bhd-table-placeholder) td:first-child{padding-left:40px}.index_module_Table__5278674b.index_module_SmallTable__5278674b table tbody tr:not(.bhd-table-placeholder) td:last-child{padding-right:40px}.index_module_Table__5278674b.index_module_SmallTable__5278674b table tbody tr:not(.bhd-table-placeholder) td.bhd-table-selection-column{-webkit-padding-end:16px;padding-inline-end:16px}.index_module_columnTootipClassName__5278674b .bhd-tooltip-content .bhd-tooltip-inner{color:rgba(0,0,0,.85);word-break:break-all}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,j as e,a as n,b as o,T as i,c as r}from"./e40d2239.esm.es5.production.js";import"core-js/modules/es.array.map.js";import"core-js/modules/es.regexp.test.js";import"core-js/modules/es.regexp.exec.js";import"core-js/modules/es.string.fixed.js";import{useState as l,useRef as
|
|
1
|
+
import{_ as t,j as e,a as n,b as o,T as i,c as r}from"./e40d2239.esm.es5.production.js";import"core-js/modules/es.array.map.js";import"core-js/modules/es.regexp.test.js";import"core-js/modules/es.regexp.exec.js";import"core-js/modules/es.string.fixed.js";import"core-js/modules/es.array.concat.js";import{useState as l,useRef as a,useEffect as d}from"react";import"react/jsx-runtime";import"react-dom";var u={Table:"index_module_Table__5278674b",SmallTable:"index_module_SmallTable__5278674b",columnTootipClassName:"index_module_columnTootipClassName__5278674b"},s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:14,n=0,o=document.createElement("div");return o.style.position="absolute",o.style.whiteSpace="nowrap",o.style.fontSize=e+"px",o.style.opacity="0",o.innerText=t,document.body.append(o),n=o.getBoundingClientRect().width,document.body.removeChild(o),n},c=function(r){var a=r.children,d=r.title,u=r.width,c=t(l(!1),2),m=c[0],h=c[1];return e(i,n(o({},r),{open:m,children:e("span",{onMouseEnter:function(t){var e=0;(e="function"==typeof u?u(t):u)?h(!(s(d)<e)):h(!0)},onMouseLeave:function(){h(!1)},children:a})}))},m=/^\d+%$/,h=/^\d+px$/,p=function(t){var e={};return parseFloat((e=window.getComputedStyle?getComputedStyle(t,null):t.currentStyle)["padding-left"])+parseFloat(e["padding-right"])},w=function(t){try{for(;t&&"TD"!==t.nodeName;)t=t.parentElement;var e=p(t);return t.clientWidth-e}catch(t){return null}},f=function(i){var s=a(null),p=a({timer:null}),f=i.defaultWidthRang,C=void 0===f?[180,240,320]:f,g=i.isFixedLeft,v=void 0===g||g,T=i.isFixedRight,E=void 0===T||T,N=i.bordered,y=void 0!==N&&N,_=i.kind,b=t(l(i.columns||[]),2),x=b[0],L=b[1],S=t(l(i.scroll||void 0),2),R=S[0],O=S[1],j=i.columnTootipClassName,F=i.columnTootipColor,I=function(){var t=s.current.getElementsByClassName("bhd-table-cell-scrollbar")[0],e=t?t.clientWidth:0,r=y?s.current.offsetWidth-2-e:s.current.offsetWidth-e;console.log("gaodug",e);var l=W(i.columns,r).columns;L(l);var a=R||{};a=n(o({},a),{x:r}),O(a)},W=function(t,i){var r=0,l=0,a=0;t=t.map(function(t){return t.width=t.width||"auto",m.test(t.width)?t.width=parseFloat(t.width)>=100?"auto":i*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=C),l+=t.widthRang[0],a+=t.widthRang[1]):(l+=t.width,a+=t.width),t.onColumnCell||(t.onColumnCell=t.onCell||function(){return{}}),t.render||(t.ellipsis={showTitle:!1},t.render=function(t){return e(c,{width:function(t){return w(t.target)},title:t,trigger:"hover",overlayClassName:j||u.columnTootipClassName,color:F||"#FFF",children:e("span",{children:t})})}),t});var d=i-l;if(d>0){var s=0;t=(t=t.map(function(t){return"auto"===t.width&&(t.width=t.widthRang[0]+d/r,t.width>t.widthRang[2]&&(s+=t.width-t.widthRang[2],t.width=t.widthRang[2])),t})).map(function(e,n){return s>0&&n!==t.length-1&&(e.width+=s/t.length-1),e})}else t=d<0?t.map(function(e,n){return v&&0===n&&(e.fixed="left"),E&&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,i){var r="function"==typeof t.onColumnCell?t.onColumnCell(e,i):{};return r.style=r.style?r.style:{},n(o({},r),{style:o({maxWidth:t.width+"px"},r.style)})},t}),{columns:t,scrollWidth:a}},M=function(){clearTimeout(p.current.timer),p.current.timer=setTimeout(function(){I()},1e3)};d(function(){return I(),window.addEventListener("resize",M),function(){clearTimeout(p.current.timer),window.removeEventListener("resize",M)}},[i.columns]);var A=n(o({bordered:!1},i),{columns:x,scroll:R||{x:"auto"}});return e("div",{className:"".concat(u.Table," ").concat("simple"===_?u.SmallTable:""),ref:s,children:e(r,o({},A))})};f.SELECTION_COLUMN=r.SELECTION_COLUMN,f.EXPAND_COLUMN=r.EXPAND_COLUMN,f.SELECTION_ALL=r.SELECTION_ALL,f.SELECTION_INVERT=r.SELECTION_INVERT,f.SELECTION_NONE=r.SELECTION_NONE,f.Column=r.Column,f.ColumnGroup=r.ColumnGroup;export{f as default};
|
package/es2017/index.d.ts
CHANGED
|
@@ -1,73 +1,77 @@
|
|
|
1
|
-
|
|
2
|
-
export { default as
|
|
3
|
-
export { default as
|
|
4
|
-
export { default as
|
|
5
|
-
export { default as
|
|
6
|
-
export { default as
|
|
7
|
-
export { default as
|
|
8
|
-
export { default as
|
|
9
|
-
export { default as
|
|
10
|
-
export { default as
|
|
11
|
-
export { default as
|
|
12
|
-
export { default as
|
|
13
|
-
export { default as
|
|
14
|
-
export { default as
|
|
15
|
-
export { default as
|
|
16
|
-
export { default as
|
|
17
|
-
export { default as
|
|
18
|
-
export { default as
|
|
19
|
-
export { default as
|
|
20
|
-
export { default as
|
|
21
|
-
export { default as
|
|
22
|
-
export { default as
|
|
23
|
-
export { default as
|
|
24
|
-
export { default as
|
|
25
|
-
export { default as
|
|
26
|
-
export { default as
|
|
27
|
-
export { default as
|
|
28
|
-
export { default as
|
|
29
|
-
export { default as
|
|
30
|
-
export { default as
|
|
31
|
-
export { default as
|
|
32
|
-
export { default as
|
|
33
|
-
export { default as
|
|
34
|
-
export { default as Modal } from
|
|
35
|
-
export { default as notification } from
|
|
36
|
-
export { default as
|
|
37
|
-
export { default as
|
|
38
|
-
export { default as
|
|
39
|
-
export { default as
|
|
40
|
-
export { default as
|
|
41
|
-
export { default as
|
|
42
|
-
export { default as
|
|
43
|
-
export { default as
|
|
44
|
-
export { default as
|
|
45
|
-
export { default as
|
|
46
|
-
export { default as
|
|
47
|
-
export { default as
|
|
48
|
-
export { default as
|
|
49
|
-
export { default as
|
|
50
|
-
export { default as
|
|
51
|
-
export { default as
|
|
52
|
-
export { default as
|
|
53
|
-
export { default as
|
|
54
|
-
export { default as
|
|
55
|
-
export { default as
|
|
56
|
-
export { default as
|
|
57
|
-
export { default as
|
|
58
|
-
export { default as
|
|
59
|
-
export { default as
|
|
60
|
-
export { default as
|
|
61
|
-
export { default as
|
|
62
|
-
export { default as
|
|
63
|
-
export { default as
|
|
64
|
-
export { default as
|
|
65
|
-
export { default as
|
|
66
|
-
export { default as
|
|
67
|
-
export { default as
|
|
68
|
-
export { default as version } from 'antd/es/version';
|
|
1
|
+
import "./theme/variable.less";
|
|
2
|
+
export { default as Affix } from "antd/es/affix";
|
|
3
|
+
export { default as Alert } from "antd/es/alert";
|
|
4
|
+
export { default as Anchor } from "antd/es/anchor";
|
|
5
|
+
export { default as AutoComplete } from "antd/es/auto-complete";
|
|
6
|
+
export { default as Avatar } from "antd/es/avatar";
|
|
7
|
+
export { default as FloatButton } from "antd/es/float-button";
|
|
8
|
+
export { default as BackTop } from "antd/es/back-top";
|
|
9
|
+
export { default as Badge } from "antd/es/badge";
|
|
10
|
+
export { default as Breadcrumb } from "antd/es/breadcrumb";
|
|
11
|
+
export { default as Button } from "antd/es/button";
|
|
12
|
+
export { default as Calendar } from "antd/es/calendar";
|
|
13
|
+
export { default as Card } from "antd/es/card";
|
|
14
|
+
export { default as Carousel } from "antd/es/carousel";
|
|
15
|
+
export { default as Cascader } from "antd/es/cascader";
|
|
16
|
+
export { default as Checkbox } from "antd/es/checkbox";
|
|
17
|
+
export { default as Col } from "antd/es/col";
|
|
18
|
+
export { default as Collapse } from "antd/es/collapse";
|
|
19
|
+
export { default as DatePicker } from "antd/es/date-picker";
|
|
20
|
+
export { default as Descriptions } from "antd/es/descriptions";
|
|
21
|
+
export { default as Divider } from "antd/es/divider";
|
|
22
|
+
export { default as Drawer } from "antd/es/drawer";
|
|
23
|
+
export { default as Dropdown } from "antd/es/dropdown";
|
|
24
|
+
export { default as Empty } from "antd/es/empty";
|
|
25
|
+
export { default as Form } from "antd/es/form";
|
|
26
|
+
export { default as Grid } from "antd/es/grid";
|
|
27
|
+
export { default as Image } from "antd/es/image";
|
|
28
|
+
export { default as Input } from "antd/es/input";
|
|
29
|
+
export { default as InputNumber } from "antd/es/input-number";
|
|
30
|
+
export { default as Layout } from "antd/es/layout";
|
|
31
|
+
export { default as List } from "antd/es/list";
|
|
32
|
+
export { default as Mentions } from "antd/es/mentions";
|
|
33
|
+
export { default as Menu } from "antd/es/menu";
|
|
34
|
+
export { default as Modal } from "antd/es/modal";
|
|
35
|
+
export { default as notification } from "antd/es/notification";
|
|
36
|
+
export { default as Popconfirm } from "antd/es/popconfirm";
|
|
37
|
+
export { default as Popover } from "antd/es/popover";
|
|
38
|
+
export { default as Progress } from "antd/es/progress";
|
|
39
|
+
export { default as Radio } from "antd/es/radio";
|
|
40
|
+
export { default as Rate } from "antd/es/rate";
|
|
41
|
+
export { default as Result } from "antd/es/result";
|
|
42
|
+
export { default as Row } from "antd/es/row";
|
|
43
|
+
export { default as Segmented } from "antd/es/segmented";
|
|
44
|
+
export { default as Select } from "antd/es/select";
|
|
45
|
+
export { default as Skeleton } from "antd/es/skeleton";
|
|
46
|
+
export { default as Slider } from "antd/es/slider";
|
|
47
|
+
export { default as Space } from "antd/es/space";
|
|
48
|
+
export { default as Spin } from "antd/es/spin";
|
|
49
|
+
export { default as Statistic } from "antd/es/statistic";
|
|
50
|
+
export { default as Steps } from "antd/es/steps";
|
|
51
|
+
export { default as Switch } from "antd/es/switch";
|
|
52
|
+
export { default as Tabs } from "antd/es/tabs";
|
|
53
|
+
export { default as Tag } from "antd/es/tag";
|
|
54
|
+
export { default as theme } from "antd/es/theme";
|
|
55
|
+
export { default as TimePicker } from "antd/es/time-picker";
|
|
56
|
+
export { default as Timeline } from "antd/es/timeline";
|
|
57
|
+
export { default as Tooltip } from "antd/es/tooltip";
|
|
58
|
+
export { default as Tour } from "antd/es/tour";
|
|
59
|
+
export { default as App } from "antd/es/app";
|
|
60
|
+
export { default as Transfer } from "antd/es/transfer";
|
|
61
|
+
export { default as Tree } from "antd/es/tree";
|
|
62
|
+
export { default as TreeSelect } from "antd/es/tree-select";
|
|
63
|
+
export { default as Typography } from "antd/es/typography";
|
|
64
|
+
export { default as Upload } from "antd/es/upload";
|
|
65
|
+
export { default as Watermark } from "antd/es/watermark";
|
|
66
|
+
export { default as QRCode } from "antd/es/qrcode";
|
|
67
|
+
export { default as version } from "antd/es/version";
|
|
69
68
|
export { default as Provider } from "./provider";
|
|
70
69
|
export { default as TextTootip } from "./textTootip";
|
|
71
70
|
export { default as zh_CN } from "antd/locale/zh_CN";
|
|
72
71
|
export { default as en_US } from "antd/locale/en_US";
|
|
73
72
|
export { default as Table } from "./table";
|
|
73
|
+
export { default as message } from './message';
|
|
74
|
+
export { default as Pagination } from './pagination';
|
|
75
|
+
export { default as BhdTableSelect } from './tableSelect';
|
|
76
|
+
export { default as TitleBar } from "./titleBar";
|
|
77
|
+
export { default as ViewImage } from "./viewImage";
|
package/es2017/index.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: xiazhi
|
|
3
|
+
* @Date: 2023-06-05 16:43:26
|
|
4
|
+
*/ /* 样式变量 */ import "./theme/variable.less";
|
|
1
5
|
/* antd 默认组件 */ export { default as Affix } from "antd/es/affix";
|
|
2
6
|
export { default as Alert } from "antd/es/alert";
|
|
3
7
|
export { default as Anchor } from "antd/es/anchor";
|
|
@@ -31,10 +35,8 @@ export { default as Layout } from "antd/es/layout";
|
|
|
31
35
|
export { default as List } from "antd/es/list";
|
|
32
36
|
export { default as Mentions } from "antd/es/mentions";
|
|
33
37
|
export { default as Menu } from "antd/es/menu";
|
|
34
|
-
export { default as message } from "antd/es/message";
|
|
35
38
|
export { default as Modal } from "antd/es/modal";
|
|
36
39
|
export { default as notification } from "antd/es/notification";
|
|
37
|
-
export { default as Pagination } from "antd/es/pagination";
|
|
38
40
|
export { default as Popconfirm } from "antd/es/popconfirm";
|
|
39
41
|
export { default as Popover } from "antd/es/popover";
|
|
40
42
|
export { default as Progress } from "antd/es/progress";
|
|
@@ -73,3 +75,8 @@ export { default as TextTootip } from "./textTootip/index";
|
|
|
73
75
|
export { default as zh_CN } from "antd/locale/zh_CN";
|
|
74
76
|
export { default as en_US } from "antd/locale/en_US";
|
|
75
77
|
export { default as Table } from "./table/index"; //改写table逻辑
|
|
78
|
+
export { default as message } from "./message/index"; //封装message
|
|
79
|
+
export { default as Pagination } from "./pagination/index"; //封装Pagination
|
|
80
|
+
export { default as BhdTableSelect } from "./tableSelect/index"; //封装 Table Head Select
|
|
81
|
+
export { default as TitleBar } from "./titleBar/index"; //标题栏
|
|
82
|
+
export { default as ViewImage } from "./viewImage/index"; //查看大图
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { ArgsProps } from "antd/es/message";
|
|
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;
|
|
7
|
+
info: import("antd/es/message/interface").TypeOpen;
|
|
8
|
+
success: import("antd/es/message/interface").TypeOpen;
|
|
9
|
+
error: import("antd/es/message/interface").TypeOpen;
|
|
10
|
+
warning: import("antd/es/message/interface").TypeOpen;
|
|
11
|
+
loading: import("antd/es/message/interface").TypeOpen;
|
|
12
|
+
open: (config: ArgsProps) => import("antd/es/message/interface").MessageType;
|
|
13
|
+
destroy: (key?: React.Key) => void;
|
|
14
|
+
config: (config: import("antd/es/message/interface").ConfigOptions) => void;
|
|
15
|
+
useMessage: typeof import("antd/es/message/useMessage").default;
|
|
16
|
+
_InternalPanelDoNotUseOrYouWillBeFired: typeof import("antd/es/message/PurePanel").default;
|
|
17
|
+
};
|
|
18
|
+
export default BhdMessage;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import _object_spread from "@swc/helpers/src/_object_spread.mjs";
|
|
2
|
+
import _object_spread_props from "@swc/helpers/src/_object_spread_props.mjs";
|
|
3
|
+
import { jsx as _jsx } from "@ice/jsx-runtime/jsx-runtime";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import styles from "./index.module.less";
|
|
6
|
+
import { message } from "antd";
|
|
7
|
+
import { ExclamationCircleFilled } from "../icons/index";
|
|
8
|
+
const BhdMessage = _object_spread_props(_object_spread({}, message), {
|
|
9
|
+
customSuccess: (config)=>{
|
|
10
|
+
let className = styles.customSuccess;
|
|
11
|
+
if (typeof config === "string") return message.success({
|
|
12
|
+
content: config,
|
|
13
|
+
className
|
|
14
|
+
});
|
|
15
|
+
return message.success(_object_spread_props(_object_spread({}, config), {
|
|
16
|
+
className: `${className} ${config.className || ""}`
|
|
17
|
+
}));
|
|
18
|
+
},
|
|
19
|
+
customWarning: (config)=>{
|
|
20
|
+
let className = styles.customWarning;
|
|
21
|
+
if (typeof config === "string") return message.warning({
|
|
22
|
+
content: config,
|
|
23
|
+
className
|
|
24
|
+
});
|
|
25
|
+
return message.warning(_object_spread_props(_object_spread({}, config), {
|
|
26
|
+
className: `${className} ${config.className || ""}`
|
|
27
|
+
}));
|
|
28
|
+
},
|
|
29
|
+
customError: (config)=>{
|
|
30
|
+
let className = styles.customError;
|
|
31
|
+
if (typeof config === "string") return message.error({
|
|
32
|
+
content: config,
|
|
33
|
+
className,
|
|
34
|
+
icon: /*#__PURE__*/ _jsx(ExclamationCircleFilled, {})
|
|
35
|
+
});
|
|
36
|
+
return message.error(_object_spread_props(_object_spread({}, config), {
|
|
37
|
+
className: `${className} ${config.className || ""}`,
|
|
38
|
+
icon: config.icon || /*#__PURE__*/ _jsx(ExclamationCircleFilled, {})
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
export default BhdMessage;
|