linkmore-design 1.1.8 → 1.1.10
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/CHANGELOG.md +1082 -9
- package/dist/Form/FormItem/index.d.ts +7 -1
- package/dist/Form/demos/ruleTime.d.ts +2 -0
- package/dist/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
- package/dist/LmUpload/components/Preview.d.ts +5 -0
- package/dist/LmUpload/wrapper/reducer.d.ts +4 -0
- package/dist/index.umd.js +292 -158
- package/dist/index.umd.min.js +8 -8
- package/dist/variables.css +121 -0
- package/es/Form/FormItem/index.d.ts +7 -1
- package/es/Form/FormItem/index.js +56 -13
- package/es/ImageViewer/components/Operate.js +5 -2
- package/es/LmEditTable/EditTable.js +24 -21
- package/es/LmEditTable/util.js +4 -4
- package/es/LmTable/Table.js +16 -10
- package/es/LmTable/style/index.css +3 -0
- package/es/LmTable/style/variables.css +3 -0
- package/es/LmTable/util.js +9 -5
- package/es/LmUpload/LmUpload.js +1 -0
- package/es/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
- package/es/LmUpload/UploadList/ItemPictureCard.js +16 -4
- package/es/LmUpload/UploadList/index.js +11 -7
- package/es/LmUpload/components/Preview.d.ts +5 -0
- package/es/LmUpload/components/Preview.js +43 -0
- package/es/LmUpload/style/index.css +118 -0
- package/es/LmUpload/style/variables.css +118 -0
- package/es/LmUpload/wrapper/UploadWrapper.js +3 -0
- package/es/LmUpload/wrapper/reducer.d.ts +4 -0
- package/es/LmUpload/wrapper/reducer.js +12 -3
- package/es/styles/variables.css +121 -0
- package/lib/Form/FormItem/index.d.ts +7 -1
- package/lib/Form/FormItem/index.js +58 -14
- package/lib/ImageViewer/components/Operate.js +6 -2
- package/lib/LmEditTable/EditTable.js +24 -21
- package/lib/LmEditTable/util.js +4 -4
- package/lib/LmTable/Table.js +16 -10
- package/lib/LmTable/style/index.css +3 -0
- package/lib/LmTable/style/variables.css +3 -0
- package/lib/LmTable/util.js +9 -5
- package/lib/LmUpload/LmUpload.js +1 -0
- package/lib/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
- package/lib/LmUpload/UploadList/ItemPictureCard.js +16 -4
- package/lib/LmUpload/UploadList/index.js +13 -7
- package/lib/LmUpload/components/Preview.d.ts +5 -0
- package/lib/LmUpload/components/Preview.js +55 -0
- package/lib/LmUpload/style/index.css +118 -0
- package/lib/LmUpload/style/variables.css +118 -0
- package/lib/LmUpload/wrapper/UploadWrapper.js +4 -0
- package/lib/LmUpload/wrapper/reducer.d.ts +4 -0
- package/lib/LmUpload/wrapper/reducer.js +12 -3
- package/lib/styles/variables.css +121 -0
- package/package.json +10 -3
|
@@ -63,8 +63,10 @@ var renderThumb = function renderThumb(file) {
|
|
|
63
63
|
|
|
64
64
|
var PictureItem = function PictureItem(_ref) {
|
|
65
65
|
var file = _ref.file,
|
|
66
|
+
index = _ref.index,
|
|
66
67
|
instance = _ref.instance;
|
|
67
|
-
var
|
|
68
|
+
var dispatch = instance.dispatch,
|
|
69
|
+
readOnly = instance.readOnly,
|
|
68
70
|
size = instance.size,
|
|
69
71
|
remove = instance.remove,
|
|
70
72
|
preview = instance.preview,
|
|
@@ -107,6 +109,18 @@ var PictureItem = function PictureItem(_ref) {
|
|
|
107
109
|
fontSize: fontSize
|
|
108
110
|
};
|
|
109
111
|
}, [size]);
|
|
112
|
+
|
|
113
|
+
var handlePreview = function handlePreview() {
|
|
114
|
+
preview === null || preview === void 0 ? void 0 : preview(file);
|
|
115
|
+
dispatch({
|
|
116
|
+
type: 'changePreview',
|
|
117
|
+
preview: {
|
|
118
|
+
visible: true,
|
|
119
|
+
index: index
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
|
|
110
124
|
return /*#__PURE__*/React.createElement("div", {
|
|
111
125
|
className: cn('lm_upload_item', 'lm_upload_item_card', isError && 'lm_upload_item_error'),
|
|
112
126
|
style: {
|
|
@@ -128,9 +142,7 @@ var PictureItem = function PictureItem(_ref) {
|
|
|
128
142
|
className: "lm_upload_item_action"
|
|
129
143
|
}, /*#__PURE__*/React.createElement("div", {
|
|
130
144
|
className: "action_preview",
|
|
131
|
-
onClick:
|
|
132
|
-
return preview(file);
|
|
133
|
-
}
|
|
145
|
+
onClick: handlePreview
|
|
134
146
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
135
147
|
type: "lmweb-eye",
|
|
136
148
|
style: {
|
|
@@ -1,25 +1,29 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
import { render } from '../utils';
|
|
3
3
|
import RenderItem from './RenderItem';
|
|
4
4
|
|
|
5
5
|
var LmUploadList = function LmUploadList(_ref) {
|
|
6
6
|
var instance = _ref.instance;
|
|
7
|
-
|
|
8
|
-
var _a, _b;
|
|
9
|
-
|
|
10
7
|
var getFileHasValue = instance.getFileHasValue,
|
|
11
8
|
getFileList = instance.getFileList,
|
|
12
9
|
itemRender = instance.itemRender,
|
|
13
10
|
listType = instance.listType,
|
|
14
11
|
showUploadList = instance.showUploadList;
|
|
15
12
|
if (!showUploadList) return null;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
var fileList = useMemo(function () {
|
|
14
|
+
var _a;
|
|
15
|
+
|
|
16
|
+
return (_a = getFileList()) === null || _a === void 0 ? void 0 : _a.sort(function (a, b) {
|
|
17
|
+
return a.seq - b.seq;
|
|
18
|
+
});
|
|
19
|
+
}, [getFileList]);
|
|
20
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, fileList === null || fileList === void 0 ? void 0 : fileList.map(function (file, idx) {
|
|
19
21
|
return render(itemRender || RenderItem, {
|
|
20
22
|
type: listType,
|
|
21
23
|
key: getFileHasValue(file) || idx,
|
|
24
|
+
index: idx,
|
|
22
25
|
file: file,
|
|
26
|
+
fileList: fileList,
|
|
23
27
|
instance: instance
|
|
24
28
|
});
|
|
25
29
|
}));
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { ImageViewer } from 'linkmore-design';
|
|
3
|
+
|
|
4
|
+
var Preview = function Preview(_ref) {
|
|
5
|
+
var instance = _ref.instance;
|
|
6
|
+
var enabledPreview = instance.enabledPreview,
|
|
7
|
+
state = instance.state,
|
|
8
|
+
dispatch = instance.dispatch,
|
|
9
|
+
getFileList = instance.getFileList;
|
|
10
|
+
if (!enabledPreview) return null; // 与展示顺序保持一致
|
|
11
|
+
|
|
12
|
+
var fileList = useMemo(function () {
|
|
13
|
+
var _a;
|
|
14
|
+
|
|
15
|
+
return (_a = getFileList()) === null || _a === void 0 ? void 0 : _a.sort(function (a, b) {
|
|
16
|
+
return a.seq - b.seq;
|
|
17
|
+
});
|
|
18
|
+
}, [getFileList]);
|
|
19
|
+
var config = useMemo(function () {
|
|
20
|
+
var _state$preview = state.preview,
|
|
21
|
+
index = _state$preview.index,
|
|
22
|
+
visible = _state$preview.visible;
|
|
23
|
+
return {
|
|
24
|
+
urlList: fileList === null || fileList === void 0 ? void 0 : fileList.map(function (_ref2) {
|
|
25
|
+
var url = _ref2.url;
|
|
26
|
+
return url;
|
|
27
|
+
}),
|
|
28
|
+
initialIndex: index,
|
|
29
|
+
visible: visible,
|
|
30
|
+
close: function close() {
|
|
31
|
+
dispatch({
|
|
32
|
+
type: 'changePreview',
|
|
33
|
+
preview: {
|
|
34
|
+
visible: false
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}, [fileList, state.preview]);
|
|
40
|
+
return /*#__PURE__*/React.createElement(ImageViewer, Object.assign({}, config));
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export default /*#__PURE__*/React.memo(Preview);
|
|
@@ -1,3 +1,121 @@
|
|
|
1
|
+
.lm_image_viewer_wrapper {
|
|
2
|
+
position: fixed;
|
|
3
|
+
z-index: 1001;
|
|
4
|
+
inset: 0;
|
|
5
|
+
}
|
|
6
|
+
.lm_image_viewer_wrapper .lm_image_viewer_mask {
|
|
7
|
+
position: absolute;
|
|
8
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
9
|
+
inset: 0;
|
|
10
|
+
}
|
|
11
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container {
|
|
12
|
+
position: relative;
|
|
13
|
+
z-index: 2;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-flow: column;
|
|
16
|
+
gap: var(--gap);
|
|
17
|
+
align-items: center;
|
|
18
|
+
height: 100vh;
|
|
19
|
+
padding: 50px 0;
|
|
20
|
+
}
|
|
21
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .preview_list {
|
|
22
|
+
flex: 1;
|
|
23
|
+
width: 51%;
|
|
24
|
+
max-height: 100%;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
touch-action: none;
|
|
27
|
+
}
|
|
28
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .preview_list div {
|
|
29
|
+
height: 100%;
|
|
30
|
+
}
|
|
31
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .preview_list .preview_item {
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
text-align: center;
|
|
34
|
+
border-radius: 2px;
|
|
35
|
+
}
|
|
36
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .preview_list .preview_item img {
|
|
37
|
+
display: inline-block;
|
|
38
|
+
width: 100%;
|
|
39
|
+
height: 100%;
|
|
40
|
+
object-fit: contain;
|
|
41
|
+
transition: 0.3s;
|
|
42
|
+
}
|
|
43
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .thumb_list {
|
|
44
|
+
display: flex;
|
|
45
|
+
gap: var(--gap);
|
|
46
|
+
width: 51%;
|
|
47
|
+
overflow-x: auto;
|
|
48
|
+
overflow-y: hidden;
|
|
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;
|
|
56
|
+
text-align: center;
|
|
57
|
+
background-color: var(--color-contrast);
|
|
58
|
+
border: 2px solid transparent;
|
|
59
|
+
border-radius: 2px;
|
|
60
|
+
transition: 0.3s;
|
|
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
|
+
}
|
|
66
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .thumb_list .thumb_item img {
|
|
67
|
+
display: inline-block;
|
|
68
|
+
width: 94px;
|
|
69
|
+
height: 94px;
|
|
70
|
+
object-fit: cover;
|
|
71
|
+
}
|
|
72
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .thumb_list .thumb_item.active {
|
|
73
|
+
border-color: var(--primary-color);
|
|
74
|
+
}
|
|
75
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .image_viewer_action {
|
|
76
|
+
position: absolute;
|
|
77
|
+
bottom: 50px;
|
|
78
|
+
left: 50%;
|
|
79
|
+
display: flex;
|
|
80
|
+
gap: 24px;
|
|
81
|
+
align-items: center;
|
|
82
|
+
justify-content: space-between;
|
|
83
|
+
padding: 8px 12px;
|
|
84
|
+
font-size: 24px;
|
|
85
|
+
background-color: #fff;
|
|
86
|
+
border-radius: 100px;
|
|
87
|
+
transform: translateX(-50%);
|
|
88
|
+
}
|
|
89
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .image_viewer_action .anticon {
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
transition: 0.3s;
|
|
92
|
+
}
|
|
93
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .image_viewer_action .anticon:hover {
|
|
94
|
+
color: var(--primary-color);
|
|
95
|
+
}
|
|
96
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .arrow {
|
|
97
|
+
position: absolute;
|
|
98
|
+
top: 50%;
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
justify-content: center;
|
|
102
|
+
height: 48px;
|
|
103
|
+
color: var(--color-contrast);
|
|
104
|
+
font-size: 32px;
|
|
105
|
+
background-color: var(--text-color);
|
|
106
|
+
transform: translateY(-50%);
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
transition: 0.3s;
|
|
109
|
+
}
|
|
110
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .arrow.arrow_left {
|
|
111
|
+
left: 40px;
|
|
112
|
+
}
|
|
113
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .arrow.arrow_right {
|
|
114
|
+
right: 40px;
|
|
115
|
+
}
|
|
116
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .arrow:hover {
|
|
117
|
+
color: var(--primary-color);
|
|
118
|
+
}
|
|
1
119
|
.lm_upload_wrapper {
|
|
2
120
|
display: flex;
|
|
3
121
|
flex-wrap: wrap;
|
|
@@ -1,3 +1,121 @@
|
|
|
1
|
+
.lm_image_viewer_wrapper {
|
|
2
|
+
position: fixed;
|
|
3
|
+
z-index: 1001;
|
|
4
|
+
inset: 0;
|
|
5
|
+
}
|
|
6
|
+
.lm_image_viewer_wrapper .lm_image_viewer_mask {
|
|
7
|
+
position: absolute;
|
|
8
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
9
|
+
inset: 0;
|
|
10
|
+
}
|
|
11
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container {
|
|
12
|
+
position: relative;
|
|
13
|
+
z-index: 2;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-flow: column;
|
|
16
|
+
gap: var(--gap);
|
|
17
|
+
align-items: center;
|
|
18
|
+
height: 100vh;
|
|
19
|
+
padding: 50px 0;
|
|
20
|
+
}
|
|
21
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .preview_list {
|
|
22
|
+
flex: 1;
|
|
23
|
+
width: 51%;
|
|
24
|
+
max-height: 100%;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
touch-action: none;
|
|
27
|
+
}
|
|
28
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .preview_list div {
|
|
29
|
+
height: 100%;
|
|
30
|
+
}
|
|
31
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .preview_list .preview_item {
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
text-align: center;
|
|
34
|
+
border-radius: 2px;
|
|
35
|
+
}
|
|
36
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .preview_list .preview_item img {
|
|
37
|
+
display: inline-block;
|
|
38
|
+
width: 100%;
|
|
39
|
+
height: 100%;
|
|
40
|
+
object-fit: contain;
|
|
41
|
+
transition: 0.3s;
|
|
42
|
+
}
|
|
43
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .thumb_list {
|
|
44
|
+
display: flex;
|
|
45
|
+
gap: var(--gap);
|
|
46
|
+
width: 51%;
|
|
47
|
+
overflow-x: auto;
|
|
48
|
+
overflow-y: hidden;
|
|
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;
|
|
56
|
+
text-align: center;
|
|
57
|
+
background-color: var(--color-contrast);
|
|
58
|
+
border: 2px solid transparent;
|
|
59
|
+
border-radius: 2px;
|
|
60
|
+
transition: 0.3s;
|
|
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
|
+
}
|
|
66
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .thumb_list .thumb_item img {
|
|
67
|
+
display: inline-block;
|
|
68
|
+
width: 94px;
|
|
69
|
+
height: 94px;
|
|
70
|
+
object-fit: cover;
|
|
71
|
+
}
|
|
72
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .thumb_list .thumb_item.active {
|
|
73
|
+
border-color: var(--primary-color);
|
|
74
|
+
}
|
|
75
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .image_viewer_action {
|
|
76
|
+
position: absolute;
|
|
77
|
+
bottom: 50px;
|
|
78
|
+
left: 50%;
|
|
79
|
+
display: flex;
|
|
80
|
+
gap: 24px;
|
|
81
|
+
align-items: center;
|
|
82
|
+
justify-content: space-between;
|
|
83
|
+
padding: 8px 12px;
|
|
84
|
+
font-size: 24px;
|
|
85
|
+
background-color: #fff;
|
|
86
|
+
border-radius: 100px;
|
|
87
|
+
transform: translateX(-50%);
|
|
88
|
+
}
|
|
89
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .image_viewer_action .anticon {
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
transition: 0.3s;
|
|
92
|
+
}
|
|
93
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .image_viewer_action .anticon:hover {
|
|
94
|
+
color: var(--primary-color);
|
|
95
|
+
}
|
|
96
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .arrow {
|
|
97
|
+
position: absolute;
|
|
98
|
+
top: 50%;
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
justify-content: center;
|
|
102
|
+
height: 48px;
|
|
103
|
+
color: var(--color-contrast);
|
|
104
|
+
font-size: 32px;
|
|
105
|
+
background-color: var(--text-color);
|
|
106
|
+
transform: translateY(-50%);
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
transition: 0.3s;
|
|
109
|
+
}
|
|
110
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .arrow.arrow_left {
|
|
111
|
+
left: 40px;
|
|
112
|
+
}
|
|
113
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .arrow.arrow_right {
|
|
114
|
+
right: 40px;
|
|
115
|
+
}
|
|
116
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .arrow:hover {
|
|
117
|
+
color: var(--primary-color);
|
|
118
|
+
}
|
|
1
119
|
.lm_upload_wrapper {
|
|
2
120
|
display: flex;
|
|
3
121
|
flex-wrap: wrap;
|
|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import LmUploadContainer from './UploadContainer';
|
|
4
4
|
import LmUploadView from '../view';
|
|
5
5
|
import Crop from '../components/Crop';
|
|
6
|
+
import Preview from '../components/Preview';
|
|
6
7
|
|
|
7
8
|
var LmUploadWrapper = function LmUploadWrapper(_ref) {
|
|
8
9
|
var instance = _ref.instance;
|
|
@@ -14,6 +15,8 @@ var LmUploadWrapper = function LmUploadWrapper(_ref) {
|
|
|
14
15
|
instance: instance
|
|
15
16
|
}), /*#__PURE__*/React.createElement(Crop, {
|
|
16
17
|
instance: instance
|
|
18
|
+
}), /*#__PURE__*/React.createElement(Preview, {
|
|
19
|
+
instance: instance
|
|
17
20
|
}));
|
|
18
21
|
};
|
|
19
22
|
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
export var reducer = function reducer(state, action) {
|
|
3
3
|
var fileList = action.fileList,
|
|
4
4
|
percent = action.percent,
|
|
5
|
-
cropFile = action.cropFile
|
|
5
|
+
cropFile = action.cropFile,
|
|
6
|
+
preview = action.preview;
|
|
6
7
|
|
|
7
8
|
switch (action.type) {
|
|
8
9
|
case 'changeFileList':
|
|
@@ -20,6 +21,11 @@ export var reducer = function reducer(state, action) {
|
|
|
20
21
|
cropFile: cropFile
|
|
21
22
|
});
|
|
22
23
|
|
|
24
|
+
case 'changePreview':
|
|
25
|
+
return Object.assign(Object.assign({}, state), {
|
|
26
|
+
preview: Object.assign(Object.assign({}, state.preview), preview)
|
|
27
|
+
});
|
|
28
|
+
|
|
23
29
|
default:
|
|
24
30
|
throw new Error();
|
|
25
31
|
}
|
|
@@ -33,8 +39,11 @@ export var initialState = function initialState(props) {
|
|
|
33
39
|
process: 0,
|
|
34
40
|
status: 'done',
|
|
35
41
|
fileList: defaultFileList,
|
|
36
|
-
cropFile: null
|
|
37
|
-
|
|
42
|
+
cropFile: null,
|
|
43
|
+
preview: {
|
|
44
|
+
index: 0,
|
|
45
|
+
visible: false
|
|
46
|
+
}
|
|
38
47
|
};
|
|
39
48
|
};
|
|
40
49
|
export default reducer;
|
package/es/styles/variables.css
CHANGED
|
@@ -11266,6 +11266,9 @@ p {
|
|
|
11266
11266
|
height: 48px;
|
|
11267
11267
|
font-size: 12px;
|
|
11268
11268
|
}
|
|
11269
|
+
#lm_protable_warp .ant-table-tbody > tr > .ant-table-selection-column {
|
|
11270
|
+
text-align: left;
|
|
11271
|
+
}
|
|
11269
11272
|
#lm_protable_warp .ant-table-tbody > tr.ant-table-measure-row > td {
|
|
11270
11273
|
padding: 0 !important;
|
|
11271
11274
|
}
|
|
@@ -11647,6 +11650,124 @@ button.ant-table-row-expand-icon::after {
|
|
|
11647
11650
|
.WeChatContactsAvatarTools .rightClickItems:last-child {
|
|
11648
11651
|
border-bottom: 0;
|
|
11649
11652
|
}
|
|
11653
|
+
.lm_image_viewer_wrapper {
|
|
11654
|
+
position: fixed;
|
|
11655
|
+
z-index: 1001;
|
|
11656
|
+
inset: 0;
|
|
11657
|
+
}
|
|
11658
|
+
.lm_image_viewer_wrapper .lm_image_viewer_mask {
|
|
11659
|
+
position: absolute;
|
|
11660
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
11661
|
+
inset: 0;
|
|
11662
|
+
}
|
|
11663
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container {
|
|
11664
|
+
position: relative;
|
|
11665
|
+
z-index: 2;
|
|
11666
|
+
display: flex;
|
|
11667
|
+
flex-flow: column;
|
|
11668
|
+
gap: var(--gap);
|
|
11669
|
+
align-items: center;
|
|
11670
|
+
height: 100vh;
|
|
11671
|
+
padding: 50px 0;
|
|
11672
|
+
}
|
|
11673
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .preview_list {
|
|
11674
|
+
flex: 1;
|
|
11675
|
+
width: 51%;
|
|
11676
|
+
max-height: 100%;
|
|
11677
|
+
overflow: hidden;
|
|
11678
|
+
touch-action: none;
|
|
11679
|
+
}
|
|
11680
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .preview_list div {
|
|
11681
|
+
height: 100%;
|
|
11682
|
+
}
|
|
11683
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .preview_list .preview_item {
|
|
11684
|
+
overflow: hidden;
|
|
11685
|
+
text-align: center;
|
|
11686
|
+
border-radius: 2px;
|
|
11687
|
+
}
|
|
11688
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .preview_list .preview_item img {
|
|
11689
|
+
display: inline-block;
|
|
11690
|
+
width: 100%;
|
|
11691
|
+
height: 100%;
|
|
11692
|
+
object-fit: contain;
|
|
11693
|
+
transition: 0.3s;
|
|
11694
|
+
}
|
|
11695
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .thumb_list {
|
|
11696
|
+
display: flex;
|
|
11697
|
+
gap: var(--gap);
|
|
11698
|
+
width: 51%;
|
|
11699
|
+
overflow-x: auto;
|
|
11700
|
+
overflow-y: hidden;
|
|
11701
|
+
}
|
|
11702
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .thumb_list .thumb_item {
|
|
11703
|
+
display: inline-flex;
|
|
11704
|
+
align-items: center;
|
|
11705
|
+
justify-content: center;
|
|
11706
|
+
width: 98px;
|
|
11707
|
+
height: 98px;
|
|
11708
|
+
text-align: center;
|
|
11709
|
+
background-color: var(--color-contrast);
|
|
11710
|
+
border: 2px solid transparent;
|
|
11711
|
+
border-radius: 2px;
|
|
11712
|
+
transition: 0.3s;
|
|
11713
|
+
}
|
|
11714
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .thumb_list .thumb_item .thumb_item_icon {
|
|
11715
|
+
color: var(--color-45);
|
|
11716
|
+
font-size: 34px;
|
|
11717
|
+
}
|
|
11718
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .thumb_list .thumb_item img {
|
|
11719
|
+
display: inline-block;
|
|
11720
|
+
width: 94px;
|
|
11721
|
+
height: 94px;
|
|
11722
|
+
object-fit: cover;
|
|
11723
|
+
}
|
|
11724
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .thumb_list .thumb_item.active {
|
|
11725
|
+
border-color: var(--primary-color);
|
|
11726
|
+
}
|
|
11727
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .image_viewer_action {
|
|
11728
|
+
position: absolute;
|
|
11729
|
+
bottom: 50px;
|
|
11730
|
+
left: 50%;
|
|
11731
|
+
display: flex;
|
|
11732
|
+
gap: 24px;
|
|
11733
|
+
align-items: center;
|
|
11734
|
+
justify-content: space-between;
|
|
11735
|
+
padding: 8px 12px;
|
|
11736
|
+
font-size: 24px;
|
|
11737
|
+
background-color: #fff;
|
|
11738
|
+
border-radius: 100px;
|
|
11739
|
+
transform: translateX(-50%);
|
|
11740
|
+
}
|
|
11741
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .image_viewer_action .anticon {
|
|
11742
|
+
cursor: pointer;
|
|
11743
|
+
transition: 0.3s;
|
|
11744
|
+
}
|
|
11745
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .image_viewer_action .anticon:hover {
|
|
11746
|
+
color: var(--primary-color);
|
|
11747
|
+
}
|
|
11748
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .arrow {
|
|
11749
|
+
position: absolute;
|
|
11750
|
+
top: 50%;
|
|
11751
|
+
display: flex;
|
|
11752
|
+
align-items: center;
|
|
11753
|
+
justify-content: center;
|
|
11754
|
+
height: 48px;
|
|
11755
|
+
color: var(--color-contrast);
|
|
11756
|
+
font-size: 32px;
|
|
11757
|
+
background-color: var(--text-color);
|
|
11758
|
+
transform: translateY(-50%);
|
|
11759
|
+
cursor: pointer;
|
|
11760
|
+
transition: 0.3s;
|
|
11761
|
+
}
|
|
11762
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .arrow.arrow_left {
|
|
11763
|
+
left: 40px;
|
|
11764
|
+
}
|
|
11765
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .arrow.arrow_right {
|
|
11766
|
+
right: 40px;
|
|
11767
|
+
}
|
|
11768
|
+
.lm_image_viewer_wrapper .lm_image_viewer_container .arrow:hover {
|
|
11769
|
+
color: var(--primary-color);
|
|
11770
|
+
}
|
|
11650
11771
|
.lm_upload_wrapper {
|
|
11651
11772
|
display: flex;
|
|
11652
11773
|
flex-wrap: wrap;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { FormInstance } from 'rc-field-form';
|
|
2
2
|
import type { FieldProps } from 'rc-field-form/lib/Field';
|
|
3
|
+
import type { Rule } from 'rc-field-form/lib/interface';
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
import useFormItemStatus from '../hooks/useFormItemStatus';
|
|
5
6
|
import type { FormItemInputProps } from '../FormItemInput';
|
|
@@ -9,7 +10,10 @@ export declare type ValidateStatus = typeof ValidateStatuses[number];
|
|
|
9
10
|
declare type RenderChildren<Values = any> = (form: FormInstance<Values>) => React.ReactNode;
|
|
10
11
|
declare type RcFieldProps<Values = any> = Omit<FieldProps<Values>, 'children'>;
|
|
11
12
|
declare type ChildrenType<Values = any> = RenderChildren<Values> | React.ReactNode;
|
|
12
|
-
export
|
|
13
|
+
export declare type LmRule = Rule & {
|
|
14
|
+
time?: number;
|
|
15
|
+
};
|
|
16
|
+
export interface FormItemProps<Values = any> extends FormItemLabelProps, FormItemInputProps, Omit<RcFieldProps<Values>, 'rules'> {
|
|
13
17
|
prefixCls?: string;
|
|
14
18
|
noStyle?: boolean;
|
|
15
19
|
style?: React.CSSProperties;
|
|
@@ -25,6 +29,8 @@ export interface FormItemProps<Values = any> extends FormItemLabelProps, FormIte
|
|
|
25
29
|
tooltip?: LabelTooltipType;
|
|
26
30
|
/** @deprecated No need anymore */
|
|
27
31
|
fieldKey?: React.Key | React.Key[];
|
|
32
|
+
/** 变更 */
|
|
33
|
+
rules?: LmRule[];
|
|
28
34
|
errorPlacement?: string;
|
|
29
35
|
responsive?: boolean;
|
|
30
36
|
}
|