acud 0.0.64 → 0.0.67
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/acud.css +131 -39
- package/dist/acud.css.map +1 -1
- package/dist/acud.js +799 -212
- package/dist/acud.js.map +1 -1
- package/dist/acud.min.css +1 -1
- package/dist/acud.min.css.map +1 -1
- package/dist/acud.min.js +11 -7
- package/dist/acud.min.js.map +1 -1
- package/es/breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/es/breadcrumb/BreadcrumbItem.js +16 -4
- package/es/dialog-box/style/index.css +4 -4
- package/es/dropdown/dropdown-button.js +8 -4
- package/es/dropdown/style/index.css +2 -1
- package/es/dropdown/style/index.less +2 -1
- package/es/modal/DialogBox.d.ts +46 -0
- package/es/modal/DialogBox.js +152 -0
- package/es/modal/Modal.d.ts +5 -2
- package/es/modal/Modal.js +6 -4
- package/es/modal/dialog.d.ts +17 -0
- package/es/modal/dialog.js +123 -0
- package/es/modal/index.d.ts +11 -2
- package/es/modal/index.js +10 -1
- package/es/modal/style/index.css +79 -13
- package/es/modal/style/index.less +93 -6
- package/es/modal/style/mixin.less +4 -4
- package/es/progress/style/common.less +5 -3
- package/es/progress/style/index.css +2 -1
- package/es/radio/index.d.ts +3 -0
- package/es/style/themes/dark/components/modal.less +14 -9
- package/es/style/themes/default/components/modal.less +15 -15
- package/es/tabs/src/TabNavList/index.js +2 -2
- package/es/tabs/style/index.css +0 -1
- package/es/tabs/style/index.less +0 -1
- package/es/time-picker/style/index.css +1 -0
- package/es/time-picker/style/index.less +1 -0
- package/es/transfer/{dataSource.d.ts → DataSource.d.ts} +1 -1
- package/es/transfer/{dataSource.js → DataSource.js} +37 -6
- package/{lib/transfer/sourceList.d.ts → es/transfer/SourceList.d.ts} +2 -2
- package/es/transfer/{sourceList.js → SourceList.js} +0 -0
- package/es/transfer/{target.d.ts → Target.d.ts} +1 -1
- package/es/transfer/{target.js → Target.js} +60 -4
- package/{lib/transfer/targetList.d.ts → es/transfer/TargetList.d.ts} +2 -2
- package/es/transfer/{targetList.js → TargetList.js} +0 -0
- package/es/transfer/index.d.ts +3 -0
- package/es/transfer/index.js +9 -4
- package/es/transfer/style/css.js +3 -1
- package/es/transfer/style/index.css +25 -5
- package/es/transfer/style/index.d.ts +1 -0
- package/es/transfer/style/index.js +3 -1
- package/es/transfer/style/index.less +30 -5
- package/es/upload/UploadList/ListItem.js +7 -2
- package/es/upload/UploadList/index.js +4 -7
- package/es/upload/style/index.css +17 -13
- package/es/upload/style/index.less +25 -20
- package/es/upload/utils.js +1 -1
- package/lib/breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/lib/breadcrumb/BreadcrumbItem.js +21 -8
- package/lib/dialog-box/style/index.css +4 -4
- package/lib/dropdown/dropdown-button.js +8 -4
- package/lib/dropdown/style/index.css +2 -1
- package/lib/dropdown/style/index.less +2 -1
- package/lib/modal/DialogBox.d.ts +46 -0
- package/lib/modal/DialogBox.js +179 -0
- package/lib/modal/Modal.d.ts +5 -2
- package/lib/modal/Modal.js +6 -4
- package/lib/modal/dialog.d.ts +17 -0
- package/lib/modal/dialog.js +145 -0
- package/lib/modal/index.d.ts +11 -2
- package/lib/modal/index.js +13 -1
- package/lib/modal/style/index.css +79 -13
- package/lib/modal/style/index.less +93 -6
- package/lib/modal/style/mixin.less +4 -4
- package/lib/progress/style/common.less +5 -3
- package/lib/progress/style/index.css +2 -1
- package/lib/radio/index.d.ts +3 -0
- package/lib/style/themes/dark/components/modal.less +14 -9
- package/lib/style/themes/default/components/modal.less +15 -15
- package/lib/tabs/src/TabNavList/index.js +2 -2
- package/lib/tabs/style/index.css +0 -1
- package/lib/tabs/style/index.less +0 -1
- package/lib/time-picker/style/index.css +1 -0
- package/lib/time-picker/style/index.less +1 -0
- package/lib/transfer/{dataSource.d.ts → DataSource.d.ts} +1 -1
- package/lib/transfer/{dataSource.js → DataSource.js} +38 -6
- package/{es/transfer/sourceList.d.ts → lib/transfer/SourceList.d.ts} +2 -2
- package/lib/transfer/{sourceList.js → SourceList.js} +0 -0
- package/lib/transfer/{target.d.ts → Target.d.ts} +1 -1
- package/lib/transfer/{target.js → Target.js} +63 -5
- package/{es/transfer/targetList.d.ts → lib/transfer/TargetList.d.ts} +2 -2
- package/lib/transfer/{targetList.js → TargetList.js} +0 -0
- package/lib/transfer/index.d.ts +3 -0
- package/lib/transfer/index.js +11 -7
- package/lib/transfer/style/css.js +3 -1
- package/lib/transfer/style/index.css +25 -5
- package/lib/transfer/style/index.d.ts +1 -0
- package/lib/transfer/style/index.js +3 -1
- package/lib/transfer/style/index.less +30 -5
- package/lib/upload/UploadList/ListItem.js +7 -2
- package/lib/upload/UploadList/index.js +4 -7
- package/lib/upload/style/index.css +17 -13
- package/lib/upload/style/index.less +25 -20
- package/lib/upload/utils.js +1 -1
- package/package.json +1 -1
package/es/modal/style/index.css
CHANGED
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
transform: translate(-50%, -50%);
|
|
20
20
|
width: auto;
|
|
21
21
|
max-width: calc(100vw - 32px);
|
|
22
|
-
padding-bottom: 24px;
|
|
23
22
|
}
|
|
24
23
|
.acud-modal.zoom-enter,
|
|
25
24
|
.acud-modal.zoom-appear {
|
|
@@ -58,23 +57,43 @@
|
|
|
58
57
|
}
|
|
59
58
|
.acud-modal-sm {
|
|
60
59
|
width: 520px;
|
|
61
|
-
height: 240px;
|
|
62
|
-
max-height:
|
|
60
|
+
min-height: 240px;
|
|
61
|
+
max-height: 560px;
|
|
62
|
+
}
|
|
63
|
+
.acud-modal-sm > .acud-modal-content {
|
|
64
|
+
width: 100%;
|
|
65
|
+
min-height: 240px;
|
|
66
|
+
max-height: 560px;
|
|
63
67
|
}
|
|
64
68
|
.acud-modal-md {
|
|
65
69
|
width: 800px;
|
|
66
|
-
height: 400px;
|
|
67
|
-
max-height:
|
|
70
|
+
min-height: 400px;
|
|
71
|
+
max-height: 560px;
|
|
72
|
+
}
|
|
73
|
+
.acud-modal-md > .acud-modal-content {
|
|
74
|
+
width: 100%;
|
|
75
|
+
min-height: 400px;
|
|
76
|
+
max-height: 560px;
|
|
68
77
|
}
|
|
69
78
|
.acud-modal-lg {
|
|
70
79
|
width: 1120px;
|
|
71
|
-
height: 480px;
|
|
72
|
-
max-height:
|
|
80
|
+
min-height: 480px;
|
|
81
|
+
max-height: 560px;
|
|
82
|
+
}
|
|
83
|
+
.acud-modal-lg > .acud-modal-content {
|
|
84
|
+
width: 100%;
|
|
85
|
+
min-height: 480px;
|
|
86
|
+
max-height: 560px;
|
|
73
87
|
}
|
|
74
88
|
.acud-modal-xl {
|
|
75
89
|
width: 1200px;
|
|
76
|
-
height: 480px;
|
|
77
|
-
max-height:
|
|
90
|
+
min-height: 480px;
|
|
91
|
+
max-height: 560px;
|
|
92
|
+
}
|
|
93
|
+
.acud-modal-xl > .acud-modal-content {
|
|
94
|
+
width: 100%;
|
|
95
|
+
min-height: 480px;
|
|
96
|
+
max-height: 560px;
|
|
78
97
|
}
|
|
79
98
|
.acud-modal-content {
|
|
80
99
|
position: relative;
|
|
@@ -111,7 +130,7 @@
|
|
|
111
130
|
}
|
|
112
131
|
.acud-modal-close-x {
|
|
113
132
|
display: block;
|
|
114
|
-
margin-top:
|
|
133
|
+
margin-top: 27px;
|
|
115
134
|
font-size: 16px;
|
|
116
135
|
text-align: center;
|
|
117
136
|
text-transform: none;
|
|
@@ -125,24 +144,29 @@
|
|
|
125
144
|
font-weight: 900;
|
|
126
145
|
}
|
|
127
146
|
.acud-modal-title {
|
|
128
|
-
font-size:
|
|
129
|
-
line-height:
|
|
147
|
+
font-size: 14px;
|
|
148
|
+
line-height: 22px;
|
|
149
|
+
padding-right: 12px;
|
|
130
150
|
word-wrap: break-word;
|
|
131
151
|
}
|
|
132
152
|
.acud-modal-body {
|
|
133
|
-
|
|
153
|
+
margin: 16px 24px 24px;
|
|
134
154
|
font-size: 12px;
|
|
135
155
|
font-weight: 400;
|
|
136
156
|
line-height: 20px;
|
|
137
157
|
word-wrap: break-word;
|
|
138
158
|
color: #151B26;
|
|
139
159
|
flex: 1;
|
|
160
|
+
overflow-y: auto;
|
|
140
161
|
}
|
|
141
162
|
.acud-modal-footer {
|
|
142
163
|
padding: 0 24px 24px;
|
|
143
164
|
background: #FFFFFF;
|
|
144
165
|
text-align: right;
|
|
145
166
|
flex: none;
|
|
167
|
+
display: flex;
|
|
168
|
+
align-items: center;
|
|
169
|
+
justify-content: flex-end;
|
|
146
170
|
}
|
|
147
171
|
.acud-modal-footer .acud-btn {
|
|
148
172
|
margin: 0;
|
|
@@ -150,3 +174,45 @@
|
|
|
150
174
|
.acud-modal-footer .acud-btn + .acud-btn {
|
|
151
175
|
margin-left: 16px;
|
|
152
176
|
}
|
|
177
|
+
.acud-modal-dialogbox {
|
|
178
|
+
width: 400px;
|
|
179
|
+
height: auto;
|
|
180
|
+
min-height: 184px;
|
|
181
|
+
}
|
|
182
|
+
.acud-modal-dialogbox-icon {
|
|
183
|
+
height: 100%;
|
|
184
|
+
margin-right: 12px;
|
|
185
|
+
float: left;
|
|
186
|
+
display: flex;
|
|
187
|
+
align-items: center;
|
|
188
|
+
padding-top: 2px;
|
|
189
|
+
}
|
|
190
|
+
.acud-modal-dialogbox-title {
|
|
191
|
+
overflow: hidden;
|
|
192
|
+
padding-right: 12px;
|
|
193
|
+
}
|
|
194
|
+
.acud-modal-dialogbox-content {
|
|
195
|
+
width: 100%;
|
|
196
|
+
padding-left: 32px;
|
|
197
|
+
}
|
|
198
|
+
.acud-modal-dialogbox .acud-modal-title .acudicon {
|
|
199
|
+
font-size: 20px;
|
|
200
|
+
}
|
|
201
|
+
.acud-modal-dialogbox > .acud-modal-content {
|
|
202
|
+
min-height: 184px;
|
|
203
|
+
}
|
|
204
|
+
.acud-modal-dialogbox-warning .acud-modal-dialogbox-icon {
|
|
205
|
+
color: #FF9326;
|
|
206
|
+
}
|
|
207
|
+
.acud-modal-dialogbox-info .acud-modal-dialogbox-icon {
|
|
208
|
+
color: #2468F2;
|
|
209
|
+
}
|
|
210
|
+
.acud-modal-dialogbox-success .acud-modal-dialogbox-icon {
|
|
211
|
+
color: #30BF13;
|
|
212
|
+
}
|
|
213
|
+
.acud-modal-dialogbox-error .acud-modal-dialogbox-icon {
|
|
214
|
+
color: #F33E3E;
|
|
215
|
+
}
|
|
216
|
+
.acud-modal-dialogbox-confirm .acud-modal-dialogbox-icon {
|
|
217
|
+
color: #FF9326;
|
|
218
|
+
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@import './mixin';
|
|
4
4
|
|
|
5
5
|
@modal-prefix-cls: ~'@{acud-prefix}-modal';
|
|
6
|
+
@dialogbox-prefix: ~'@{modal-prefix-cls}-dialogbox';
|
|
6
7
|
|
|
7
8
|
.@{modal-prefix-cls} {
|
|
8
9
|
.reset-component();
|
|
@@ -16,22 +17,37 @@
|
|
|
16
17
|
transform: translate(-50%, -50%);
|
|
17
18
|
width: auto;
|
|
18
19
|
max-width: calc(100vw - 32px);
|
|
19
|
-
padding-bottom: 24px;
|
|
20
20
|
|
|
21
21
|
&-sm {
|
|
22
|
-
.modal-size-config(sm);
|
|
22
|
+
.modal-size-config(sm, false);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&-sm > &-content {
|
|
26
|
+
.modal-size-config(sm, true);
|
|
23
27
|
}
|
|
24
28
|
|
|
25
29
|
&-md {
|
|
26
|
-
.modal-size-config(md);
|
|
30
|
+
.modal-size-config(md, false);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&-md > &-content {
|
|
34
|
+
.modal-size-config(md, true);
|
|
27
35
|
}
|
|
28
36
|
|
|
29
37
|
&-lg {
|
|
30
|
-
.modal-size-config(lg);
|
|
38
|
+
.modal-size-config(lg, false);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&-lg > &-content {
|
|
42
|
+
.modal-size-config(lg, true);
|
|
31
43
|
}
|
|
32
44
|
|
|
33
45
|
&-xl {
|
|
34
|
-
.modal-size-config(xl);
|
|
46
|
+
.modal-size-config(xl, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&-xl > &-content {
|
|
50
|
+
.modal-size-config(xl, true);
|
|
35
51
|
}
|
|
36
52
|
|
|
37
53
|
// 弹框内容
|
|
@@ -94,18 +110,20 @@
|
|
|
94
110
|
&-title {
|
|
95
111
|
font-size: @modal-heading-font-size;
|
|
96
112
|
line-height: @modal-heading-height;
|
|
113
|
+
padding-right: @P * 3;
|
|
97
114
|
word-wrap: break-word;
|
|
98
115
|
}
|
|
99
116
|
|
|
100
117
|
// 内容body部分
|
|
101
118
|
&-body {
|
|
102
|
-
|
|
119
|
+
margin: @modal-body-margin;
|
|
103
120
|
font-size: @modal-body-font-size;
|
|
104
121
|
font-weight: @modal-body-font-weight;
|
|
105
122
|
line-height: @modal-body-line-height;
|
|
106
123
|
word-wrap: break-word;
|
|
107
124
|
color: @modal-body-font-color;
|
|
108
125
|
flex: 1;
|
|
126
|
+
overflow-y: auto;
|
|
109
127
|
}
|
|
110
128
|
|
|
111
129
|
// 内容footer部分
|
|
@@ -114,6 +132,10 @@
|
|
|
114
132
|
background: @modal-footer-bg-color;
|
|
115
133
|
text-align: right;
|
|
116
134
|
flex: none;
|
|
135
|
+
// TODO: 暂时解决 confirmLoading 时按钮对齐问题
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
justify-content: flex-end;
|
|
117
139
|
|
|
118
140
|
.@{acud-prefix}-btn {
|
|
119
141
|
margin: 0;
|
|
@@ -123,3 +145,68 @@
|
|
|
123
145
|
}
|
|
124
146
|
}
|
|
125
147
|
}
|
|
148
|
+
|
|
149
|
+
.@{dialogbox-prefix} {
|
|
150
|
+
width: @P * 100;
|
|
151
|
+
height: auto;
|
|
152
|
+
min-height: @P * 46;
|
|
153
|
+
|
|
154
|
+
&-icon {
|
|
155
|
+
height: 100%;
|
|
156
|
+
margin-right: @P * 3;
|
|
157
|
+
float: left;
|
|
158
|
+
// TODO: 没找到更好的居中办法
|
|
159
|
+
display: flex;
|
|
160
|
+
align-items: center;
|
|
161
|
+
padding-top: 2px;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&-title {
|
|
165
|
+
overflow: hidden;
|
|
166
|
+
padding-right: @P * 3;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&-content {
|
|
170
|
+
width: 100%;
|
|
171
|
+
padding-left: @P * 3 + @T6;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.@{modal-prefix-cls}-title {
|
|
175
|
+
.acudicon {
|
|
176
|
+
font-size: @T6;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
& > .@{modal-prefix-cls}-content {
|
|
181
|
+
min-height: @P * 46;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.@{dialogbox-prefix}-warning {
|
|
186
|
+
.@{dialogbox-prefix}-icon {
|
|
187
|
+
color: @W6;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.@{dialogbox-prefix}-info {
|
|
192
|
+
.@{dialogbox-prefix}-icon {
|
|
193
|
+
color: @B6;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.@{dialogbox-prefix}-success {
|
|
198
|
+
.@{dialogbox-prefix}-icon {
|
|
199
|
+
color: @S6;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
.@{dialogbox-prefix}-error {
|
|
203
|
+
.@{dialogbox-prefix}-icon {
|
|
204
|
+
color: @E6;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.@{dialogbox-prefix}-confirm {
|
|
209
|
+
.@{dialogbox-prefix}-icon {
|
|
210
|
+
color: @W6;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.modal-size-config(@type) {
|
|
40
|
+
.modal-size-config(@type, @content) {
|
|
41
41
|
@width: ~'modal-width-@{type}';
|
|
42
|
-
@height: ~'modal-height-@{type}';
|
|
42
|
+
@min-height: ~'modal-height-@{type}';
|
|
43
43
|
@max-height: ~'modal-max-height-@{type}';
|
|
44
|
-
width: @@width;
|
|
45
|
-
height: @@height;
|
|
44
|
+
width: if(@content, 100%, @@width);
|
|
45
|
+
min-height: @@min-height;
|
|
46
46
|
max-height: @@max-height;
|
|
47
47
|
}
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
.@{progress-prefix-cls}-label-hidden .@{progress-prefix-cls}-label
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
.@{progress-prefix-cls}-label-hidden .@{progress-prefix-cls}-label{
|
|
33
|
+
&.@{progress-prefix-cls}-label-outer, &.@{progress-prefix-cls}-label-inner{
|
|
34
|
+
display: none;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
.acud-progress-success .acud-progress-label-icon {
|
|
24
24
|
font-size: 0;
|
|
25
25
|
}
|
|
26
|
-
.acud-progress-label-hidden .acud-progress-label
|
|
26
|
+
.acud-progress-label-hidden .acud-progress-label.acud-progress-label-outer,
|
|
27
|
+
.acud-progress-label-hidden .acud-progress-label.acud-progress-label-inner {
|
|
27
28
|
display: none;
|
|
28
29
|
}
|
|
29
30
|
.acud-progress-line {
|
package/es/radio/index.d.ts
CHANGED
|
@@ -10,15 +10,20 @@
|
|
|
10
10
|
@modal-mask-color: fade(@G5, 50%);
|
|
11
11
|
|
|
12
12
|
// 默认宽高设置
|
|
13
|
-
@modal-width-sm: 100
|
|
14
|
-
@modal-width-md: 150
|
|
15
|
-
@modal-width-lg: 200
|
|
16
|
-
@modal-width-xl: 300
|
|
13
|
+
@modal-width-sm: 100 * @P;
|
|
14
|
+
@modal-width-md: 150 * @P;
|
|
15
|
+
@modal-width-lg: 200 * @P;
|
|
16
|
+
@modal-width-xl: 300 * @P;
|
|
17
17
|
|
|
18
|
-
@modal-max-height-sm:
|
|
19
|
-
@modal-max-height-md:
|
|
20
|
-
@modal-max-height-lg:
|
|
21
|
-
@modal-max-height-xl:
|
|
18
|
+
@modal-max-height-sm: 140 * @P;
|
|
19
|
+
@modal-max-height-md: 140 * @P;
|
|
20
|
+
@modal-max-height-lg: 140 * @P;
|
|
21
|
+
@modal-max-height-xl: 140 * @P;
|
|
22
|
+
|
|
23
|
+
@modal-height-sm: 60 * @P;
|
|
24
|
+
@modal-height-md: 100 * @P;
|
|
25
|
+
@modal-height-lg: 120 * @P;
|
|
26
|
+
@modal-height-xl: 120 * @P;
|
|
22
27
|
|
|
23
28
|
// Content
|
|
24
29
|
@modal-content-bg-color: @G11;
|
|
@@ -36,7 +41,7 @@
|
|
|
36
41
|
@modal-close-font-size: @T4;
|
|
37
42
|
|
|
38
43
|
// Body
|
|
39
|
-
@modal-body-
|
|
44
|
+
@modal-body-margin: 4*@P 6*@P 6*@P;
|
|
40
45
|
@modal-body-bg-color: @G11;
|
|
41
46
|
@modal-body-font-size: @T2;
|
|
42
47
|
@modal-body-line-height: 5*@P;
|
|
@@ -10,29 +10,29 @@
|
|
|
10
10
|
@modal-mask-color: fade(@G5, 50%);
|
|
11
11
|
|
|
12
12
|
// 默认宽高设置
|
|
13
|
-
@modal-width-sm: 130
|
|
14
|
-
@modal-width-md: 200
|
|
15
|
-
@modal-width-lg: 280
|
|
16
|
-
@modal-width-xl: 300
|
|
13
|
+
@modal-width-sm: 130 * @P;
|
|
14
|
+
@modal-width-md: 200 * @P;
|
|
15
|
+
@modal-width-lg: 280 * @P;
|
|
16
|
+
@modal-width-xl: 300 * @P;
|
|
17
17
|
|
|
18
|
-
@modal-max-height-sm:
|
|
19
|
-
@modal-max-height-md:
|
|
20
|
-
@modal-max-height-lg:
|
|
21
|
-
@modal-max-height-xl:
|
|
18
|
+
@modal-max-height-sm: 140 * @P;
|
|
19
|
+
@modal-max-height-md: 140 * @P;
|
|
20
|
+
@modal-max-height-lg: 140 * @P;
|
|
21
|
+
@modal-max-height-xl: 140 * @P;
|
|
22
22
|
|
|
23
|
-
@modal-height-sm: 60
|
|
24
|
-
@modal-height-md: 100
|
|
25
|
-
@modal-height-lg: 120
|
|
26
|
-
@modal-height-xl: 120
|
|
23
|
+
@modal-height-sm: 60 * @P;
|
|
24
|
+
@modal-height-md: 100 * @P;
|
|
25
|
+
@modal-height-lg: 120 * @P;
|
|
26
|
+
@modal-height-xl: 120 * @P;
|
|
27
27
|
|
|
28
28
|
// Content
|
|
29
29
|
@modal-content-bg-color: @G11;
|
|
30
30
|
|
|
31
31
|
// Header
|
|
32
|
-
@modal-heading-height:
|
|
32
|
+
@modal-heading-height: 22px;
|
|
33
33
|
@modal-heading-bg-color: @G10;
|
|
34
34
|
@modal-heading-padding: 6*@P 6*@P 0;
|
|
35
|
-
@modal-heading-font-size: @
|
|
35
|
+
@modal-heading-font-size: @T3;
|
|
36
36
|
@modal-heading-font-weight: 500;
|
|
37
37
|
@modal-heading-color: @G2;
|
|
38
38
|
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
@modal-close-font-size: @T4;
|
|
43
43
|
|
|
44
44
|
// Body
|
|
45
|
-
@modal-body-
|
|
45
|
+
@modal-body-margin: 4*@P 6*@P 6*@P;
|
|
46
46
|
@modal-body-bg-color: @G11;
|
|
47
47
|
@modal-body-font-color: @G2;
|
|
48
48
|
@modal-body-font-size: @T2;
|
|
@@ -362,9 +362,9 @@ function TabNavList(props, ref) {
|
|
|
362
362
|
|
|
363
363
|
if (btnNode) {
|
|
364
364
|
newSizes.set(key, {
|
|
365
|
-
width: btnNode.offsetWidth,
|
|
365
|
+
width: btnNode.offsetWidth - 32,
|
|
366
366
|
height: btnNode.offsetHeight,
|
|
367
|
-
left: btnNode.offsetLeft,
|
|
367
|
+
left: btnNode.offsetLeft + 16,
|
|
368
368
|
top: btnNode.offsetTop
|
|
369
369
|
});
|
|
370
370
|
}
|
package/es/tabs/style/index.css
CHANGED
package/es/tabs/style/index.less
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TransferItem, TransferProps } from '
|
|
2
|
+
import { TransferItem, TransferProps } from '.';
|
|
3
3
|
export interface DataSourceProps<RecordType> extends TransferProps<RecordType> {
|
|
4
4
|
tKeys: string[];
|
|
5
5
|
setTKeys: (t: string[]) => void;
|
|
@@ -9,20 +9,26 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
9
9
|
import * as React from 'react';
|
|
10
10
|
import cloneDeep from 'lodash/cloneDeep';
|
|
11
11
|
import Checkbox from '../checkbox';
|
|
12
|
+
import Table from '../table';
|
|
12
13
|
import Search from '../search';
|
|
13
|
-
import SourceList from './
|
|
14
|
+
import SourceList from './SourceList';
|
|
14
15
|
|
|
15
16
|
var defaultFilterOption = function defaultFilterOption(inputValue, option) {
|
|
16
17
|
return option.title.indexOf(inputValue) > -1;
|
|
17
18
|
};
|
|
18
19
|
|
|
20
|
+
var defaultTableFilterOption = function defaultTableFilterOption(inputValue, option) {
|
|
21
|
+
return option.key.indexOf(inputValue) > -1;
|
|
22
|
+
};
|
|
23
|
+
|
|
19
24
|
export default function dataSource(props) {
|
|
20
25
|
var prefixCls = props.prefixCls,
|
|
26
|
+
displayType = props.displayType,
|
|
27
|
+
columns = props.columns,
|
|
21
28
|
expansionSource = props.expansionSource,
|
|
22
29
|
_props$showSelectAll = props.showSelectAll,
|
|
23
30
|
showSelectAll = _props$showSelectAll === void 0 ? true : _props$showSelectAll,
|
|
24
|
-
|
|
25
|
-
filterOption = _props$filterOption === void 0 ? defaultFilterOption : _props$filterOption,
|
|
31
|
+
filterOptionProp = props.filterOption,
|
|
26
32
|
showSearch = props.showSearch,
|
|
27
33
|
_props$showSearchClea = props.showSearchClear,
|
|
28
34
|
showSearchClear = _props$showSearchClea === void 0 ? true : _props$showSearchClea,
|
|
@@ -30,6 +36,7 @@ export default function dataSource(props) {
|
|
|
30
36
|
setTKeys = props.setTKeys,
|
|
31
37
|
leftStyle = props.leftStyle,
|
|
32
38
|
locale = props.locale;
|
|
39
|
+
var filterOption = filterOptionProp || (displayType === 'table' ? defaultTableFilterOption : defaultFilterOption);
|
|
33
40
|
var dataSourceCls = "".concat(prefixCls, "-datasource");
|
|
34
41
|
var sourceTitle = locale.sourceTitle,
|
|
35
42
|
searchPlaceholder = locale.searchPlaceholder,
|
|
@@ -79,7 +86,7 @@ export default function dataSource(props) {
|
|
|
79
86
|
}
|
|
80
87
|
});
|
|
81
88
|
return fileterCloneSource;
|
|
82
|
-
}, [searchValue, expansionSource]);
|
|
89
|
+
}, [searchValue, expansionSource, displayType]);
|
|
83
90
|
var totalUndisabledKeys = React.useMemo(function () {
|
|
84
91
|
var unDisabledDataSource = filterSource.filter(function (data) {
|
|
85
92
|
return !data.group && !data.disabled;
|
|
@@ -112,14 +119,31 @@ export default function dataSource(props) {
|
|
|
112
119
|
var searchValue = e.target.value;
|
|
113
120
|
setSearchValue(searchValue);
|
|
114
121
|
}, []);
|
|
122
|
+
|
|
123
|
+
var onSelectChange = function onSelectChange(v) {
|
|
124
|
+
// 排除filter中包含的tKeys,记为noneFilterKeys
|
|
125
|
+
// 联合noneFilterKeys与filter中的选择项,记为最终keys
|
|
126
|
+
var noneFilterKeys = tKeys.filter(function (key) {
|
|
127
|
+
return !filterSource.some(function (item) {
|
|
128
|
+
return item.key === key;
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
setTKeys([].concat(_toConsumableArray(noneFilterKeys), _toConsumableArray(v)));
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
var rowSelection = {
|
|
135
|
+
onChange: onSelectChange,
|
|
136
|
+
selectedRowKeys: tKeys
|
|
137
|
+
};
|
|
115
138
|
return /*#__PURE__*/React.createElement("div", {
|
|
116
139
|
className: dataSourceCls,
|
|
117
140
|
style: leftStyle
|
|
118
141
|
}, /*#__PURE__*/React.createElement("div", {
|
|
119
142
|
className: "".concat(dataSourceCls, "-header")
|
|
120
|
-
}, showSelectAll && /*#__PURE__*/React.createElement(Checkbox, {
|
|
143
|
+
}, showSelectAll && displayType === 'single' && /*#__PURE__*/React.createElement(Checkbox, {
|
|
121
144
|
checked: allChecked,
|
|
122
145
|
indeterminate: indeterminate,
|
|
146
|
+
className: "".concat(dataSourceCls, "-header-checkall"),
|
|
123
147
|
onClick: selectAll
|
|
124
148
|
}), /*#__PURE__*/React.createElement("span", {
|
|
125
149
|
className: "".concat(dataSourceCls, "-label")
|
|
@@ -131,7 +155,14 @@ export default function dataSource(props) {
|
|
|
131
155
|
allowClear: showSearchClear,
|
|
132
156
|
size: "small",
|
|
133
157
|
onChange: searchChange
|
|
134
|
-
}), !!filterSource.length && /*#__PURE__*/React.createElement(
|
|
158
|
+
}), !!filterSource.length && displayType === 'table' && /*#__PURE__*/React.createElement("div", {
|
|
159
|
+
className: "".concat(prefixCls, "-table-box")
|
|
160
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
161
|
+
pagination: false,
|
|
162
|
+
dataSource: filterSource,
|
|
163
|
+
columns: columns,
|
|
164
|
+
rowSelection: rowSelection
|
|
165
|
+
})), !!filterSource.length && displayType === 'single' && /*#__PURE__*/React.createElement(SourceList, _extends({}, props, {
|
|
135
166
|
filterSource: filterSource
|
|
136
167
|
})), filterSource.length === 0 && /*#__PURE__*/React.createElement("p", {
|
|
137
168
|
className: "".concat(dataSourceCls, "-nodata")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DataSourceProps } from './
|
|
3
|
-
import { TransferItem } from '
|
|
2
|
+
import { DataSourceProps } from './DataSource';
|
|
3
|
+
import { TransferItem } from '.';
|
|
4
4
|
export interface DataSourceListProps<RecordType> extends DataSourceProps<RecordType> {
|
|
5
5
|
filterSource: RecordType[];
|
|
6
6
|
}
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TransferItem, TransferProps } from '
|
|
2
|
+
import { TransferItem, TransferProps } from '.';
|
|
3
3
|
export interface DataSourceProps<RecordType> extends TransferProps<RecordType> {
|
|
4
4
|
tKeys: string[];
|
|
5
5
|
setTKeys: (t: string[]) => void;
|