linkmore-design 1.0.32 → 1.0.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/dist/index.umd.js +639 -15
- package/dist/index.umd.min.js +5 -5
- package/es/CustomTableOption/columnsSort.d.ts +4 -0
- package/es/CustomTableOption/columnsSort.js +317 -0
- package/es/CustomTableOption/filterSort.d.ts +4 -0
- package/es/CustomTableOption/filterSort.js +193 -0
- package/es/CustomTableOption/index.d.ts +12 -0
- package/es/CustomTableOption/index.js +122 -0
- package/es/CustomTableOption/style/index.css +548 -0
- package/es/CustomTableOption/style/index.d.ts +1 -0
- package/es/CustomTableOption/style/index.js +1 -0
- package/es/LmTable/Table.js +27 -13
- package/es/LmTable/style/style.css +4 -0
- package/es/Radio/style/style.css +2 -1
- package/es/Tag/index.js +2 -2
- package/es/Tag/style/index.css +4 -0
- package/es/index.js +9 -1
- package/es/message/style/index.css +1 -1
- package/lib/CustomTableOption/columnsSort.d.ts +4 -0
- package/lib/CustomTableOption/columnsSort.js +336 -0
- package/lib/CustomTableOption/filterSort.d.ts +4 -0
- package/lib/CustomTableOption/filterSort.js +213 -0
- package/lib/CustomTableOption/index.d.ts +12 -0
- package/lib/CustomTableOption/index.js +140 -0
- package/lib/CustomTableOption/style/index.css +548 -0
- package/lib/CustomTableOption/style/index.d.ts +1 -0
- package/lib/CustomTableOption/style/index.js +3 -0
- package/lib/LmTable/Table.js +27 -13
- package/lib/LmTable/style/style.css +4 -0
- package/lib/Radio/style/style.css +2 -1
- package/lib/Tag/index.js +2 -2
- package/lib/Tag/style/index.css +4 -0
- package/lib/index.js +9 -1
- package/lib/message/style/index.css +1 -1
- package/package.json +1 -1
package/lib/LmTable/Table.js
CHANGED
|
@@ -27,7 +27,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
27
27
|
|
|
28
28
|
var _resetConfig = _interopRequireDefault(require("./resetConfig"));
|
|
29
29
|
|
|
30
|
-
var _excluded = ["dataSource", "autoSize", "columns", "rowClick", "onDoubleClick", "checkConfig", "summary", "pagination", "hiddenPage", "loading", "virtual", "customCheck", "rowSelection"];
|
|
30
|
+
var _excluded = ["dataSource", "autoSize", "columns", "rowClick", "onDoubleClick", "checkConfig", "summary", "pagination", "hiddenPage", "loading", "virtual", "customCheck", "rowSelection", "columnsState", "tableRowType"];
|
|
31
31
|
var Summary = _proTable.default.Summary;
|
|
32
32
|
exports.Summary = Summary;
|
|
33
33
|
var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
@@ -45,6 +45,9 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
45
45
|
virtual = _props$virtual === void 0 ? false : _props$virtual,
|
|
46
46
|
customCheck = props.customCheck,
|
|
47
47
|
rowSelection = props.rowSelection,
|
|
48
|
+
columnsState = props.columnsState,
|
|
49
|
+
_props$tableRowType = props.tableRowType,
|
|
50
|
+
tableRowType = _props$tableRowType === void 0 ? 'default' : _props$tableRowType,
|
|
48
51
|
resetProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
49
52
|
var _resetProps$rowKey = resetProps.rowKey,
|
|
50
53
|
rowKey = _resetProps$rowKey === void 0 ? 'id' : _resetProps$rowKey;
|
|
@@ -89,7 +92,9 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
89
92
|
};
|
|
90
93
|
|
|
91
94
|
var resetColumns = (0, _react.useCallback)(function () {
|
|
92
|
-
return useColumns.
|
|
95
|
+
return useColumns.filter(function (item) {
|
|
96
|
+
return item.show !== false;
|
|
97
|
+
}).map(function (col, index) {
|
|
93
98
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, col), {}, {
|
|
94
99
|
width: col.width,
|
|
95
100
|
onHeaderCell: function onHeaderCell(column) {
|
|
@@ -112,20 +117,25 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
112
117
|
trigger = _Object$assign.trigger,
|
|
113
118
|
highlight = _Object$assign.highlight;
|
|
114
119
|
|
|
120
|
+
console.log(trigger, highlight, 'rowclick');
|
|
121
|
+
|
|
115
122
|
if (highlight) {
|
|
116
123
|
setActiveKey(record[rowKey]);
|
|
117
124
|
}
|
|
118
125
|
|
|
119
126
|
if (trigger === 'row') {
|
|
120
127
|
var selectedRows = useSelectedRows.selectedRows;
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
selectedRows: selectedRows
|
|
128
|
-
|
|
128
|
+
|
|
129
|
+
if (tableRowType === 'select' || tableRowType === 'default' && selectedRows.length) {
|
|
130
|
+
var selectedRowKeys = selectedRows.map(function (v) {
|
|
131
|
+
return v[rowKey];
|
|
132
|
+
});
|
|
133
|
+
var Idx = selectedRowKeys.indexOf(record[rowKey]);
|
|
134
|
+
Idx >= 0 ? selectedRows.splice(Idx, 1) : selectedRows.push(record);
|
|
135
|
+
setSelectedRows({
|
|
136
|
+
selectedRows: selectedRows
|
|
137
|
+
});
|
|
138
|
+
}
|
|
129
139
|
}
|
|
130
140
|
|
|
131
141
|
rowClick === null || rowClick === void 0 ? void 0 : rowClick(record);
|
|
@@ -147,7 +157,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
147
157
|
debounceTime: 300,
|
|
148
158
|
revalidateOnFocus: false,
|
|
149
159
|
options: {
|
|
150
|
-
setting:
|
|
160
|
+
setting: true,
|
|
151
161
|
density: false,
|
|
152
162
|
fullScreen: false,
|
|
153
163
|
reload: false
|
|
@@ -155,6 +165,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
155
165
|
columnsState: {
|
|
156
166
|
value: columnsStateMap,
|
|
157
167
|
onChange: function onChange(k) {
|
|
168
|
+
console.log(k, 'kkk');
|
|
158
169
|
setColumnsStateMap(k);
|
|
159
170
|
}
|
|
160
171
|
},
|
|
@@ -231,7 +242,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
231
242
|
// }, [columns, autoSize.width])
|
|
232
243
|
|
|
233
244
|
(0, _react.useEffect)(function () {
|
|
234
|
-
var obj = {};
|
|
245
|
+
var obj = (0, _objectSpread2.default)({}, columnsState);
|
|
235
246
|
columns === null || columns === void 0 ? void 0 : columns.forEach(function (item) {
|
|
236
247
|
if (item.fixed) {
|
|
237
248
|
obj[item.dataIndex || item.key] = {
|
|
@@ -241,6 +252,10 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
241
252
|
});
|
|
242
253
|
setColumnsStateMap(obj);
|
|
243
254
|
}, []); // useEffect(() => {
|
|
255
|
+
// console.log(props.columnsStateValue, 'v vv')
|
|
256
|
+
// setColumnsStateMap(props.columnsStateValue)
|
|
257
|
+
// }, [props.columnsStateValue])
|
|
258
|
+
// useEffect(() => {
|
|
244
259
|
// rowClick?.()
|
|
245
260
|
// }, [useSelectedRows])
|
|
246
261
|
// 将节点方法给外部使用
|
|
@@ -385,7 +400,6 @@ var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
385
400
|
_tableWarpRef$current7 = _tableWarpRef$current5.height,
|
|
386
401
|
height = _tableWarpRef$current7 === void 0 ? '100%' : _tableWarpRef$current7;
|
|
387
402
|
|
|
388
|
-
console.log(width, height, '--tableWarpReftableWarpRef', tableWarpRef.current);
|
|
389
403
|
var value = summary ? 48 : 0;
|
|
390
404
|
resizeRef.current = window.addEventListener('resize', handResize);
|
|
391
405
|
setTableSize({
|
|
@@ -1118,6 +1118,9 @@ html {
|
|
|
1118
1118
|
#lm_protable_warp .ant-pro-card-body {
|
|
1119
1119
|
padding: 0;
|
|
1120
1120
|
}
|
|
1121
|
+
#lm_protable_warp .lm_protable .ant-table {
|
|
1122
|
+
font-size: 12px;
|
|
1123
|
+
}
|
|
1121
1124
|
#lm_protable_warp .lm_protable .ant-card-body,
|
|
1122
1125
|
#lm_protable_warp .lm_protable .ant-pro-card-body {
|
|
1123
1126
|
padding: 0;
|
|
@@ -1167,6 +1170,7 @@ html {
|
|
|
1167
1170
|
#lm_protable_warp .lm_protable .ant-table-thead > tr > th {
|
|
1168
1171
|
background: var(--color-4);
|
|
1169
1172
|
font-size: 12px;
|
|
1173
|
+
padding: 8px;
|
|
1170
1174
|
}
|
|
1171
1175
|
#lm_protable_warp .lm_protable .ant-table.ant-table-small {
|
|
1172
1176
|
font-size: 12px;
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
font-size: 12px;
|
|
31
31
|
line-height: 30px;
|
|
32
32
|
height: 32px;
|
|
33
|
-
padding: 1px
|
|
33
|
+
padding: 1px 12px;
|
|
34
34
|
color: var(--font-color);
|
|
35
35
|
vertical-align: middle;
|
|
36
36
|
}
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
.lm-radio-group.ant-radio-group-small .ant-radio-button-wrapper {
|
|
74
74
|
line-height: 22px;
|
|
75
75
|
height: 24px;
|
|
76
|
+
padding: 1px 8px;
|
|
76
77
|
}
|
|
77
78
|
.lm-radio-group.ant-radio-group-small .ant-radio-button-wrapper > span:last-child {
|
|
78
79
|
line-height: 22px;
|
package/lib/Tag/index.js
CHANGED
|
@@ -30,7 +30,7 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
30
30
|
return t;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
var PresetColorTypes = ['pink', 'red', 'yellow', 'orange', 'cyan', 'green', 'blue', 'purple', 'geekblue', 'magenta', 'volcano', 'gold', 'lime'];
|
|
33
|
+
var PresetColorTypes = ['pink', 'red', 'yellow', 'orange', 'cyan', 'green', 'blue', 'purple', 'geekblue', 'magenta', 'volcano', 'gold', 'lime', 'theme'];
|
|
34
34
|
exports.PresetColorTypes = PresetColorTypes;
|
|
35
35
|
var prefixCls = 'lm_tag';
|
|
36
36
|
var LmTag = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
@@ -44,7 +44,7 @@ var LmTag = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
44
44
|
color: color,
|
|
45
45
|
className: (0, _classnames.default)(prefixCls, {
|
|
46
46
|
lm_tag_noborder: !!props.noborder
|
|
47
|
-
}, className, PresetColorTypes.includes(color) && "lm_tag_main_color")
|
|
47
|
+
}, className, PresetColorTypes.includes(color) && "lm_tag_main_color lm_tag_main_".concat(color))
|
|
48
48
|
}));
|
|
49
49
|
});
|
|
50
50
|
LmTag.CheckableTag = _tag.default.CheckableTag;
|
package/lib/Tag/style/index.css
CHANGED
|
@@ -512,6 +512,10 @@ html {
|
|
|
512
512
|
.lm_tag.ant-tag .anticon-close {
|
|
513
513
|
margin-left: 6px;
|
|
514
514
|
}
|
|
515
|
+
.lm_tag.ant-tag.lm_tag_main_theme {
|
|
516
|
+
background: var(--tree-select-bg);
|
|
517
|
+
color: var(--primary-color);
|
|
518
|
+
}
|
|
515
519
|
.lm_tag.lm_tag_noborder {
|
|
516
520
|
border-color: transparent;
|
|
517
521
|
}
|
package/lib/index.js
CHANGED
|
@@ -35,6 +35,12 @@ Object.defineProperty(exports, "CkFilter", {
|
|
|
35
35
|
return _CkFilter.default;
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
|
+
Object.defineProperty(exports, "CustomTableOption", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function get() {
|
|
41
|
+
return _CustomTableOption.default;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
38
44
|
Object.defineProperty(exports, "CustomerService", {
|
|
39
45
|
enumerable: true,
|
|
40
46
|
get: function get() {
|
|
@@ -332,4 +338,6 @@ var _Table = _interopRequireDefault(require("./Table"));
|
|
|
332
338
|
|
|
333
339
|
var _Switch = _interopRequireDefault(require("./Switch"));
|
|
334
340
|
|
|
335
|
-
var _Image = _interopRequireDefault(require("./Image"));
|
|
341
|
+
var _Image = _interopRequireDefault(require("./Image"));
|
|
342
|
+
|
|
343
|
+
var _CustomTableOption = _interopRequireDefault(require("./CustomTableOption"));
|