@zat-design/sisyphus-react 4.2.0-beta.3 → 4.2.0-beta.5

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.
Files changed (77) hide show
  1. package/README.md +16 -5
  2. package/dist/index.esm.css +1 -1
  3. package/dist/less.esm.css +1 -1
  4. package/es/ProAction/index.less +0 -1
  5. package/es/ProDownload/style/index.less +0 -1
  6. package/es/ProDrawerForm/style/index.less +2 -1
  7. package/es/ProEditLabel/style/index.less +0 -1
  8. package/es/ProEditTable/components/Summary/index.d.ts +1 -1
  9. package/es/ProEditTable/style/index.less +150 -114
  10. package/es/ProEditTable/utils/config.d.ts +2 -2
  11. package/es/ProEditTable/utils/tools.d.ts +1 -1
  12. package/es/ProEditTable/utils/useEditTableError.d.ts +1 -1
  13. package/es/ProEnum/hooks/useEnum.js +22 -71
  14. package/es/ProEnum/hooks/useEnumRequest.js +9 -10
  15. package/es/ProEnum/hooks/useFrequentEnumRequest.js +2 -1
  16. package/es/ProEnum/index.d.ts +2 -0
  17. package/es/ProEnum/index.js +4 -2
  18. package/es/ProEnum/style/index.less +0 -1
  19. package/es/ProEnum/utils/frequentEnum.d.ts +1 -2
  20. package/es/ProEnum/utils/frequentEnum.js +2 -2
  21. package/es/ProEnum/utils/getEnum.d.ts +47 -0
  22. package/es/ProEnum/utils/getEnum.js +151 -0
  23. package/es/ProEnum/utils/index.d.ts +13 -3
  24. package/es/ProEnum/utils/index.js +44 -10
  25. package/es/ProForm/components/base/SwitchCheckbox/style/index.less +4 -5
  26. package/es/ProForm/components/base/TimePicker/style/index.less +0 -1
  27. package/es/ProForm/components/combination/Container/style/index.less +18 -19
  28. package/es/ProForm/components/combination/FormList/style/index.less +4 -4
  29. package/es/ProForm/components/combination/Group/style/index.less +43 -50
  30. package/es/ProForm/components/combination/Group/utils/index.d.ts +20 -20
  31. package/es/ProForm/components/combination/ProModalSelect/style/index.less +20 -16
  32. package/es/ProForm/components/combination/ProNumberRange/style/index.less +3 -3
  33. package/es/ProForm/components/combination/ProTimeLimit/style/index.less +1 -1
  34. package/es/ProForm/style/index.less +39 -44
  35. package/es/ProLayout/components/Layout/Header/style/index.less +224 -222
  36. package/es/ProLayout/components/Layout/Icon/style/index.less +1 -1
  37. package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +4 -1
  38. package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +9 -7
  39. package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +3 -5
  40. package/es/ProLayout/components/Layout/Menu/style/index.less +9 -5
  41. package/es/ProLayout/components/Layout/index.less +4 -4
  42. package/es/ProLayout/components/ProCollapse/PropTypes.d.ts +45 -45
  43. package/es/ProLayout/components/ProCollapse/style/index.less +30 -32
  44. package/es/ProLayout/components/ProFooter/style/index.less +0 -1
  45. package/es/ProLayout/components/ProHeader/PropTypes.d.ts +31 -31
  46. package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +7 -7
  47. package/es/ProLayout/components/ProHeader/style/index.less +8 -9
  48. package/es/ProLayout/components/TabsManager/style/index.less +9 -11
  49. package/es/ProLayout/style/index.less +197 -201
  50. package/es/ProLayout/utils/index.d.ts +1 -1
  51. package/es/ProSelect/style/index.less +0 -1
  52. package/es/ProSelect/utils/index.d.ts +1 -1
  53. package/es/ProStep/components/Item/index.js +1 -1
  54. package/es/ProStep/components/LazyLoad/index.d.ts +19 -0
  55. package/es/ProStep/components/LazyLoad/index.js +55 -0
  56. package/es/ProStep/components/Listener/index.js +1 -1
  57. package/es/ProStep/index.d.ts +1 -1
  58. package/es/ProStep/propsType.d.ts +1 -1
  59. package/es/ProStep/style/index.less +7 -9
  60. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.d.ts +1 -1
  61. package/es/ProTable/propsType.d.ts +1 -1
  62. package/es/ProTable/style/index.less +24 -22
  63. package/es/ProTooltip/style/index.less +0 -1
  64. package/es/ProTree/components/ProTreeSelect/style/index.less +102 -99
  65. package/es/ProTree/style/index.less +108 -109
  66. package/es/ProTreeModal/style/index.less +10 -9
  67. package/es/ProUpload/style/index.less +20 -22
  68. package/es/global.less +1 -1
  69. package/es/index.d.ts +2 -2
  70. package/es/style/core/normalize.less +11 -2
  71. package/es/style/index.less +2 -2
  72. package/es/style/less.less +2 -2
  73. package/es/style/theme/antd.less +19 -23
  74. package/es/style/theme/base.less +81 -81
  75. package/es/style/theme/tokens.less +13 -14
  76. package/es/style/variables.less +1 -1
  77. package/package.json +37 -20
@@ -1,4 +1,3 @@
1
-
2
1
  @import '../../style/variables.less';
3
2
  @import '../components/Layout/index.less';
4
3
  @import '../components/ProCollapse/style/index.less';
@@ -10,7 +9,7 @@
10
9
  display: flex;
11
10
  flex-direction: column;
12
11
  min-height: 100vh;
13
- background: #F7F9FD;
12
+ background: #f7f9fd;
14
13
  position: relative;
15
14
 
16
15
  // 背景图层:固定在顶部,延伸到可视区域下方,z-index低于header和content让内容显示在背景之上
@@ -39,257 +38,254 @@
39
38
 
40
39
  // pro-collapse折叠调整
41
40
  .pro-collapse {
42
- border-radius: var(--zaui-border-radius, 8px);
43
- &.@{ant-prefix}-collapse-borderless{
44
- background: #fff;
41
+ border-radius: var(--zaui-border-radius, 8px);
42
+ &.@{ant-prefix}-collapse-borderless {
43
+ background: #fff;
44
+ }
45
+ &.pro-collapse-no-title {
46
+ .pro-collapse-content {
47
+ border-radius: var(--zaui-border-radius, 8px) !important;
48
+ padding: var(--zaui-space-size-md, 16px);
45
49
  }
46
- &.pro-collapse-no-title{
47
- .pro-collapse-content{
48
- border-radius: var(--zaui-border-radius, 8px) !important;
49
- padding: var(--zaui-space-size-md, 16px);
50
- }
51
- .pro-header-no-describe{
52
- padding: 0 !important;
53
- }
50
+ .pro-header-no-describe {
51
+ padding: 0 !important;
54
52
  }
55
- .@{ant-prefix}-collapse-item-active{
56
- &.pro-collapse-panel{
57
- & > .@{ant-prefix}-collapse-header{
58
- border-radius: var(--zaui-border-radius, 8px) var(--zaui-border-radius, 8px) 0 0 !important;
59
- }
53
+ }
54
+ .@{ant-prefix}-collapse-item-active {
55
+ &.pro-collapse-panel {
56
+ & > .@{ant-prefix}-collapse-header {
57
+ border-radius: var(--zaui-border-radius, 8px) var(--zaui-border-radius, 8px) 0 0 !important;
60
58
  }
61
59
  }
62
-
63
- .pro-collapse-content{
64
- border-radius: 0 0 var(--zaui-border-radius, 8px) var(--zaui-border-radius, 8px);
65
- padding: var(--zaui-space-size-md, 16px);
66
-
67
- .pro-form{
68
- margin-bottom: 0;
69
- }
60
+ }
61
+
62
+ .pro-collapse-content {
63
+ border-radius: 0 0 var(--zaui-border-radius, 8px) var(--zaui-border-radius, 8px);
64
+ padding: var(--zaui-space-size-md, 16px);
65
+
66
+ .pro-form {
67
+ margin-bottom: 0;
70
68
  }
71
- &.pro-collapse-level2{
72
- .pro-collapse-panel .@{ant-prefix}-collapse-header{
73
- background: #fff;
74
- }
75
- .pro-collapse-content{
76
- padding-bottom: var(--zaui-space-size-sm, 8px);
77
- }
69
+ }
70
+ &.pro-collapse-level2 {
71
+ .pro-collapse-panel .@{ant-prefix}-collapse-header {
72
+ background: #fff;
78
73
  }
79
-
80
- .pro-collapse-panel{
81
- .@{ant-prefix}-collapse-header{
82
- border-radius: var(--zaui-border-radius, 8px) !important;
83
- background: #E4F2FE;
84
- }
85
- .pro-collapse-level2-collapse{
86
- .@{ant-prefix}-collapse-header{
87
- border-radius: 0 !important;
88
- }
89
- }
90
-
74
+ .pro-collapse-content {
75
+ padding-bottom: var(--zaui-space-size-sm, 8px);
91
76
  }
92
77
  }
93
78
 
94
- // pro-header调整
95
- .pro-header{
96
- &.pro-header-no-describe{
97
- padding: 10px var(--zaui-space-size-md, 16px) !important;
98
- .pro-header-top{
99
- padding-bottom: 0;
100
- }
79
+ .pro-collapse-panel {
80
+ .@{ant-prefix}-collapse-header {
81
+ border-radius: var(--zaui-border-radius, 8px) !important;
82
+ background: #e4f2fe;
101
83
  }
102
- &.pro-header-has-describe{
103
- .pro-header-nav-open{
104
- border-radius: 0 0 var(--zaui-border-radius, 8px) var(--zaui-border-radius, 8px);
84
+ .pro-collapse-level2-collapse {
85
+ .@{ant-prefix}-collapse-header {
86
+ border-radius: 0 !important;
105
87
  }
106
88
  }
107
- border-radius: 0 0 var(--zaui-border-radius, 8px) var(--zaui-border-radius, 8px);
108
89
  }
90
+ }
109
91
 
110
-
111
- .pro-layout-menu-open,
112
- .pro-layout-menu {
113
- box-shadow: none;
92
+ // pro-header调整
93
+ .pro-header {
94
+ &.pro-header-no-describe {
95
+ padding: 10px var(--zaui-space-size-md, 16px) !important;
96
+ .pro-header-top {
97
+ padding-bottom: 0;
98
+ }
114
99
  }
115
-
116
- .pro-layout-open-menu .@{ant-prefix}-menu-title-content div .pro-layout-icon {
117
- position: relative;
118
- z-index: 1;
119
- color: var(--zaui-text, #343434);
100
+ &.pro-header-has-describe {
101
+ .pro-header-nav-open {
102
+ border-radius: 0 0 var(--zaui-border-radius, 8px) var(--zaui-border-radius, 8px);
103
+ }
120
104
  }
121
- .pro-layout-menu-fold {
122
- background: #F7F9FD;
105
+ border-radius: 0 0 var(--zaui-border-radius, 8px) var(--zaui-border-radius, 8px);
106
+ }
107
+
108
+ .pro-layout-menu-open,
109
+ .pro-layout-menu {
110
+ box-shadow: none;
111
+ }
112
+
113
+ .pro-layout-open-menu .@{ant-prefix}-menu-title-content div .pro-layout-icon {
114
+ position: relative;
115
+ z-index: 1;
116
+ color: var(--zaui-text, #343434);
117
+ }
118
+ .pro-layout-menu-fold {
119
+ background: #f7f9fd;
123
120
 
124
- .pro-layout-menu-fold-list {
125
- background: #F7F9FD;
126
- border-right: none;
127
- li {
121
+ .pro-layout-menu-fold-list {
122
+ background: #f7f9fd;
123
+ border-right: none;
124
+ li {
125
+ position: relative;
126
+ background: #f7f9fd;
127
+
128
+ & > div {
128
129
  position: relative;
129
- background: #F7F9FD;
130
+ z-index: 1;
131
+ }
132
+
133
+ &.active {
134
+ background: transparent;
135
+ border-radius: var(--zaui-border-radius, 8px);
130
136
 
131
- & > div {
132
- position: relative;
133
- z-index: 1;
137
+ div .pro-layout-icon {
138
+ color: #fff;
134
139
  }
135
140
 
136
- &.active {
137
- background: transparent;
141
+ &::before {
142
+ position: absolute;
143
+ top: 4px;
144
+ left: 5px;
145
+ width: calc(100% - 10px);
146
+ height: 38px;
147
+ background-color: var(--zaui-brand, #006aff);
138
148
  border-radius: var(--zaui-border-radius, 8px);
139
-
140
- div .pro-layout-icon {
141
- color: #fff;
142
- }
143
-
144
- &::before {
145
- position: absolute;
146
- top: 4px;
147
- left: 5px;
148
- width: calc(100% - 10px);
149
- height: 38px;
150
- background-color: var(--zaui-brand, #006aff);
151
- border-radius: var(--zaui-border-radius, 8px);
152
- opacity: 1 !important;
153
- content: '';
154
- }
149
+ opacity: 1 !important;
150
+ content: '';
155
151
  }
152
+ }
156
153
 
157
- &:hover {
158
- background: transparent;
159
-
160
- &::before {
161
- position: absolute;
162
- top: 4px;
163
- left: 5px;
164
- width: calc(100% - 10px);
165
- height: 38px;
166
- background-color: var(--zaui-brand, #006aff);
167
- border-radius: var(--zaui-border-radius, 8px);
168
- opacity: 0.08;
169
- content: '';
170
- }
171
- }
154
+ &:hover {
155
+ background: transparent;
172
156
 
173
- div .pro-layout-icon {
174
- color: var(--zaui-text, #343434);
157
+ &::before {
158
+ position: absolute;
159
+ top: 4px;
160
+ left: 5px;
161
+ width: calc(100% - 10px);
162
+ height: 38px;
163
+ background-color: var(--zaui-brand, #006aff);
164
+ border-radius: var(--zaui-border-radius, 8px);
165
+ opacity: 0.08;
166
+ content: '';
175
167
  }
176
168
  }
177
- }
178
- }
179
169
 
180
- .pro-layout-menu-collapsed {
181
- background: #F7F9FD;
182
- border-right: none;
183
- &:hover {
184
- background: transparent !important;
185
- }
186
- &:hover::after {
187
- position: absolute;
188
- top: 5px;
189
- left: 5px;
190
- width: calc(100% - 10px);
191
- height: 40px;
192
- background-color: var(--zaui-brand, #006aff);
193
- border-radius: var(--zaui-border-radius, 8px);
194
- opacity: 0.08;
195
- content: '';
196
- }
197
-
198
- &::before {
199
- position: absolute;
200
- top: 0;
201
- left: var(--zaui-space-size-sm, 8px);
202
- width: calc(100% - 16px);
203
- height: 1px;
204
- background: #dee0e3;
205
- content: '';
170
+ div .pro-layout-icon {
171
+ color: var(--zaui-text, #343434);
172
+ }
206
173
  }
207
174
  }
175
+ }
208
176
 
209
- .pro-layout-row {
210
- .pro-layout-arrow {
211
- border-color: var(--zaui-text, #343434);
212
- }
177
+ .pro-layout-menu-collapsed {
178
+ background: #f7f9fd;
179
+ border-right: none;
180
+ &:hover {
181
+ background: transparent !important;
213
182
  }
214
- .@{ant-prefix}-menu-root {
215
- overflow-x: hidden !important;
216
- border: none !important;
183
+ &:hover::after {
184
+ position: absolute;
185
+ top: 5px;
186
+ left: 5px;
187
+ width: calc(100% - 10px);
188
+ height: 40px;
189
+ background-color: var(--zaui-brand, #006aff);
190
+ border-radius: var(--zaui-border-radius, 8px);
191
+ opacity: 0.08;
192
+ content: '';
217
193
  }
218
194
 
219
- .anticon-caret-down {
220
- color: #999 !important;
221
- inset-inline-end: 8px;
195
+ &::before {
196
+ position: absolute;
197
+ top: 0;
198
+ left: var(--zaui-space-size-sm, 8px);
199
+ width: calc(100% - 16px);
200
+ height: 1px;
201
+ background: #dee0e3;
202
+ content: '';
222
203
  }
204
+ }
223
205
 
224
- .pro-layout-row .pro-layout-menu {
225
- background: #F7F9FD;
206
+ .pro-layout-row {
207
+ .pro-layout-arrow {
208
+ border-color: var(--zaui-text, #343434);
226
209
  }
210
+ }
211
+ .@{ant-prefix}-menu-root {
212
+ overflow-x: hidden !important;
213
+ border: none !important;
214
+ }
227
215
 
228
- // 所有 Menu 相关的背景色统一为 #F7F9FD
229
- .pro-layout-open-menu {
230
- background: #F7F9FD;
231
-
232
- .@{ant-prefix}-menu {
233
- background: #F7F9FD;
234
- }
216
+ .anticon-caret-down {
217
+ color: #999 !important;
218
+ inset-inline-end: 8px;
219
+ }
235
220
 
236
- .@{ant-prefix}-menu-root {
237
- background: #F7F9FD;
238
- }
221
+ .pro-layout-row .pro-layout-menu {
222
+ background: #f7f9fd;
223
+ }
239
224
 
240
- .@{ant-prefix}-menu-sub {
241
- background: #F7F9FD !important;
242
- }
225
+ // 所有 Menu 相关的背景色统一为 #F7F9FD
226
+ .pro-layout-open-menu {
227
+ background: #f7f9fd;
243
228
 
229
+ .@{ant-prefix}-menu {
230
+ background: #f7f9fd;
244
231
  }
245
232
 
246
- .pro-layout-open-menu
247
- .@{ant-prefix}-menu-root
248
- > .@{ant-prefix}-menu-submenu
249
- .@{ant-prefix}-menu-sub {
250
- background: #F7F9FD;
233
+ .@{ant-prefix}-menu-root {
234
+ background: #f7f9fd;
251
235
  }
252
236
 
253
- .pro-layout-open-menu .@{ant-prefix}-menu-title-content div h2 {
254
- color: var(--zaui-text, #343434);
255
- padding-right: 26px;
237
+ .@{ant-prefix}-menu-sub {
238
+ background: #f7f9fd !important;
256
239
  }
257
- .@{ant-prefix}-menu-item-only-child{
258
- .@{ant-prefix}-menu-title-content div h2{
259
- padding-right: 16px;
260
- }
240
+ }
241
+
242
+ .pro-layout-open-menu
243
+ .@{ant-prefix}-menu-root
244
+ > .@{ant-prefix}-menu-submenu
245
+ .@{ant-prefix}-menu-sub {
246
+ background: #f7f9fd;
247
+ }
248
+
249
+ .pro-layout-open-menu .@{ant-prefix}-menu-title-content div h2 {
250
+ color: var(--zaui-text, #343434);
251
+ padding-right: 26px;
252
+ }
253
+ .@{ant-prefix}-menu-item-only-child {
254
+ .@{ant-prefix}-menu-title-content div h2 {
255
+ padding-right: 16px;
261
256
  }
257
+ }
262
258
 
263
- .pro-layout-open-menu .@{ant-prefix}-menu-item:hover,
264
- .pro-layout-open-menu .@{ant-prefix}-menu-submenu-title:hover,
265
- .pro-layout-open-menu .@{ant-prefix}-menu-item-selected {
266
- position: relative;
267
- background-color: transparent !important;
268
-
269
- &:before {
270
- position: absolute;
271
- left: var(--zaui-space-size-sm, 8px);
272
- width: calc(100% - 8px);
273
- min-height: 38px;
274
- height: 80%;
275
- background-color: var(--zaui-brand, #006aff);
276
- border-radius: var(--zaui-border-radius, 8px);
277
- opacity: 0.08;
278
- content: '';
279
- }
259
+ .pro-layout-open-menu .@{ant-prefix}-menu-item:hover,
260
+ .pro-layout-open-menu .@{ant-prefix}-menu-submenu-title:hover,
261
+ .pro-layout-open-menu .@{ant-prefix}-menu-item-selected {
262
+ position: relative;
263
+ background-color: transparent !important;
264
+
265
+ &:before {
266
+ position: absolute;
267
+ left: var(--zaui-space-size-sm, 8px);
268
+ width: calc(100% - 8px);
269
+ min-height: 38px;
270
+ height: 80%;
271
+ background-color: var(--zaui-brand, #006aff);
272
+ border-radius: var(--zaui-border-radius, 8px);
273
+ opacity: 0.08;
274
+ content: '';
280
275
  }
276
+ }
281
277
 
282
- .pro-layout-open-menu .@{ant-prefix}-menu-item-selected {
283
- &::after {
284
- display: none;
285
- }
278
+ .pro-layout-open-menu .@{ant-prefix}-menu-item-selected {
279
+ &::after {
280
+ display: none;
281
+ }
286
282
 
287
- background: transparent !important;
283
+ background: transparent !important;
288
284
 
289
- h2 {
290
- color: var(--zaui-brand, #006aff) !important;
291
- }
285
+ h2 {
286
+ color: var(--zaui-brand, #006aff) !important;
292
287
  }
288
+ }
293
289
 
294
290
  /** 内容区 */
295
291
  .pro-layout-content {
@@ -301,7 +297,7 @@
301
297
  margin-bottom: 0;
302
298
  margin-left: 48px;
303
299
  padding: 0 var(--zaui-space-size-md, 16px);
304
- background: #FFFFFF;
300
+ background: #ffffff;
305
301
  border-top: 1px solid rgb(235 236 238);
306
302
  border-right: 1px solid rgb(235 236 238);
307
303
  border-left: 1px solid rgb(235 236 238);
@@ -30,7 +30,7 @@ export declare function getUrlParams(name: string): string;
30
30
  * @param pathName url地址
31
31
  * @param routerMatch 匹配模式id & url
32
32
  */
33
- export declare const getPathNameKey: ({ menus, pathName, }: {
33
+ export declare const getPathNameKey: ({ menus, pathName }: {
34
34
  menus: any[];
35
35
  pathName: string;
36
36
  }) => any;
@@ -1,4 +1,3 @@
1
-
2
1
  .pro-select-ellipse {
3
2
  display: block;
4
3
  width: 100%;
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * 返回当前组件可以显示的数据源
3
3
  */
4
- export declare const getSelectList: ({ otherProps, value, dataSource, labelInValue, fieldNames, mode }: any) => any;
4
+ export declare const getSelectList: ({ otherProps, value, dataSource, labelInValue, fieldNames, mode, }: any) => any;
@@ -1,7 +1,7 @@
1
1
  import _isBoolean from "lodash/isBoolean";
2
2
  // @ts-nocheck
3
3
  import { useEffect } from 'react';
4
- import LazyLoad, { forceCheck } from 'react-lazyload';
4
+ import LazyLoad, { forceCheck } from "../LazyLoad";
5
5
  import { useStep } from "../../index";
6
6
  import ProCollapse from "../../../ProLayout/components/ProCollapse";
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -0,0 +1,19 @@
1
+ import React, { ReactNode } from 'react';
2
+ export interface LazyLoadProps {
3
+ /** 占位高度,未进入视口时显示 */
4
+ height?: number;
5
+ /** 提前触发距离(px),等同于 rootMargin */
6
+ offset?: number;
7
+ /** 进入视口后只加载一次 */
8
+ once?: boolean;
9
+ /** CSS className 前缀 */
10
+ classNamePrefix?: string;
11
+ children: ReactNode;
12
+ [key: string]: any;
13
+ }
14
+ /** 强制所有懒加载组件立即显示内容(替代 react-lazyload 的 forceVisible) */
15
+ export declare const forceVisible: () => void;
16
+ /** 重新检查懒加载状态(替代 react-lazyload 的 forceCheck) */
17
+ export declare const forceCheck: () => void;
18
+ declare const LazyLoad: ({ height, offset, once, classNamePrefix, children, }: LazyLoadProps) => React.JSX.Element;
19
+ export default LazyLoad;
@@ -0,0 +1,55 @@
1
+ import React, { useState, useEffect } from 'react';
2
+ import { useInView } from 'react-intersection-observer';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ /** 全局强制加载回调注册表 */
5
+ const forceLoadCallbacks = new Set();
6
+
7
+ /** 强制所有懒加载组件立即显示内容(替代 react-lazyload 的 forceVisible) */
8
+ export const forceVisible = () => {
9
+ forceLoadCallbacks.forEach(cb => cb());
10
+ };
11
+
12
+ /** 重新检查懒加载状态(替代 react-lazyload 的 forceCheck) */
13
+ export const forceCheck = () => {
14
+ forceVisible();
15
+ };
16
+ const LazyLoad = ({
17
+ height = 200,
18
+ offset = 100,
19
+ once = true,
20
+ classNamePrefix,
21
+ children
22
+ }) => {
23
+ const [forceLoaded, setForceLoaded] = useState(false);
24
+ const {
25
+ ref,
26
+ inView
27
+ } = useInView({
28
+ rootMargin: `${offset}px`,
29
+ triggerOnce: once,
30
+ threshold: 0
31
+ });
32
+ useEffect(() => {
33
+ const cb = () => setForceLoaded(true);
34
+ forceLoadCallbacks.add(cb);
35
+ return () => {
36
+ forceLoadCallbacks.delete(cb);
37
+ };
38
+ }, []);
39
+ const visible = inView || forceLoaded;
40
+ if (!visible) {
41
+ return /*#__PURE__*/_jsx("div", {
42
+ ref: ref,
43
+ style: {
44
+ height
45
+ },
46
+ className: classNamePrefix ? `${classNamePrefix}-lazy-placeholder` : undefined
47
+ });
48
+ }
49
+ return /*#__PURE__*/_jsx("div", {
50
+ ref: ref,
51
+ className: classNamePrefix ? `${classNamePrefix}-lazy-wrapper` : undefined,
52
+ children: children
53
+ });
54
+ };
55
+ export default LazyLoad;
@@ -1,6 +1,6 @@
1
1
  import _throttle from "lodash/throttle";
2
2
  import React from 'react';
3
- import { forceVisible } from 'react-lazyload';
3
+ import { forceVisible } from "../LazyLoad";
4
4
  import { useStep } from "../../index";
5
5
  import { getLoadedMap } from "../../utils";
6
6
  /**
@@ -5,7 +5,7 @@ export declare const useStep: () => Partial<ProStepContextType>;
5
5
  declare const ProStep: {
6
6
  ({ children, ...resetProps }: ProStepType): JSX.Element;
7
7
  useStep: () => Partial<ProStepContextType>;
8
- Item: ({ id, title, collapse: collapseItem, children, lazyLoad: stepLazyLoad, order, ...restProps }: import("./propsType").ProStepItemPropsType) => JSX.Element;
8
+ Item: ({ id, title, collapse: collapseItem, children, lazyLoad: stepLazyLoad, order, ...restProps }: import("./propsType").ProStepItemPropsType) => globalThis.JSX.Element;
9
9
  Listener: ({ children, delayTime, excludes, ...props }: import("./propsType").ListenerProps) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
10
10
  };
11
11
  export default ProStep;
@@ -1,5 +1,5 @@
1
1
  import { ReactNode, CSSProperties } from 'react';
2
- import { LazyLoadProps } from 'react-lazyload';
2
+ import type { LazyLoadProps } from './components/LazyLoad';
3
3
  /**
4
4
  * 步骤项基础类型定义
5
5
  * @interface ItemType
@@ -128,8 +128,6 @@
128
128
  background: var(--zaui-brand, #006aff);
129
129
  border-radius: 3px;
130
130
 
131
-
132
-
133
131
  &.errored {
134
132
  width: 12px;
135
133
  height: 12px;
@@ -189,15 +187,15 @@
189
187
  align-items: center;
190
188
  justify-content: center;
191
189
 
192
- .@{ant-prefix}-badge{
193
- .@{ant-prefix}-badge-count{
194
- background: rgba(255, 80, 80, 0.15);
195
- color: #ff5050;
196
- .@{ant-prefix}-scroll-number-only-unit, .@{ant-prefix}-scroll-number{
190
+ .@{ant-prefix}-badge {
191
+ .@{ant-prefix}-badge-count {
192
+ background: rgba(255, 80, 80, 0.15);
193
+ color: #ff5050;
194
+ .@{ant-prefix}-scroll-number-only-unit,
195
+ .@{ant-prefix}-scroll-number {
197
196
  font-weight: 600;
198
- }
197
+ }
199
198
  }
200
-
201
199
  }
202
200
 
203
201
  > span {
@@ -5,7 +5,7 @@ interface RowProps extends React.HTMLAttributes<HTMLTableRowElement> {
5
5
  disabled?: boolean;
6
6
  }
7
7
  export declare const Row: FC<RowProps>;
8
- declare const DndWrapper: ({ draggable, value, onChange, disabled, children, rowKey, onDragStartGuard, onDragEndGuard }: {
8
+ declare const DndWrapper: ({ draggable, value, onChange, disabled, children, rowKey, onDragStartGuard, onDragEndGuard, }: {
9
9
  draggable: any;
10
10
  value: any;
11
11
  onChange: any;
@@ -197,7 +197,7 @@ export interface ProTableColumnType extends Omit<ColumnType<any>, 'dataIndex'> {
197
197
  * @description 用于开启比对时,自定义 render 渲染初始值,触发条件必须写render
198
198
  * @default undefined
199
199
  */
200
- viewRender?: ({ value, record, index, originValue, originRecord }: any) => 'same' | 'changed' | 'add' | undefined;
200
+ viewRender?: ({ value, record, index, originValue, originRecord, }: any) => 'same' | 'changed' | 'add' | undefined;
201
201
  /**
202
202
  * 是否已更改
203
203
  * @description 标记列值是否已变更