linkmore-design 1.0.42 → 1.0.43
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/CustomTableOption/index.d.ts +2 -1
- package/dist/index.umd.js +15 -5
- package/dist/index.umd.min.js +2 -2
- package/es/CkFilter/baseFilter/index.js +9 -2
- package/es/CustomTableOption/index.d.ts +2 -1
- package/es/CustomTableOption/index.js +7 -3
- package/es/IconFont/font/iconfont.css +23 -15
- package/es/IconFont/font/iconfont.js +6 -6
- package/es/IconFont/font/iconfont.ttf +0 -0
- package/es/IconFont/font/iconfont.woff +0 -0
- package/es/IconFont/font/iconfont.woff2 +0 -0
- package/lib/CkFilter/baseFilter/index.js +9 -2
- package/lib/CustomTableOption/index.d.ts +2 -1
- package/lib/CustomTableOption/index.js +9 -3
- package/lib/IconFont/font/iconfont.css +23 -15
- package/lib/IconFont/font/iconfont.js +6 -6
- package/lib/IconFont/font/iconfont.ttf +0 -0
- package/lib/IconFont/font/iconfont.woff +0 -0
- package/lib/IconFont/font/iconfont.woff2 +0 -0
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -55,6 +55,13 @@ var Filter = function Filter() {
|
|
|
55
55
|
visibleFields = state.visibleFields,
|
|
56
56
|
orderFields = state.orderFields,
|
|
57
57
|
customFilterValues = state.customFilterValues;
|
|
58
|
+
var hasClear = (0, _react.useMemo)(function () {
|
|
59
|
+
var _Object$keys;
|
|
60
|
+
|
|
61
|
+
var obj = (0, _objectSpread2.default)({}, filterValues);
|
|
62
|
+
delete obj[searchKey];
|
|
63
|
+
return ((_Object$keys = Object.keys(obj)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) || false;
|
|
64
|
+
}, [filterValues]);
|
|
58
65
|
|
|
59
66
|
var handleFilter = function handleFilter(val) {
|
|
60
67
|
var nValue = (0, _objectSpread2.default)({}, filterValues);
|
|
@@ -84,7 +91,7 @@ var Filter = function Filter() {
|
|
|
84
91
|
|
|
85
92
|
dispatch({
|
|
86
93
|
type: 'changeFilterValues',
|
|
87
|
-
filterValues: {}
|
|
94
|
+
filterValues: (0, _defineProperty2.default)({}, searchKey, filterValues[searchKey])
|
|
88
95
|
});
|
|
89
96
|
onChange === null || onChange === void 0 ? void 0 : onChange((0, _defineProperty2.default)({}, searchKey, filterValues[searchKey]), customFilterValues);
|
|
90
97
|
};
|
|
@@ -105,7 +112,7 @@ var Filter = function Filter() {
|
|
|
105
112
|
return /*#__PURE__*/_react.default.createElement(_filterMenu.default, (0, _extends2.default)({
|
|
106
113
|
key: v.field
|
|
107
114
|
}, v));
|
|
108
|
-
}), /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Button, {
|
|
115
|
+
}), hasClear && /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Button, {
|
|
109
116
|
type: "link",
|
|
110
117
|
onClick: handleClear
|
|
111
118
|
}, "\u4E00\u952E\u6E05\u7A7A")), /*#__PURE__*/_react.default.createElement(_NestedFilter.default, null));
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TableProps } from 'antd';
|
|
2
|
+
import { TableProps, TooltipProps } from 'antd';
|
|
3
3
|
export interface ICustomTableOptionProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
style?: React.CSSProperties;
|
|
6
6
|
size?: 'small' | 'default' | 'middle';
|
|
7
|
+
tooltip?: TooltipProps;
|
|
7
8
|
filter?: Record<string, any>[];
|
|
8
9
|
columns?: TableProps<any>['columns'];
|
|
9
10
|
onSave?: (data: any) => void;
|
|
@@ -9,6 +9,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
});
|
|
10
10
|
exports.default = void 0;
|
|
11
11
|
|
|
12
|
+
require("antd/es/tooltip/style");
|
|
13
|
+
|
|
14
|
+
var _tooltip = _interopRequireDefault(require("antd/es/tooltip"));
|
|
15
|
+
|
|
12
16
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
17
|
|
|
14
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -43,7 +47,9 @@ var optionsWithDisabled = [{
|
|
|
43
47
|
}];
|
|
44
48
|
var prefixCls = 'lm_custom-table-option';
|
|
45
49
|
var LMCustomTableOption = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
46
|
-
var className = props.className
|
|
50
|
+
var className = props.className,
|
|
51
|
+
_props$tooltip = props.tooltip,
|
|
52
|
+
tooltip = _props$tooltip === void 0 ? {} : _props$tooltip;
|
|
47
53
|
var filterRef = (0, _react.useRef)(null);
|
|
48
54
|
var columnsRef = (0, _react.useRef)(null); // const sizeRef = useRef(null)
|
|
49
55
|
|
|
@@ -104,12 +110,12 @@ var LMCustomTableOption = /*#__PURE__*/(0, _react.forwardRef)(function (props, r
|
|
|
104
110
|
setVisible(false);
|
|
105
111
|
};
|
|
106
112
|
|
|
107
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Button, {
|
|
113
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_tooltip.default, Object.assign({}, tooltip), /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Button, {
|
|
108
114
|
onClick: openSetting,
|
|
109
115
|
icon: /*#__PURE__*/_react.default.createElement(_linkmoreDesign.IconFont, {
|
|
110
116
|
type: 'lmweb-setting'
|
|
111
117
|
})
|
|
112
|
-
}), /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Drawer, {
|
|
118
|
+
})), /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Drawer, {
|
|
113
119
|
className: (0, _classnames.default)(className, prefixCls),
|
|
114
120
|
title: "\u7B5B\u9009\u8BBE\u7F6E",
|
|
115
121
|
visible: visible,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: "iconfont"; /* Project id 2966019 */
|
|
3
|
-
src: url('iconfont.woff2?t=
|
|
4
|
-
url('iconfont.woff?t=
|
|
5
|
-
url('iconfont.ttf?t=
|
|
3
|
+
src: url('iconfont.woff2?t=1659434868739') format('woff2'),
|
|
4
|
+
url('iconfont.woff?t=1659434868739') format('woff'),
|
|
5
|
+
url('iconfont.ttf?t=1659434868739') format('truetype');
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.iconfont {
|
|
@@ -13,6 +13,26 @@
|
|
|
13
13
|
-moz-osx-font-smoothing: grayscale;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
.lmweb-icon_china1:before {
|
|
17
|
+
content: "\e6c9";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.lmweb-icon_English1:before {
|
|
21
|
+
content: "\e6ca";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.lmweb-icon_fan1:before {
|
|
25
|
+
content: "\e6cb";
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.lmweb-icon_application_light:before {
|
|
29
|
+
content: "\e6c7";
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.lmweb-icon_application:before {
|
|
33
|
+
content: "\e6c8";
|
|
34
|
+
}
|
|
35
|
+
|
|
16
36
|
.lmweb-icon-m-receipt:before {
|
|
17
37
|
content: "\e6c6";
|
|
18
38
|
}
|
|
@@ -89,18 +109,6 @@
|
|
|
89
109
|
content: "\e6b9";
|
|
90
110
|
}
|
|
91
111
|
|
|
92
|
-
.lmweb-icon_fan:before {
|
|
93
|
-
content: "\e6b3";
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.lmweb-icon_china:before {
|
|
97
|
-
content: "\e6b1";
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.lmweb-icon_English:before {
|
|
101
|
-
content: "\e6b2";
|
|
102
|
-
}
|
|
103
|
-
|
|
104
112
|
.lmweb-icon_deliver_light:before {
|
|
105
113
|
content: "\e6ac";
|
|
106
114
|
}
|