@lemon-fe/components 0.1.5 → 0.1.6
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/es/BaseTable/index.js +20 -3
- package/es/BaseTable/index.less +19 -9
- package/package.json +2 -2
package/es/BaseTable/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["onWidthChange", "width", "fullTableRef"],
|
|
1
|
+
var _excluded = ["onWidthChange", "width", "fullTableRef", "children", "className"],
|
|
2
2
|
_excluded2 = ["id", "columns", "defaultColumnProps", "rowKey", "children", "summaryTitle", "summaryRecord", "dataSource", "onSortChange", "sort", "scroll", "virtual", "components", "pagination", "onChange", "rowHeight", "tableLayout", "rowActions"];
|
|
3
3
|
|
|
4
4
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
@@ -69,10 +69,25 @@ function Th(props) {
|
|
|
69
69
|
var onWidthChange = props.onWidthChange,
|
|
70
70
|
width = props.width,
|
|
71
71
|
fullTableRef = props.fullTableRef,
|
|
72
|
+
children = props.children,
|
|
73
|
+
className = props.className,
|
|
72
74
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
73
75
|
|
|
76
|
+
var reg = /\bant-table-cell-ellipsis\b/;
|
|
77
|
+
var content = children;
|
|
78
|
+
var mClassName = className;
|
|
79
|
+
|
|
80
|
+
if (mClassName && reg.test(mClassName)) {
|
|
81
|
+
mClassName = mClassName.replace(reg, '');
|
|
82
|
+
content = /*#__PURE__*/React.createElement("div", {
|
|
83
|
+
className: "ant-table-cell-ellipsis"
|
|
84
|
+
}, content);
|
|
85
|
+
}
|
|
86
|
+
|
|
74
87
|
if (!width || !onWidthChange) {
|
|
75
|
-
return /*#__PURE__*/React.createElement("th", _objectSpread({}, restProps)
|
|
88
|
+
return /*#__PURE__*/React.createElement("th", _objectSpread(_objectSpread({}, restProps), {}, {
|
|
89
|
+
className: mClassName
|
|
90
|
+
}), content);
|
|
76
91
|
}
|
|
77
92
|
|
|
78
93
|
return /*#__PURE__*/React.createElement(ResizeHeaderCell, {
|
|
@@ -80,7 +95,9 @@ function Th(props) {
|
|
|
80
95
|
onChange: onWidthChange,
|
|
81
96
|
fullTableRef: fullTableRef,
|
|
82
97
|
prefixCls: "".concat(PREFIX_CLS, "-table")
|
|
83
|
-
}, /*#__PURE__*/React.createElement("th", _objectSpread({}, restProps)
|
|
98
|
+
}, /*#__PURE__*/React.createElement("th", _objectSpread(_objectSpread({}, restProps), {}, {
|
|
99
|
+
className: mClassName
|
|
100
|
+
}), content));
|
|
84
101
|
}
|
|
85
102
|
|
|
86
103
|
function BaseTable(props) {
|
package/es/BaseTable/index.less
CHANGED
|
@@ -77,8 +77,12 @@
|
|
|
77
77
|
content: '';
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
&-column
|
|
81
|
-
|
|
80
|
+
&-column {
|
|
81
|
+
border-right: none !important;
|
|
82
|
+
|
|
83
|
+
&::after {
|
|
84
|
+
display: none !important;
|
|
85
|
+
}
|
|
82
86
|
}
|
|
83
87
|
|
|
84
88
|
&-item {
|
|
@@ -157,22 +161,28 @@
|
|
|
157
161
|
width: 11px;
|
|
158
162
|
height: 12px;
|
|
159
163
|
margin-top: -6px;
|
|
164
|
+
padding: 0 5px;
|
|
165
|
+
background-color: #bbb;
|
|
166
|
+
background-clip: content-box;
|
|
160
167
|
cursor: col-resize;
|
|
168
|
+
}
|
|
161
169
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
margin: 0 auto;
|
|
166
|
-
background-color: #bbb;
|
|
167
|
-
}
|
|
170
|
+
.ant-table-bordered &-resizable-handle {
|
|
171
|
+
right: -6px;
|
|
172
|
+
background-color: transparent;
|
|
168
173
|
}
|
|
169
174
|
|
|
170
175
|
&-resizable-indicator {
|
|
171
176
|
position: absolute;
|
|
172
177
|
top: 0;
|
|
173
178
|
z-index: 20;
|
|
174
|
-
|
|
179
|
+
box-sizing: border-box;
|
|
180
|
+
width: 11px;
|
|
181
|
+
margin-left: -5px;
|
|
182
|
+
padding: 0 5px;
|
|
175
183
|
background-color: @resize-indicator-color;
|
|
184
|
+
background-clip: content-box;
|
|
185
|
+
cursor: col-resize;
|
|
176
186
|
}
|
|
177
187
|
|
|
178
188
|
&-resizing-col thead th {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lemon-fe/components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "鲁盛杰 <lusj@cnlemon.net>",
|
|
6
6
|
"homepage": "",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"@types/lodash": "^4.14.179",
|
|
40
40
|
"@types/react-resizable": "^1.7.4"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "15adfd8b84c2c81952656df2ffa553f58c301715"
|
|
43
43
|
}
|