@jiaozhiye/qm-design-react 1.12.14 → 1.12.16

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.
@@ -1,392 +1,393 @@
1
- /*
2
- * @Author: 焦质晔
3
- * @Date: 2021-07-23 19:05:57
4
- * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2024-10-29 13:39:17
6
- */
7
- @import '../../style/common';
8
-
9
- @prefix-form: ~'@{qm-prefix}-form';
10
-
11
- .@{prefix-form} {
12
- position: relative;
13
- .ant-form-item {
14
- margin-bottom: @--margin-md + 2px;
15
- .ant-form-item-label {
16
- & > label {
17
- &:has(.ant-select) {
18
- width: 100%;
19
- .ant-select {
20
- text-align: left;
21
- }
22
- }
23
- }
24
- &-wrap {
25
- & > label .text {
26
- line-height: 1.075;
27
- .text-ellipsis-2();
28
- }
29
- }
30
- & > label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before {
31
- margin: 0 2px;
32
- }
33
- }
34
- // placeholder
35
- input::placeholder {
36
- text-align: left;
37
- }
38
- // ant-form-inline
39
- &-with-help {
40
- margin-bottom: @--margin-md + 2px;
41
- }
42
- // valigator
43
- .ant-form-item-explain {
44
- .text-overflow-cut();
45
- display: flex;
46
- gap: @--margin-md;
47
- min-height: auto;
48
- height: @--font-size-sm;
49
- font-size: @--font-size-sm;
50
- line-height: 1;
51
- }
52
- // search
53
- .ant-input-search {
54
- width: calc(100% + 1px);
55
- & > .ant-input-group > .ant-input-group-addon {
56
- line-height: 1;
57
- }
58
- }
59
- // radio-group checkbox-group
60
- .ant-radio-group,
61
- .ant-checkbox-group {
62
- display: inline-flex;
63
- justify-content: flex-start;
64
- flex-wrap: wrap;
65
- row-gap: 4px;
66
- .ant-radio-wrapper,
67
- .ant-checkbox-wrapper {
68
- margin: 0;
69
- margin-right: 20px;
70
- &:last-of-type {
71
- margin-right: 0;
72
- }
73
- }
74
- }
75
- // textarea
76
- .ant-input-textarea-show-count {
77
- position: relative;
78
- &::after {
79
- position: absolute;
80
- right: 3px;
81
- bottom: 0;
82
- margin: 0;
83
- }
84
- }
85
- // input extra
86
- .extra-tooltip {
87
- color: @--text-color-secondary;
88
- vertical-align: -0.4em;
89
- transform: scale(1.2);
90
- }
91
- .extra-text {
92
- height: 100%;
93
- display: flex;
94
- align-items: center;
95
- }
96
- .extra-overflow-cut {
97
- .text-overflow-cut();
98
- }
99
- // select
100
- .ant-select {
101
- width: 100%;
102
- }
103
- // input number
104
- .ant-input-number.right {
105
- input {
106
- text-align: right;
107
- }
108
- &.controls {
109
- input {
110
- padding-right: 30px;
111
- }
112
- }
113
- }
114
- // range input/input-number/search-helper
115
- .site-input-left {
116
- border-right-width: 0;
117
- z-index: 1;
118
- }
119
- .site-input-left:hover,
120
- .site-input-left:focus {
121
- border-right-width: 1px;
122
- }
123
- .site-input-right {
124
- border-left-width: 0;
125
- &.ant-input-search .ant-input-affix-wrapper {
126
- border-left-width: 0;
127
- }
128
- .ant-input-affix-wrapper {
129
- border-top-left-radius: 0;
130
- border-bottom-left-radius: 0;
131
- }
132
- }
133
- .site-input-right:hover,
134
- .site-input-right:focus {
135
- border-left-width: 1px;
136
- &.ant-input-search .ant-input-affix-wrapper {
137
- border-left-width: 1px;
138
- }
139
- }
140
- // search-helper-multiple
141
- .search-helper-multiple {
142
- .ant-input-group > .ant-select:first-child {
143
- z-index: 1;
144
- .ant-select-selector {
145
- border-top-right-radius: 0;
146
- border-bottom-right-radius: 0;
147
- }
148
- }
149
- }
150
- // select-multiple
151
- .ant-select-multiple:not(.ant-select-disabled) {
152
- .ant-select-selection-overflow-item-rest {
153
- cursor: pointer;
154
- * {
155
- pointer-events: none;
156
- }
157
- }
158
- }
159
- }
160
- .ant-form-vertical .ant-form-item {
161
- .ant-form-item-label {
162
- padding-bottom: 4px;
163
- label[title=''] {
164
- justify-content: left;
165
- }
166
- }
167
- }
168
- // ------ size ------
169
- // 40 32 24
170
- &--lg {
171
- }
172
- &--sm {
173
- .ant-form-item {
174
- margin-bottom: @--margin-md;
175
- .ant-form-item-label {
176
- &-wrap {
177
- line-height: 1;
178
- }
179
- }
180
- // valigator
181
- .ant-form-item-control {
182
- // 待优化
183
- & > div:nth-last-of-type(1)[style*='nowrap'] {
184
- transform: scale(0.8334);
185
- transform-origin: 0 50%;
186
- }
187
- }
188
- }
189
- }
190
- &__only-show {
191
- // ...
192
- }
193
- &__compact {
194
- .ant-form-item {
195
- margin-bottom: 4px;
196
- .ant-form-item-control {
197
- & > div:nth-last-of-type(1)[style*='nowrap'] {
198
- display: none !important;
199
- }
200
- }
201
- }
202
- }
203
- }
204
-
205
- .ant-picker-footer-extra {
206
- .ant-tag {
207
- cursor: pointer;
208
- }
209
- }
210
-
211
- // immediate
212
- .@{prefix-form}-immediate {
213
- padding: 5px 15px;
214
- overflow-y: auto !important;
215
- .table {
216
- width: 100%;
217
- th,
218
- td {
219
- height: 32px;
220
- text-align: left;
221
- border-bottom: 1px solid @--border-color-secondary;
222
- }
223
- tbody {
224
- tr td {
225
- cursor: pointer;
226
- }
227
- tr:hover,
228
- tr.active {
229
- background-color: @--primary-1;
230
- }
231
- }
232
- }
233
- // 40 32 24
234
- &--lg {
235
- .table {
236
- th,
237
- td {
238
- height: 40px;
239
- }
240
- }
241
- }
242
- &--sm {
243
- padding: 5px 10px !important;
244
- .table {
245
- th,
246
- td {
247
- height: 24px;
248
- }
249
- }
250
- }
251
- }
252
-
253
- // city-select
254
- .@{prefix-form}-city-select {
255
- padding: 15px 15px 10px;
256
- max-width: 420px;
257
- .container {
258
- .city-drop {
259
- &-toper {
260
- margin-bottom: 10px;
261
- display: flex;
262
- &__type {
263
- display: inline-block;
264
- }
265
- &__search {
266
- margin-left: 10px;
267
- }
268
- }
269
- &-letter {
270
- display: flex;
271
- flex-wrap: wrap;
272
- margin-bottom: 4px;
273
- .tag {
274
- list-style: none;
275
- line-height: 1.75;
276
- font-size: @--font-size-sm;
277
- padding: 0 8px;
278
- margin: 0 4px 4px 0;
279
- border: 1px solid @--border-color-secondary;
280
- border-radius: 2px;
281
- cursor: pointer;
282
- &.actived {
283
- color: @--white;
284
- background-color: @--primary-color;
285
- border-color: @--primary-color;
286
- }
287
- }
288
- }
289
- &-list {
290
- margin-right: -2px;
291
- max-height: 350px;
292
- overflow-y: auto;
293
- dl {
294
- margin: 0;
295
- dt {
296
- float: left;
297
- font-weight: 700;
298
- }
299
- dd {
300
- white-space: normal;
301
- margin-inline-start: 50px;
302
- margin-bottom: 8px;
303
- li {
304
- display: inline-block;
305
- margin-right: 8px;
306
- cursor: pointer;
307
- &:hover {
308
- color: @--primary-color;
309
- }
310
- &.actived {
311
- color: @--primary-color;
312
- }
313
- }
314
- }
315
- }
316
- }
317
- }
318
- }
319
- // 40 32 24
320
- &--lg {
321
- }
322
- &--sm {
323
- padding: 10px 10px 5px !important;
324
- }
325
- }
326
-
327
- // region-select
328
- .@{prefix-form}-region-select {
329
- padding: 10px 15px;
330
- .container {
331
- margin-top: -10px;
332
- .region-box {
333
- display: flex;
334
- flex-wrap: wrap;
335
- width: 440px;
336
- &__item {
337
- margin: 0 5px;
338
- width: 100px;
339
- cursor: pointer;
340
- .text-overflow-cut();
341
- &:hover {
342
- color: @--primary-color;
343
- }
344
- &.actived {
345
- color: @--primary-color;
346
- }
347
- }
348
- }
349
- }
350
- // 40 32 24
351
- &--lg {
352
- }
353
- &--sm {
354
- padding: 15px 10px 5px !important;
355
- }
356
- }
357
-
358
- // fields-filter
359
- .@{prefix-form}-fields-filter {
360
- min-width: 160px;
361
- max-width: 220px;
362
- .reset {
363
- padding-bottom: 2px;
364
- margin-bottom: 4px;
365
- text-align: right;
366
- border-bottom: 1px solid @--border-color-secondary;
367
- .ant-btn-text {
368
- padding: 0 2px;
369
- }
370
- }
371
- .fields-list {
372
- padding: 4px @--padding-md;
373
- ul {
374
- margin: 0;
375
- li.item {
376
- line-height: 1.85;
377
- .text-overflow-cut();
378
- .handle {
379
- padding: 2px;
380
- color: @--text-color-placeholder;
381
- cursor: s-resize;
382
- transform: scale(0.9);
383
- }
384
- }
385
- }
386
- }
387
- &--lg {
388
- }
389
- &--sm {
390
- font-size: @--font-size-sm;
391
- }
392
- }
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 19:05:57
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2024-10-29 13:39:17
6
+ */
7
+ @import '../../style/common';
8
+
9
+ @prefix-form: ~'@{qm-prefix}-form';
10
+
11
+ .@{prefix-form} {
12
+ position: relative;
13
+ .ant-form-item {
14
+ margin-bottom: @--margin-md + 2px;
15
+ .ant-form-item-label {
16
+ & > label:has(.ant-select) {
17
+ width: 100%;
18
+ .ant-select {
19
+ text-align: left;
20
+ }
21
+ }
22
+ & > label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before {
23
+ margin: 0 2px;
24
+ }
25
+ }
26
+ // placeholder
27
+ input::placeholder {
28
+ text-align: left;
29
+ }
30
+ // ant-form-inline
31
+ &-with-help {
32
+ margin-bottom: @--margin-md + 2px;
33
+ }
34
+ // valigator
35
+ .ant-form-item-explain {
36
+ .text-overflow-cut();
37
+ display: flex;
38
+ gap: @--margin-md;
39
+ min-height: auto;
40
+ height: @--font-size-sm;
41
+ font-size: @--font-size-sm;
42
+ line-height: 1;
43
+ }
44
+ // search
45
+ .ant-input-search {
46
+ width: calc(100% + 1px);
47
+ & > .ant-input-group > .ant-input-group-addon {
48
+ line-height: 1;
49
+ }
50
+ }
51
+ // radio-group checkbox-group
52
+ .ant-radio-group,
53
+ .ant-checkbox-group {
54
+ display: inline-flex;
55
+ justify-content: flex-start;
56
+ flex-wrap: wrap;
57
+ row-gap: 4px;
58
+ .ant-radio-wrapper,
59
+ .ant-checkbox-wrapper {
60
+ margin: 0;
61
+ margin-right: 20px;
62
+ &:last-of-type {
63
+ margin-right: 0;
64
+ }
65
+ }
66
+ }
67
+ // textarea
68
+ .ant-input-textarea-show-count {
69
+ position: relative;
70
+ &::after {
71
+ position: absolute;
72
+ right: 3px;
73
+ bottom: 0;
74
+ margin: 0;
75
+ }
76
+ }
77
+ // input extra
78
+ .extra-tooltip {
79
+ color: @--text-color-secondary;
80
+ vertical-align: -0.4em;
81
+ transform: scale(1.2);
82
+ }
83
+ .extra-text {
84
+ height: 100%;
85
+ display: flex;
86
+ align-items: center;
87
+ .text-overflow-cut();
88
+ }
89
+ // select
90
+ .ant-select {
91
+ width: 100%;
92
+ }
93
+ // input number
94
+ .ant-input-number.right {
95
+ input {
96
+ text-align: right;
97
+ }
98
+ &.controls {
99
+ input {
100
+ padding-right: 30px;
101
+ }
102
+ }
103
+ }
104
+ // range input/input-number/search-helper
105
+ .site-input-left {
106
+ border-right-width: 0;
107
+ z-index: 1;
108
+ }
109
+ .site-input-left:hover,
110
+ .site-input-left:focus {
111
+ border-right-width: 1px;
112
+ }
113
+ .site-input-right {
114
+ border-left-width: 0;
115
+ &.ant-input-search .ant-input-affix-wrapper {
116
+ border-left-width: 0;
117
+ }
118
+ .ant-input-affix-wrapper {
119
+ border-top-left-radius: 0;
120
+ border-bottom-left-radius: 0;
121
+ }
122
+ }
123
+ .site-input-right:hover,
124
+ .site-input-right:focus {
125
+ border-left-width: 1px;
126
+ &.ant-input-search .ant-input-affix-wrapper {
127
+ border-left-width: 1px;
128
+ }
129
+ }
130
+ // search-helper-multiple
131
+ .search-helper-multiple {
132
+ .ant-input-group > .ant-select:first-child {
133
+ z-index: 1;
134
+ .ant-select-selector {
135
+ border-top-right-radius: 0;
136
+ border-bottom-right-radius: 0;
137
+ }
138
+ }
139
+ }
140
+ // select-multiple
141
+ .ant-select-multiple:not(.ant-select-disabled) {
142
+ .ant-select-selection-overflow-item-rest {
143
+ cursor: pointer;
144
+ * {
145
+ pointer-events: none;
146
+ }
147
+ }
148
+ }
149
+ }
150
+ .ant-form-vertical .ant-form-item {
151
+ .ant-form-item-label {
152
+ padding-bottom: 4px;
153
+ & > label:has(.ant-select) {
154
+ width: 50%;
155
+ }
156
+ }
157
+ }
158
+ &__label-wrap .ant-form-item {
159
+ .ant-form-item-label > label .text {
160
+ line-height: 1.075;
161
+ .text-ellipsis-2();
162
+ }
163
+ .extra-text {
164
+ line-height: 1.075;
165
+ white-space: normal;
166
+ .text-ellipsis-2();
167
+ }
168
+ }
169
+ // ------ size ------
170
+ // 40 32 24
171
+ &--lg {
172
+ }
173
+ &--sm {
174
+ .ant-form-item {
175
+ margin-bottom: @--margin-md;
176
+ .ant-form-item-label {
177
+ &-wrap {
178
+ line-height: 1;
179
+ }
180
+ }
181
+ // valigator
182
+ .ant-form-item-control {
183
+ // 待优化
184
+ & > div:nth-last-of-type(1)[style*='nowrap'] {
185
+ transform: scale(0.8334);
186
+ transform-origin: 0 50%;
187
+ }
188
+ }
189
+ }
190
+ }
191
+ &__only-show {
192
+ // ...
193
+ }
194
+ &__compact {
195
+ .ant-form-item {
196
+ margin-bottom: 4px;
197
+ .ant-form-item-control {
198
+ & > div:nth-last-of-type(1)[style*='nowrap'] {
199
+ display: none !important;
200
+ }
201
+ }
202
+ }
203
+ }
204
+ }
205
+
206
+ .ant-picker-footer-extra {
207
+ .ant-tag {
208
+ cursor: pointer;
209
+ }
210
+ }
211
+
212
+ // immediate
213
+ .@{prefix-form}-immediate {
214
+ padding: 5px 15px;
215
+ overflow-y: auto !important;
216
+ .table {
217
+ width: 100%;
218
+ th,
219
+ td {
220
+ height: 32px;
221
+ text-align: left;
222
+ border-bottom: 1px solid @--border-color-secondary;
223
+ }
224
+ tbody {
225
+ tr td {
226
+ cursor: pointer;
227
+ }
228
+ tr:hover,
229
+ tr.active {
230
+ background-color: @--primary-1;
231
+ }
232
+ }
233
+ }
234
+ // 40 32 24
235
+ &--lg {
236
+ .table {
237
+ th,
238
+ td {
239
+ height: 40px;
240
+ }
241
+ }
242
+ }
243
+ &--sm {
244
+ padding: 5px 10px !important;
245
+ .table {
246
+ th,
247
+ td {
248
+ height: 24px;
249
+ }
250
+ }
251
+ }
252
+ }
253
+
254
+ // city-select
255
+ .@{prefix-form}-city-select {
256
+ padding: 15px 15px 10px;
257
+ max-width: 420px;
258
+ .container {
259
+ .city-drop {
260
+ &-toper {
261
+ margin-bottom: 10px;
262
+ display: flex;
263
+ &__type {
264
+ display: inline-block;
265
+ }
266
+ &__search {
267
+ margin-left: 10px;
268
+ }
269
+ }
270
+ &-letter {
271
+ display: flex;
272
+ flex-wrap: wrap;
273
+ margin-bottom: 4px;
274
+ .tag {
275
+ list-style: none;
276
+ line-height: 1.75;
277
+ font-size: @--font-size-sm;
278
+ padding: 0 8px;
279
+ margin: 0 4px 4px 0;
280
+ border: 1px solid @--border-color-secondary;
281
+ border-radius: 2px;
282
+ cursor: pointer;
283
+ &.actived {
284
+ color: @--white;
285
+ background-color: @--primary-color;
286
+ border-color: @--primary-color;
287
+ }
288
+ }
289
+ }
290
+ &-list {
291
+ margin-right: -2px;
292
+ max-height: 350px;
293
+ overflow-y: auto;
294
+ dl {
295
+ margin: 0;
296
+ dt {
297
+ float: left;
298
+ font-weight: 700;
299
+ }
300
+ dd {
301
+ white-space: normal;
302
+ margin-inline-start: 50px;
303
+ margin-bottom: 8px;
304
+ li {
305
+ display: inline-block;
306
+ margin-right: 8px;
307
+ cursor: pointer;
308
+ &:hover {
309
+ color: @--primary-color;
310
+ }
311
+ &.actived {
312
+ color: @--primary-color;
313
+ }
314
+ }
315
+ }
316
+ }
317
+ }
318
+ }
319
+ }
320
+ // 40 32 24
321
+ &--lg {
322
+ }
323
+ &--sm {
324
+ padding: 10px 10px 5px !important;
325
+ }
326
+ }
327
+
328
+ // region-select
329
+ .@{prefix-form}-region-select {
330
+ padding: 10px 15px;
331
+ .container {
332
+ margin-top: -10px;
333
+ .region-box {
334
+ display: flex;
335
+ flex-wrap: wrap;
336
+ width: 440px;
337
+ &__item {
338
+ margin: 0 5px;
339
+ width: 100px;
340
+ cursor: pointer;
341
+ .text-overflow-cut();
342
+ &:hover {
343
+ color: @--primary-color;
344
+ }
345
+ &.actived {
346
+ color: @--primary-color;
347
+ }
348
+ }
349
+ }
350
+ }
351
+ // 40 32 24
352
+ &--lg {
353
+ }
354
+ &--sm {
355
+ padding: 15px 10px 5px !important;
356
+ }
357
+ }
358
+
359
+ // fields-filter
360
+ .@{prefix-form}-fields-filter {
361
+ min-width: 160px;
362
+ max-width: 220px;
363
+ .reset {
364
+ padding-bottom: 2px;
365
+ margin-bottom: 4px;
366
+ text-align: right;
367
+ border-bottom: 1px solid @--border-color-secondary;
368
+ .ant-btn-text {
369
+ padding: 0 2px;
370
+ }
371
+ }
372
+ .fields-list {
373
+ padding: 4px @--padding-md;
374
+ ul {
375
+ margin: 0;
376
+ li.item {
377
+ line-height: 1.85;
378
+ .text-overflow-cut();
379
+ .handle {
380
+ padding: 2px;
381
+ color: @--text-color-placeholder;
382
+ cursor: s-resize;
383
+ transform: scale(0.9);
384
+ }
385
+ }
386
+ }
387
+ }
388
+ &--lg {
389
+ }
390
+ &--sm {
391
+ font-size: @--font-size-sm;
392
+ }
393
+ }