linkmore-design 1.0.84 → 1.0.87
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/ConfigProvider/demos/componentSize.d.ts +2 -0
- package/dist/ConfigProvider/demos/style.d.ts +2 -0
- package/dist/ConfigProvider/index.d.ts +2 -2
- package/dist/Form/demos/responsive.d.ts +1 -0
- package/dist/Form/demos/responsiveAll.d.ts +3 -0
- package/dist/Form/util.d.ts +1 -0
- package/dist/ImageViewer/fns/index.d.ts +1 -0
- package/dist/Input/index.d.ts +1 -1
- package/dist/InputRange/demos/basic.d.ts +2 -0
- package/dist/InputRange/index.d.ts +8 -0
- package/dist/InputRange/style/index.d.ts +1 -0
- package/dist/LmEditTable/EditTable.d.ts +2 -0
- package/dist/LmTable/util.d.ts +7 -0
- package/dist/LmTable/virTual/VirtualTable.d.ts +2 -2
- package/dist/LmUpload/LmUpload.d.ts +1 -0
- package/dist/LmUpload/demos/formCard.d.ts +2 -0
- package/dist/LmUpload/fns/index.d.ts +1 -0
- package/dist/LmUpload/utils.d.ts +1 -0
- package/dist/LmUpload/wrapper/UploadWrapper.d.ts +4 -3
- package/dist/index.d.ts +3 -0
- package/dist/index.umd.js +483 -218
- package/dist/index.umd.min.js +5 -5
- package/es/Button/index.js +4 -2
- package/es/ConfigProvider/cssVariables.js +1 -1
- package/es/ConfigProvider/index.d.ts +2 -2
- package/es/ConfigProvider/index.js +2 -1
- package/es/DatePicker/generatePicker/generateSinglePicker.js +3 -3
- package/es/Form/container.js +2 -16
- package/es/Form/style/index.css +8 -2
- package/es/Form/util.d.ts +1 -0
- package/es/Form/util.js +22 -0
- package/es/ImageViewer/components/Carousel.js +20 -2
- package/es/ImageViewer/components/Thumb.js +24 -5
- package/es/ImageViewer/fns/index.d.ts +1 -0
- package/es/ImageViewer/fns/index.js +19 -2
- package/es/ImageViewer/style/index.css +26 -15
- package/es/Input/index.d.ts +1 -1
- package/es/Input/index.js +6 -2
- package/es/Input/style/index.css +9 -0
- package/es/InputRange/index.d.ts +8 -0
- package/es/InputRange/index.js +67 -0
- package/es/InputRange/style/index.css +511 -0
- package/es/InputRange/style/index.d.ts +1 -0
- package/es/InputRange/style/index.js +1 -0
- package/es/LmEditTable/EditTable.d.ts +2 -0
- package/es/LmEditTable/EditTable.js +19 -5
- package/es/LmFilter/style/index.css +159 -0
- package/es/LmTable/Table.js +50 -64
- package/es/LmTable/components/sheelTableCell.js +2 -2
- package/es/LmTable/style/index.css +1 -0
- package/es/LmTable/util.js +73 -16
- package/es/LmTable/virTual/VirtualTable.d.ts +2 -2
- package/es/LmTable/virTual/VirtualTable.js +6 -4
- package/es/LmUpload/LmUpload.d.ts +1 -0
- package/es/LmUpload/LmUpload.js +46 -26
- package/es/LmUpload/UploadList/ItemPicture.js +5 -4
- package/es/LmUpload/UploadList/ItemPictureCard.js +26 -12
- package/es/LmUpload/UploadList/ItemText.js +4 -3
- package/es/LmUpload/body/UploadCore.js +1 -1
- package/es/LmUpload/fns/index.d.ts +1 -0
- package/es/LmUpload/fns/index.js +91 -46
- package/es/LmUpload/style/index.css +42 -35
- package/es/LmUpload/utils.d.ts +1 -0
- package/es/LmUpload/utils.js +12 -0
- package/es/LmUpload/wrapper/UploadRoot.js +7 -13
- package/es/LmUpload/wrapper/UploadWrapper.d.ts +4 -3
- package/es/LmUpload/wrapper/UploadWrapper.js +1 -1
- package/es/Select/index.js +3 -2
- package/es/Tabs/index.js +3 -2
- package/es/index.d.ts +3 -0
- package/es/index.js +2 -1
- package/lib/Button/index.js +5 -2
- package/lib/ConfigProvider/cssVariables.js +1 -1
- package/lib/ConfigProvider/index.d.ts +2 -2
- package/lib/ConfigProvider/index.js +2 -1
- package/lib/DatePicker/generatePicker/generateSinglePicker.js +7 -7
- package/lib/Form/container.js +3 -16
- package/lib/Form/style/index.css +8 -2
- package/lib/Form/util.d.ts +1 -0
- package/lib/Form/util.js +24 -0
- package/lib/ImageViewer/components/Carousel.js +20 -2
- package/lib/ImageViewer/components/Thumb.js +25 -5
- package/lib/ImageViewer/fns/index.d.ts +1 -0
- package/lib/ImageViewer/fns/index.js +18 -1
- package/lib/ImageViewer/style/index.css +26 -15
- package/lib/Input/index.d.ts +1 -1
- package/lib/Input/index.js +7 -2
- package/lib/Input/style/index.css +9 -0
- package/lib/InputRange/index.d.ts +8 -0
- package/lib/InputRange/index.js +79 -0
- package/lib/InputRange/style/index.css +511 -0
- package/lib/InputRange/style/index.d.ts +1 -0
- package/lib/InputRange/style/index.js +3 -0
- package/lib/LmEditTable/EditTable.d.ts +2 -0
- package/lib/LmEditTable/EditTable.js +19 -4
- package/lib/LmFilter/style/index.css +159 -0
- package/lib/LmTable/Table.js +50 -64
- package/lib/LmTable/components/sheelTableCell.js +2 -2
- package/lib/LmTable/style/index.css +1 -0
- package/lib/LmTable/util.js +73 -16
- package/lib/LmTable/virTual/VirtualTable.d.ts +2 -2
- package/lib/LmTable/virTual/VirtualTable.js +6 -4
- package/lib/LmUpload/LmUpload.d.ts +1 -0
- package/lib/LmUpload/LmUpload.js +46 -26
- package/lib/LmUpload/UploadList/ItemPicture.js +5 -4
- package/lib/LmUpload/UploadList/ItemPictureCard.js +26 -12
- package/lib/LmUpload/UploadList/ItemText.js +4 -3
- package/lib/LmUpload/body/UploadCore.js +1 -1
- package/lib/LmUpload/fns/index.d.ts +1 -0
- package/lib/LmUpload/fns/index.js +89 -45
- package/lib/LmUpload/style/index.css +42 -35
- package/lib/LmUpload/utils.d.ts +1 -0
- package/lib/LmUpload/utils.js +17 -1
- package/lib/LmUpload/wrapper/UploadRoot.js +7 -13
- package/lib/LmUpload/wrapper/UploadWrapper.d.ts +4 -3
- package/lib/LmUpload/wrapper/UploadWrapper.js +2 -1
- package/lib/Select/index.js +4 -2
- package/lib/Tabs/index.js +4 -2
- package/lib/index.d.ts +3 -0
- package/lib/index.js +9 -1
- package/package.json +1 -1
|
@@ -15,7 +15,12 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
15
15
|
// 获取显示状态
|
|
16
16
|
var getVisible = (0, _react.useCallback)(function () {
|
|
17
17
|
return typeof props.visible === 'boolean' ? props.visible : state.visible;
|
|
18
|
-
}, [props, state.visible]); //
|
|
18
|
+
}, [props.visible, state.visible]); // 获取是否为视频格式
|
|
19
|
+
|
|
20
|
+
var getIsVideo = (0, _react.useCallback)(function (url) {
|
|
21
|
+
var fileExtension = url.replace(/.*\./, '').toLowerCase();
|
|
22
|
+
return ['mp4', 'm2v', 'mkv', 'ogm', 'webm'].includes(fileExtension);
|
|
23
|
+
}, []); // 关闭事件
|
|
19
24
|
|
|
20
25
|
var onClose = (0, _react.useCallback)(function () {
|
|
21
26
|
var _a;
|
|
@@ -84,8 +89,20 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
84
89
|
var slickPrev = (0, _react.useCallback)(function () {
|
|
85
90
|
previewRef.current.prev();
|
|
86
91
|
}, []);
|
|
92
|
+
(0, _react.useEffect)(function () {
|
|
93
|
+
if (getVisible()) {
|
|
94
|
+
slickGoTo(props.initialIndex);
|
|
95
|
+
dispatch({
|
|
96
|
+
type: 'changeCurrent',
|
|
97
|
+
current: {
|
|
98
|
+
currentIndex: props.initialIndex
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}, [getVisible, props.initialIndex, slickGoTo]);
|
|
87
103
|
var CoreMethods = {
|
|
88
104
|
getVisible: getVisible,
|
|
105
|
+
getIsVideo: getIsVideo,
|
|
89
106
|
onClose: onClose,
|
|
90
107
|
setTransform: setTransform,
|
|
91
108
|
afterChange: afterChange,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
.lm_image_viewer_wrapper {
|
|
2
2
|
position: fixed;
|
|
3
|
-
inset: 0;
|
|
4
3
|
z-index: 1001;
|
|
4
|
+
inset: 0;
|
|
5
5
|
}
|
|
6
6
|
.lm_image_viewer_wrapper .lm_image_viewer_mask {
|
|
7
7
|
position: absolute;
|
|
8
|
-
inset: 0;
|
|
9
8
|
background-color: rgba(0, 0, 0, 0.5);
|
|
9
|
+
inset: 0;
|
|
10
10
|
}
|
|
11
11
|
.lm_image_viewer_wrapper .lm_image_viewer_container {
|
|
12
12
|
position: relative;
|
|
13
13
|
z-index: 2;
|
|
14
14
|
display: flex;
|
|
15
15
|
flex-flow: column;
|
|
16
|
-
align-items: center;
|
|
17
16
|
gap: var(--gap);
|
|
17
|
+
align-items: center;
|
|
18
18
|
height: 100vh;
|
|
19
19
|
padding: 50px 0;
|
|
20
20
|
}
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
height: 100%;
|
|
30
30
|
}
|
|
31
31
|
.lm_image_viewer_wrapper .lm_image_viewer_container .preview_list .preview_item {
|
|
32
|
+
overflow: hidden;
|
|
32
33
|
text-align: center;
|
|
33
34
|
border-radius: 2px;
|
|
34
|
-
overflow: hidden;
|
|
35
35
|
}
|
|
36
36
|
.lm_image_viewer_wrapper .lm_image_viewer_container .preview_list .preview_item img {
|
|
37
37
|
display: inline-block;
|
|
@@ -42,16 +42,27 @@
|
|
|
42
42
|
}
|
|
43
43
|
.lm_image_viewer_wrapper .lm_image_viewer_container .thumb_list {
|
|
44
44
|
display: flex;
|
|
45
|
-
width: 51%;
|
|
46
45
|
gap: var(--gap);
|
|
46
|
+
width: 51%;
|
|
47
47
|
overflow-x: auto;
|
|
48
|
+
overflow-y: hidden;
|
|
48
49
|
}
|
|
49
50
|
.lm_image_viewer_wrapper .lm_image_viewer_container .thumb_list .thumb_item {
|
|
51
|
+
display: inline-flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
width: 98px;
|
|
55
|
+
height: 98px;
|
|
50
56
|
text-align: center;
|
|
51
|
-
|
|
57
|
+
background-color: var(--color-contrast);
|
|
52
58
|
border: 2px solid transparent;
|
|
59
|
+
border-radius: 2px;
|
|
53
60
|
transition: 0.3s;
|
|
54
61
|
}
|
|
62
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .thumb_list .thumb_item .thumb_item_icon {
|
|
63
|
+
color: var(--color-45);
|
|
64
|
+
font-size: 34px;
|
|
65
|
+
}
|
|
55
66
|
.lm_image_viewer_wrapper .lm_image_viewer_container .thumb_list .thumb_item img {
|
|
56
67
|
display: inline-block;
|
|
57
68
|
width: 94px;
|
|
@@ -63,21 +74,21 @@
|
|
|
63
74
|
}
|
|
64
75
|
.lm_image_viewer_wrapper .lm_image_viewer_container .image_viewer_action {
|
|
65
76
|
position: absolute;
|
|
66
|
-
left: 50%;
|
|
67
|
-
transform: translateX(-50%);
|
|
68
77
|
bottom: 50px;
|
|
78
|
+
left: 50%;
|
|
69
79
|
display: flex;
|
|
80
|
+
gap: 24px;
|
|
70
81
|
align-items: center;
|
|
71
82
|
justify-content: space-between;
|
|
83
|
+
padding: 8px 12px;
|
|
84
|
+
font-size: 24px;
|
|
72
85
|
background-color: #fff;
|
|
73
86
|
border-radius: 100px;
|
|
74
|
-
|
|
75
|
-
font-size: 24px;
|
|
76
|
-
padding: 8px 12px;
|
|
87
|
+
transform: translateX(-50%);
|
|
77
88
|
}
|
|
78
89
|
.lm_image_viewer_wrapper .lm_image_viewer_container .image_viewer_action .anticon {
|
|
79
|
-
transition: 0.3s;
|
|
80
90
|
cursor: pointer;
|
|
91
|
+
transition: 0.3s;
|
|
81
92
|
}
|
|
82
93
|
.lm_image_viewer_wrapper .lm_image_viewer_container .image_viewer_action .anticon:hover {
|
|
83
94
|
color: var(--primary-color);
|
|
@@ -85,16 +96,16 @@
|
|
|
85
96
|
.lm_image_viewer_wrapper .lm_image_viewer_container .arrow {
|
|
86
97
|
position: absolute;
|
|
87
98
|
top: 50%;
|
|
88
|
-
transform: translateY(-50%);
|
|
89
99
|
display: flex;
|
|
90
100
|
align-items: center;
|
|
91
101
|
justify-content: center;
|
|
92
|
-
font-size: 32px;
|
|
93
102
|
height: 48px;
|
|
94
103
|
color: var(--color-contrast);
|
|
104
|
+
font-size: 32px;
|
|
95
105
|
background-color: var(--text-color);
|
|
96
|
-
|
|
106
|
+
transform: translateY(-50%);
|
|
97
107
|
cursor: pointer;
|
|
108
|
+
transition: 0.3s;
|
|
98
109
|
}
|
|
99
110
|
.lm_image_viewer_wrapper .lm_image_viewer_container .arrow.arrow_left {
|
|
100
111
|
left: 40px;
|
package/lib/Input/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Input } from 'antd';
|
|
2
2
|
import type { InputProps, InputRef } from 'antd';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
interface ILmInput extends React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputRef>> {
|
|
4
|
+
export interface ILmInput extends React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputRef>> {
|
|
5
5
|
Group: typeof Input.Group;
|
|
6
6
|
Search: typeof Input.Search;
|
|
7
7
|
TextArea: typeof Input.TextArea;
|
package/lib/Input/index.js
CHANGED
|
@@ -17,6 +17,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
17
17
|
|
|
18
18
|
var _IconFont = _interopRequireDefault(require("../IconFont"));
|
|
19
19
|
|
|
20
|
+
var _SizeContext = _interopRequireDefault(require("../ConfigProvider/SizeContext"));
|
|
21
|
+
|
|
20
22
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
21
23
|
var t = {};
|
|
22
24
|
|
|
@@ -33,11 +35,14 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
33
35
|
var LmInput = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
34
36
|
var _props$allowClear = props.allowClear,
|
|
35
37
|
allowClear = _props$allowClear === void 0 ? true : _props$allowClear,
|
|
36
|
-
|
|
38
|
+
customizeSize = props.size,
|
|
39
|
+
rest = __rest(props, ["allowClear", "size"]);
|
|
37
40
|
|
|
41
|
+
var size = customizeSize || _react.default.useContext(_SizeContext.default) || 'middle';
|
|
38
42
|
return /*#__PURE__*/_react.default.createElement(_input.default, Object.assign({
|
|
39
43
|
ref: ref,
|
|
40
|
-
className: "lm_input"
|
|
44
|
+
className: "lm_input",
|
|
45
|
+
size: size
|
|
41
46
|
}, rest, {
|
|
42
47
|
allowClear: true
|
|
43
48
|
}));
|
|
@@ -564,6 +564,15 @@ p {
|
|
|
564
564
|
height: 22px;
|
|
565
565
|
font-size: 12px;
|
|
566
566
|
}
|
|
567
|
+
.lm_input_search .ant-input-affix-wrapper.ant-input-affix-wrapper-lg {
|
|
568
|
+
height: 40px;
|
|
569
|
+
padding: 6px 11px;
|
|
570
|
+
}
|
|
571
|
+
.lm_input_search .ant-input-affix-wrapper.ant-input-affix-wrapper-lg > .ant-input.ant-input-lg {
|
|
572
|
+
font-size: 16px !important;
|
|
573
|
+
line-height: 28px;
|
|
574
|
+
height: 28px;
|
|
575
|
+
}
|
|
567
576
|
.lm_input_search .ant-input-affix-wrapper.ant-input-affix-wrapper-focused {
|
|
568
577
|
box-shadow: none !important;
|
|
569
578
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputProps } from 'antd';
|
|
3
|
+
export interface InputRangeProps extends InputProps {
|
|
4
|
+
range: [string, string] | [number, number];
|
|
5
|
+
rangeChange?: (range: any) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const InputRange: React.FC<InputRangeProps>;
|
|
8
|
+
export default InputRange;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
require("antd/es/input/style");
|
|
11
|
+
|
|
12
|
+
var _input = _interopRequireDefault(require("antd/es/input"));
|
|
13
|
+
|
|
14
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
15
|
+
|
|
16
|
+
var _react = _interopRequireDefault(require("react"));
|
|
17
|
+
|
|
18
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
19
|
+
var t = {};
|
|
20
|
+
|
|
21
|
+
for (var p in s) {
|
|
22
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
26
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
27
|
+
}
|
|
28
|
+
return t;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var InputRange = function InputRange(_a) {
|
|
32
|
+
var _a$range = _a.range,
|
|
33
|
+
range = _a$range === void 0 ? ['', ''] : _a$range,
|
|
34
|
+
_a$rangeChange = _a.rangeChange,
|
|
35
|
+
rangeChange = _a$rangeChange === void 0 ? function () {} : _a$rangeChange,
|
|
36
|
+
editEnum = __rest(_a, ["range", "rangeChange"]); // 输入值改变
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
var nValue = (0, _toConsumableArray2.default)(range);
|
|
40
|
+
|
|
41
|
+
var handleInput = function handleInput(e, type) {
|
|
42
|
+
var v = e.target.value;
|
|
43
|
+
|
|
44
|
+
if (type === 'prev') {
|
|
45
|
+
nValue[0] = v;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (type === 'next') {
|
|
49
|
+
nValue[1] = v;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
var handleBlur = function handleBlur() {
|
|
54
|
+
rangeChange(nValue);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
58
|
+
className: "lm_editTable_wrapperRange"
|
|
59
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
60
|
+
className: "inputRange"
|
|
61
|
+
}, /*#__PURE__*/_react.default.createElement(_input.default, Object.assign({
|
|
62
|
+
value: range === null || range === void 0 ? void 0 : range[0],
|
|
63
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
64
|
+
onBlur: handleBlur,
|
|
65
|
+
onChange: function onChange(e) {
|
|
66
|
+
return handleInput(e, 'prev');
|
|
67
|
+
}
|
|
68
|
+
}, editEnum)), "~", /*#__PURE__*/_react.default.createElement(_input.default, Object.assign({
|
|
69
|
+
value: range === null || range === void 0 ? void 0 : range[1],
|
|
70
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
71
|
+
onBlur: handleBlur,
|
|
72
|
+
onChange: function onChange(e) {
|
|
73
|
+
return handleInput(e, 'next');
|
|
74
|
+
}
|
|
75
|
+
}, editEnum))));
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
var _default = InputRange;
|
|
79
|
+
exports.default = _default;
|