kui-vue 3.4.0 → 3.4.2
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/components/base/input.jsx +6 -5
- package/components/button/demo/group.md +22 -17
- package/components/button/styles/index.less +1 -0
- package/components/checkbox/demo/base.md +3 -5
- package/components/checkbox/demo/group-vertical.md +10 -10
- package/components/checkbox/demo/group.md +9 -7
- package/components/checkbox/demo/options.md +2 -2
- package/components/checkbox/styles/index.less +7 -3
- package/components/colorPicker/styles/index.less +8 -0
- package/components/datePicker/datepicker.jsx +78 -62
- package/components/datePicker/demo/theme.md +1 -1
- package/components/datePicker/index.md +0 -1
- package/components/datePicker/styles/datepicker.less +1 -0
- package/components/descriptions/styles/index.less +41 -6
- package/components/drawer/demo/custom.md +2 -2
- package/components/drawer/demo/form.md +4 -2
- package/components/drawer/demo/target.md +1 -1
- package/components/drawer/styles/index.less +10 -3
- package/components/dropdown/index.md +0 -1
- package/components/form/demo/base.md +1 -1
- package/components/form/demo/info.md +23 -1
- package/components/image/demo/errors.md +2 -2
- package/components/image/demo/globle.md +2 -2
- package/components/image/demo/index.vue +1 -0
- package/components/image/image.jsx +3 -1
- package/components/image/preview.jsx +12 -2
- package/components/image/styles/index.less +25 -0
- package/components/input/demo/theme.md +1 -1
- package/components/input/styles/index.less +30 -18
- package/components/inputNumber/demo/format.md +1 -1
- package/components/inputNumber/inputNumber.jsx +2 -1
- package/components/inputNumber/styles/index.less +4 -3
- package/components/locale/lang/de.js +3 -0
- package/components/locale/lang/el.js +3 -0
- package/components/locale/lang/en.js +3 -0
- package/components/locale/lang/fr.js +3 -0
- package/components/locale/lang/it.js +3 -0
- package/components/locale/lang/ja.js +3 -0
- package/components/locale/lang/ko.js +3 -0
- package/components/locale/lang/ru.js +3 -0
- package/components/locale/lang/th.js +3 -0
- package/components/locale/lang/ua.js +3 -0
- package/components/locale/lang/vi.js +3 -0
- package/components/locale/lang/zh-CN.js +3 -0
- package/components/locale/lang/zh-TW.js +3 -0
- package/components/menu/demo/inline.md +4 -4
- package/components/menu/styles/index.less +9 -2
- package/components/modal/styles/index.less +3 -0
- package/components/page/demo/base.md +10 -1
- package/components/page/demo/elevator.md +10 -1
- package/components/page/demo/more.md +10 -1
- package/components/page/demo/size.md +13 -4
- package/components/page/demo/sizer.md +4 -3
- package/components/page/page.jsx +13 -0
- package/components/popconfirm/index.md +0 -1
- package/components/popconfirm/styles/index.less +4 -2
- package/components/poptip/index.md +1 -2
- package/components/poptip/styles/index.less +10 -5
- package/components/radio/demo/base.md +3 -5
- package/components/radio/demo/disabled.md +2 -4
- package/components/radio/demo/group-vertical.md +8 -11
- package/components/radio/demo/group.md +10 -9
- package/components/radio/demo/options.md +2 -2
- package/components/radio/styles/index.less +23 -4
- package/components/select/demo/clearable.md +30 -22
- package/components/select/demo/icon.md +6 -4
- package/components/select/demo/theme.md +4 -4
- package/components/select/index.md +0 -1
- package/components/select/select.jsx +1 -1
- package/components/select/styles/index.less +15 -90
- package/components/styles/color.less +17 -12
- package/components/styles/var.less +7 -0
- package/components/switch/demo/base.md +4 -4
- package/components/switch/demo/disabled.md +7 -9
- package/components/switch/demo/index.vue +1 -6
- package/components/switch/demo/text.md +2 -8
- package/components/table/demo/base-render.md +3 -3
- package/components/table/demo/base.md +3 -1
- package/components/table/demo/custom-header.md +5 -1
- package/components/table/demo/edit.md +34 -12
- package/components/table/demo/expand.md +3 -1
- package/components/table/demo/selection.md +9 -5
- package/components/table/demo/size.md +3 -1
- package/components/table/styles/index.less +100 -51
- package/components/table/table.jsx +1 -1
- package/components/tooltip/index.md +1 -4
- package/components/tooltip/styles/index.less +4 -2
- package/components/tree/styles/index.less +2 -1
- package/components/upload/demo/accept.md +2 -2
- package/components/upload/demo/custom.md +3 -3
- package/components/upload/demo/transform.md +3 -1
- package/components/upload/upload.jsx +12 -1
- package/dist/k-ui.css +2 -2
- package/dist/k-ui.js +2 -2
- package/dist/locale/de.js +2 -2
- package/dist/locale/el.js +2 -2
- package/dist/locale/en.js +2 -2
- package/dist/locale/fr.js +2 -2
- package/dist/locale/it.js +2 -2
- package/dist/locale/ja.js +2 -2
- package/dist/locale/ko.js +2 -2
- package/dist/locale/ru.js +2 -2
- package/dist/locale/th.js +2 -2
- package/dist/locale/ua.js +2 -2
- package/dist/locale/vi.js +2 -2
- package/dist/locale/zhCN.js +2 -2
- package/dist/locale/zhTW.js +2 -2
- package/package.json +1 -1
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
.k-select {
|
|
4
4
|
display: inline-flex;
|
|
5
|
-
// width: 100%;
|
|
6
|
-
// max-width: 100%;
|
|
7
5
|
min-width: 80px;
|
|
8
6
|
box-sizing: border-box;
|
|
9
7
|
vertical-align: middle;
|
|
@@ -14,18 +12,16 @@
|
|
|
14
12
|
box-sizing: border-box;
|
|
15
13
|
flex-shrink: 0;
|
|
16
14
|
align-items: center;
|
|
17
|
-
|
|
15
|
+
background-color: var(--kui-color-back);
|
|
18
16
|
border-radius: var(--kui-border-radius);
|
|
19
17
|
border: 1px solid var(--kui-color-border);
|
|
20
18
|
padding-left: 8px;
|
|
21
19
|
transition: border .3s ease-in-out;
|
|
20
|
+
line-height: 1.571;
|
|
22
21
|
|
|
23
22
|
&:hover {
|
|
24
|
-
|
|
25
|
-
border-color: var(--kui-color-main); // border-color: #3bb4f2;
|
|
26
|
-
// border: 1px solid var(--kui-color-border);
|
|
23
|
+
border-color: var(--kui-color-main);
|
|
27
24
|
box-shadow: 0 0 0 2px var(--kui-color-main-90);
|
|
28
|
-
// }
|
|
29
25
|
}
|
|
30
26
|
|
|
31
27
|
&-selection {
|
|
@@ -38,9 +34,8 @@
|
|
|
38
34
|
user-select: none;
|
|
39
35
|
cursor: pointer;
|
|
40
36
|
position: relative;
|
|
41
|
-
min-height:
|
|
37
|
+
min-height: 30px;
|
|
42
38
|
position: relative;
|
|
43
|
-
// transition: all .25s ease-in-out;
|
|
44
39
|
display: inline-flex;
|
|
45
40
|
align-items: center;
|
|
46
41
|
width: 100%;
|
|
@@ -59,15 +54,11 @@
|
|
|
59
54
|
&-search-wrap {
|
|
60
55
|
position: absolute;
|
|
61
56
|
z-index: 1;
|
|
62
|
-
// top: 50%;
|
|
63
57
|
background: none;
|
|
64
|
-
// transform: translateY(-50%);
|
|
65
58
|
overflow: hidden;
|
|
66
59
|
max-width: 100%;
|
|
67
60
|
|
|
68
|
-
// width: 100%;
|
|
69
61
|
.k-select-search {
|
|
70
|
-
// border: 1px solid #eee;
|
|
71
62
|
border: none;
|
|
72
63
|
width: 7px;
|
|
73
64
|
min-width: 7px;
|
|
@@ -99,7 +90,6 @@
|
|
|
99
90
|
line-height: 18px;
|
|
100
91
|
transition: all .25s ease-in-out;
|
|
101
92
|
|
|
102
|
-
// overflow: hidden;
|
|
103
93
|
.k-icon {
|
|
104
94
|
position: absolute;
|
|
105
95
|
right: 3px;
|
|
@@ -119,18 +109,10 @@
|
|
|
119
109
|
display: inline-block;
|
|
120
110
|
position: relative;
|
|
121
111
|
transform: none;
|
|
122
|
-
// padding: 3px 0;
|
|
123
112
|
left: 0;
|
|
124
113
|
top: 0;
|
|
125
114
|
margin: 0;
|
|
126
115
|
vertical-align: middle;
|
|
127
|
-
// .k-select-search {
|
|
128
|
-
// // border: none;
|
|
129
|
-
// top: 50%;
|
|
130
|
-
// transform: translateY(-50%);
|
|
131
|
-
// z-index: 10;
|
|
132
|
-
// position: absolute;
|
|
133
|
-
// }
|
|
134
116
|
}
|
|
135
117
|
}
|
|
136
118
|
|
|
@@ -143,22 +125,15 @@
|
|
|
143
125
|
top: 0;
|
|
144
126
|
z-index: 1;
|
|
145
127
|
font-size: 12px;
|
|
146
|
-
// max-width: 100%;
|
|
147
|
-
// overflow: hidden;
|
|
148
128
|
}
|
|
149
129
|
|
|
150
130
|
&-placeholder {
|
|
151
|
-
// position: absolute;
|
|
152
|
-
// left: 0;
|
|
153
|
-
// top: 0;
|
|
154
131
|
font-size: 14px;
|
|
155
132
|
z-index: 0;
|
|
156
|
-
|
|
133
|
+
line-height: 1.571;
|
|
157
134
|
overflow: hidden;
|
|
158
135
|
text-overflow: ellipsis;
|
|
159
136
|
color: var(--kui-color-disable-color);
|
|
160
|
-
// top: 50%;
|
|
161
|
-
// transform: translateY(-50%);
|
|
162
137
|
white-space: nowrap;
|
|
163
138
|
max-width: 100%;
|
|
164
139
|
box-sizing: border-box;
|
|
@@ -175,16 +150,13 @@
|
|
|
175
150
|
background: transparent;
|
|
176
151
|
box-sizing: border-box;
|
|
177
152
|
width: 100%;
|
|
153
|
+
line-height: 1.571;
|
|
178
154
|
cursor: pointer;
|
|
179
155
|
font-size: 14px;
|
|
180
156
|
transition: font-size .25s ease-in-out;
|
|
181
157
|
}
|
|
182
158
|
|
|
183
159
|
&-arrow {
|
|
184
|
-
// font-size: 18px;
|
|
185
|
-
// position: absolute;
|
|
186
|
-
// top: 50%;
|
|
187
|
-
// right: 9px;
|
|
188
160
|
font-size: 14px;
|
|
189
161
|
box-sizing: border-box;
|
|
190
162
|
transform: rotate(0deg);
|
|
@@ -193,20 +165,18 @@
|
|
|
193
165
|
transition: all .25s ease-in-out;
|
|
194
166
|
color: var(--kui-color-icon);
|
|
195
167
|
margin: 0 8px;
|
|
168
|
+
|
|
196
169
|
#chevron-up {
|
|
197
170
|
transform: rotate(180deg);
|
|
198
171
|
}
|
|
199
172
|
}
|
|
200
173
|
|
|
201
174
|
&-clearable {
|
|
202
|
-
// position: absolute;
|
|
203
|
-
// top: 50%;
|
|
204
|
-
// right: 9px;
|
|
205
|
-
// transform: translateY(-50%);
|
|
206
175
|
display: none;
|
|
207
176
|
font-size: 15px;
|
|
208
177
|
color: var(--kui-color-icon);
|
|
209
178
|
margin: 0 8px;
|
|
179
|
+
|
|
210
180
|
&:hover {
|
|
211
181
|
color: var(--kui-color-font);
|
|
212
182
|
}
|
|
@@ -222,9 +192,7 @@
|
|
|
222
192
|
|
|
223
193
|
|
|
224
194
|
&.k-select-circle {
|
|
225
|
-
// .k-select-selection {
|
|
226
195
|
border-radius: 30px;
|
|
227
|
-
// }
|
|
228
196
|
}
|
|
229
197
|
}
|
|
230
198
|
|
|
@@ -243,27 +211,16 @@
|
|
|
243
211
|
}
|
|
244
212
|
|
|
245
213
|
.k-select-multiple {
|
|
246
|
-
.k-select-selection {
|
|
247
|
-
// padding-left: 4px;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
214
|
.k-select-placeholder {
|
|
251
215
|
position: absolute;
|
|
252
|
-
// padding-left: 4px;
|
|
253
216
|
}
|
|
254
217
|
}
|
|
255
218
|
|
|
256
|
-
.k-select-has-icon {
|
|
257
|
-
.k-select-placeholder {
|
|
258
|
-
// left: 20px;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
219
|
|
|
262
220
|
.k-select-light {
|
|
263
221
|
&.k-select {
|
|
264
222
|
border-color: transparent;
|
|
265
223
|
background: var(--kui-color-gray-80);
|
|
266
|
-
// border-radius: var(--kui-border-radius);
|
|
267
224
|
transition: none;
|
|
268
225
|
box-shadow: none;
|
|
269
226
|
|
|
@@ -368,7 +325,6 @@
|
|
|
368
325
|
|
|
369
326
|
.k-select-item-selected {
|
|
370
327
|
background: var(--kui-color-selected);
|
|
371
|
-
// color: var(--kui-color-main);
|
|
372
328
|
font-weight: 500;
|
|
373
329
|
|
|
374
330
|
&:hover {
|
|
@@ -409,15 +365,9 @@
|
|
|
409
365
|
}
|
|
410
366
|
|
|
411
367
|
.k-select-selection {
|
|
412
|
-
min-height:
|
|
413
|
-
// padding-left: 5px;
|
|
368
|
+
min-height: 22px;
|
|
414
369
|
}
|
|
415
370
|
|
|
416
|
-
// &.k-select-multiple {
|
|
417
|
-
// .k-select-selection {
|
|
418
|
-
// padding-left: 2px;
|
|
419
|
-
// }
|
|
420
|
-
// }
|
|
421
371
|
&.k-select-show-tags {
|
|
422
372
|
padding-left: 2px;
|
|
423
373
|
|
|
@@ -428,12 +378,10 @@
|
|
|
428
378
|
|
|
429
379
|
.k-select-arrow {
|
|
430
380
|
font-size: 12px;
|
|
431
|
-
// right: 5px;
|
|
432
381
|
margin: 0 4px;
|
|
433
382
|
}
|
|
434
383
|
|
|
435
384
|
.k-select-clearable {
|
|
436
|
-
// right: 5px;
|
|
437
385
|
margin: 0 4px;
|
|
438
386
|
font-size: 12px;
|
|
439
387
|
}
|
|
@@ -462,7 +410,6 @@
|
|
|
462
410
|
|
|
463
411
|
.k-select-tag {
|
|
464
412
|
padding: 2px 20px 2px 5px;
|
|
465
|
-
// margin: 2px 3px 2px 0;
|
|
466
413
|
line-height: 1;
|
|
467
414
|
|
|
468
415
|
.k-icon {
|
|
@@ -488,16 +435,6 @@
|
|
|
488
435
|
font-size: 12px;
|
|
489
436
|
color: var(--kui-color-font);
|
|
490
437
|
}
|
|
491
|
-
|
|
492
|
-
&.k-select-has-icon {
|
|
493
|
-
.k-select-selection>.k-select-search-wrap {
|
|
494
|
-
// left: 14px;
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
.k-select-placeholder {
|
|
498
|
-
// left: 14px;
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
438
|
}
|
|
502
439
|
|
|
503
440
|
.k-select-lg {
|
|
@@ -507,7 +444,7 @@
|
|
|
507
444
|
|
|
508
445
|
.k-select-selection {
|
|
509
446
|
font-size: 16px;
|
|
510
|
-
min-height:
|
|
447
|
+
min-height: 38px;
|
|
511
448
|
}
|
|
512
449
|
|
|
513
450
|
.k-select-icon {
|
|
@@ -516,11 +453,9 @@
|
|
|
516
453
|
|
|
517
454
|
.k-select-arrow {
|
|
518
455
|
font-size: 18px;
|
|
519
|
-
// right: 10px;
|
|
520
456
|
}
|
|
521
457
|
|
|
522
458
|
.k-select-clearable {
|
|
523
|
-
// right: 10px;
|
|
524
459
|
font-size: 18px;
|
|
525
460
|
}
|
|
526
461
|
|
|
@@ -540,7 +475,6 @@
|
|
|
540
475
|
|
|
541
476
|
.k-select-tag {
|
|
542
477
|
padding: 7px 20px 7px 5px;
|
|
543
|
-
// margin: 4px 8px 4px 0;
|
|
544
478
|
font-size: 14px;
|
|
545
479
|
line-height: 1;
|
|
546
480
|
|
|
@@ -550,7 +484,6 @@
|
|
|
550
484
|
}
|
|
551
485
|
|
|
552
486
|
.k-select-search-wrap {
|
|
553
|
-
// padding: 4px 0;
|
|
554
487
|
|
|
555
488
|
.k-select-search {
|
|
556
489
|
height: 28px;
|
|
@@ -564,19 +497,13 @@
|
|
|
564
497
|
}
|
|
565
498
|
|
|
566
499
|
.k-select-open {
|
|
567
|
-
|
|
568
|
-
border-color: var(--kui-color-main); // border-color: #3bb4f2;
|
|
569
|
-
// box-shadow: 0 0 5px rgba(59, 180, 242, 0.55);
|
|
500
|
+
border-color: var(--kui-color-main);
|
|
570
501
|
box-shadow: 0 0 0 2px var(--kui-color-main-90);
|
|
571
|
-
// }
|
|
572
502
|
|
|
573
503
|
.k-select-label {
|
|
574
504
|
opacity: .5;
|
|
575
505
|
}
|
|
576
506
|
|
|
577
|
-
// .k-select-arrow {
|
|
578
|
-
// transform: translateY(-50%) rotate(180deg);
|
|
579
|
-
// }
|
|
580
507
|
&.k-select-light .k-select-selection {
|
|
581
508
|
box-shadow: none;
|
|
582
509
|
border-color: transparent;
|
|
@@ -601,10 +528,8 @@
|
|
|
601
528
|
|
|
602
529
|
&:hover,
|
|
603
530
|
&:focus {
|
|
604
|
-
// .k-select-selection {
|
|
605
531
|
border-color: var(--kui-color-disable-border);
|
|
606
532
|
box-shadow: none;
|
|
607
|
-
// }
|
|
608
533
|
}
|
|
609
534
|
}
|
|
610
535
|
|
|
@@ -621,13 +546,13 @@
|
|
|
621
546
|
}
|
|
622
547
|
|
|
623
548
|
.k-select-borderless {
|
|
549
|
+
border-color: transparent;
|
|
550
|
+
box-shadow: none;
|
|
624
551
|
|
|
625
552
|
&:hover,
|
|
626
553
|
&:focus {
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
box-shadow: none;
|
|
630
|
-
}
|
|
554
|
+
border-color: transparent;
|
|
555
|
+
box-shadow: none;
|
|
631
556
|
}
|
|
632
557
|
|
|
633
558
|
.k-select-selection {
|
|
@@ -140,23 +140,28 @@
|
|
|
140
140
|
|
|
141
141
|
@back-color: #fff; //组件背景
|
|
142
142
|
@back-color-10: #fff;
|
|
143
|
-
@back-color-
|
|
144
|
-
@back-color-
|
|
145
|
-
@back-color-
|
|
146
|
-
@back-color-
|
|
147
|
-
@back-color-
|
|
148
|
-
@back-color-
|
|
143
|
+
@back-color-20: darken(@back-color, 20%);
|
|
144
|
+
@back-color-30: darken(@back-color, 30%);
|
|
145
|
+
@back-color-40: darken(@back-color, 40%);
|
|
146
|
+
@back-color-50: darken(@back-color, 50%);
|
|
147
|
+
@back-color-60: darken(@back-color, 60%);
|
|
148
|
+
@back-color-70: darken(@back-color, 70%);
|
|
149
|
+
@back-color-80: darken(@back-color, 80%);
|
|
150
|
+
@back-color-90: darken(@back-color, 90%);
|
|
149
151
|
|
|
150
152
|
@skeleton-color: @gray-90;
|
|
151
153
|
@skeleton-min-color: @gray-60;
|
|
152
154
|
|
|
153
155
|
@dark-back-color: #1f1f1f;
|
|
154
|
-
@dark-back-color-10: lighten(
|
|
155
|
-
@dark-back-color-
|
|
156
|
-
@dark-back-color-
|
|
157
|
-
@dark-back-color-
|
|
158
|
-
@dark-back-color-
|
|
159
|
-
@dark-back-color-
|
|
156
|
+
@dark-back-color-10: #252525;//lighten(@dark-back-color, 10%);
|
|
157
|
+
@dark-back-color-20: lighten(@dark-back-color, 20%);
|
|
158
|
+
@dark-back-color-30: lighten(@dark-back-color, 30%);
|
|
159
|
+
@dark-back-color-40: lighten(@dark-back-color, 40%);
|
|
160
|
+
@dark-back-color-50: lighten(@dark-back-color, 50%);
|
|
161
|
+
@dark-back-color-60: lighten(@dark-back-color, 60%);
|
|
162
|
+
@dark-back-color-70: lighten(@dark-back-color, 70%);
|
|
163
|
+
@dark-back-color-80: lighten(@dark-back-color, 80%);
|
|
164
|
+
@dark-back-color-90: lighten(@dark-back-color, 90%);
|
|
160
165
|
|
|
161
166
|
@icon-color: rgba(0, 0, 0, .4); //图标颜色
|
|
162
167
|
@dark-icon-color: rgba(255, 255, 255, .4);
|
|
@@ -119,7 +119,9 @@ html,
|
|
|
119
119
|
--kui-color-sub-title: @sub-title-color;
|
|
120
120
|
--kui-color-back: @back-color;
|
|
121
121
|
--kui-color-control-10: @back-color-10;
|
|
122
|
+
--kui-color-control-20: @back-color-20;
|
|
122
123
|
--kui-color-control-30: @back-color-30;
|
|
124
|
+
--kui-color-control-40: @back-color-40;
|
|
123
125
|
--kui-color-control-50: @back-color-50;
|
|
124
126
|
--kui-color-control-60: @back-color-60;
|
|
125
127
|
--kui-color-control-70: @back-color-70;
|
|
@@ -149,8 +151,13 @@ html[theme-mode=dark],
|
|
|
149
151
|
--kui-color-sub-title: @dark-sub-title-color;
|
|
150
152
|
--kui-color-back: @dark-back-color;
|
|
151
153
|
--kui-color-control-10: @dark-back-color-10;
|
|
154
|
+
--kui-color-control-20: @dark-back-color-20;
|
|
152
155
|
--kui-color-control-30: @dark-back-color-30;
|
|
156
|
+
--kui-color-control-40: @dark-back-color-40;
|
|
157
|
+
--kui-color-control-50: @dark-back-color-50;
|
|
153
158
|
--kui-color-control-60: @dark-back-color-60;
|
|
159
|
+
--kui-color-control-70: @dark-back-color-70;
|
|
160
|
+
--kui-color-control-80: @dark-back-color-80;
|
|
154
161
|
--kui-color-control-90: @dark-back-color-90;
|
|
155
162
|
--kui-color-spin: @dark-spin-color;
|
|
156
163
|
--kui-color-icon: @dark-icon-color;
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
|
-
<
|
|
9
|
-
|
|
8
|
+
<Space>
|
|
9
|
+
value:
|
|
10
|
+
{{checked}}
|
|
10
11
|
<Switch v-model="checked" />
|
|
11
12
|
<Button @click="checked=!checked" size="small">{{checked?'Uncheck':'Check'}}</Button>
|
|
12
|
-
<br/>
|
|
13
13
|
<Switch checked />
|
|
14
|
-
</
|
|
14
|
+
</Space>
|
|
15
15
|
</template>
|
|
16
16
|
<script>
|
|
17
17
|
export default{
|
|
@@ -5,19 +5,17 @@
|
|
|
5
5
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
|
-
<
|
|
8
|
+
<Space vertical align="start">
|
|
9
9
|
<Switch disabled />
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
<Space>
|
|
11
|
+
<Switch :disabled="disabled" v-model="checked" />
|
|
12
|
+
<Button size="small" @click="checked=!checked">{{checked?'Uncheck':'Check'}}</Button>
|
|
13
|
+
<Button size="small" @click="disabled=!disabled">{{disabled?'Enable':'Disabled'}}</Button>
|
|
14
|
+
</Space>
|
|
15
15
|
<Switch disabled true-text="Yes" false-text="No" />
|
|
16
|
-
<br />
|
|
17
16
|
<Switch disabled true-text="Yes" false-text="No" checked />
|
|
18
|
-
<br />
|
|
19
17
|
<Switch disabled true-text="Yes" false-text="No" checked size="small"/>
|
|
20
|
-
</
|
|
18
|
+
</Space>
|
|
21
19
|
</template>
|
|
22
20
|
<script>
|
|
23
21
|
export default{
|
|
@@ -5,16 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
|
-
<
|
|
8
|
+
<Space vertical align="start">
|
|
9
9
|
<Switch true-text="Yes" false-text="No" />
|
|
10
|
-
<br />
|
|
11
10
|
<Switch true-text="|" false-text="〇" />
|
|
12
|
-
<br />
|
|
13
11
|
<Switch true-text="|" false-text="〇" checked/>
|
|
14
|
-
<br />
|
|
15
12
|
<Switch true-text="On" false-text="Off" />
|
|
16
|
-
<br />
|
|
17
|
-
<br />
|
|
18
13
|
<Switch>
|
|
19
14
|
<Icon :type="Checkmark" slot="checked"/>
|
|
20
15
|
<Icon :type="Close" slot="unchecked"/>
|
|
@@ -23,12 +18,11 @@
|
|
|
23
18
|
<Icon :type="LogoApple" slot="checked"/>
|
|
24
19
|
<Icon :type="LogoMicrosoft" slot="unchecked"/>
|
|
25
20
|
</Switch>
|
|
26
|
-
<br />
|
|
27
21
|
<Switch>
|
|
28
22
|
<Icon :type="Airplane" slot="unchecked"/>
|
|
29
23
|
<Icon :type="Wifi" slot="checked"/>
|
|
30
24
|
</Switch>
|
|
31
|
-
</
|
|
25
|
+
</Space>
|
|
32
26
|
</template>
|
|
33
27
|
<script>
|
|
34
28
|
import { Checkmark, Close, LogoApple, LogoMicrosoft, Airplane, Wifi } from "kui-icons";
|
|
@@ -37,13 +37,13 @@ export default {
|
|
|
37
37
|
{ title: 'Address', key: 'address' },
|
|
38
38
|
{
|
|
39
39
|
title: 'Tags', key: 'tags', render: (h, { tags }, i) => {
|
|
40
|
-
return tags.map(function (tag) {
|
|
40
|
+
return h('Space',{},[tags.map(function (tag) {
|
|
41
41
|
return h('Tag', {
|
|
42
42
|
props: {
|
|
43
|
-
color: tag == 'Python' ? '
|
|
43
|
+
color: tag == 'Python' ? 'green' : 'blue'
|
|
44
44
|
}
|
|
45
45
|
}, tag)
|
|
46
|
-
})
|
|
46
|
+
})])
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
{
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
<template>
|
|
8
8
|
<Table :data="data" :columns="columns" @row-click="test" :sticky="52">
|
|
9
9
|
<template v-slot:tags="value">
|
|
10
|
-
<
|
|
10
|
+
<Space>
|
|
11
|
+
<Tag v-for="tag in value" :key="tag" :color="tag=='Python'?'green':'blue'">{{tag}}</Tag>
|
|
12
|
+
</Space>
|
|
11
13
|
</template>
|
|
12
14
|
<template v-slot:gender="value">
|
|
13
15
|
<Icon :type="value==1 ? Sunny : Moon" :color="value==1?'blue':'#f50cff'" size="15" />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<cn>
|
|
2
2
|
#### 自定义表头
|
|
3
|
-
一个可以自定义表头的表格
|
|
3
|
+
一个可以自定义表头的表格 , 可以通过 `v-slot:header-` 或者 `renderHeader` 函数定义表头
|
|
4
4
|
</cn>
|
|
5
5
|
|
|
6
6
|
```vue
|
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
<template v-slot:action="value,record,col">
|
|
16
16
|
<Button size="small" @click="e=>show(record)">more</Button>
|
|
17
17
|
</template>
|
|
18
|
+
|
|
19
|
+
<template v-slot:address="value">
|
|
20
|
+
<div style="text-align:right">{{value}}~ align-right</div>
|
|
21
|
+
</template>
|
|
18
22
|
</Table>
|
|
19
23
|
</template>
|
|
20
24
|
<script>
|
|
@@ -7,14 +7,30 @@
|
|
|
7
7
|
<template>
|
|
8
8
|
<Button @click="add">Add</Button>
|
|
9
9
|
<Table :data="data" :columns="columns" bordered :sticky="52">
|
|
10
|
-
<a slot="name" slot-scope="text">
|
|
10
|
+
<a slot="name" slot-scope="text,row">
|
|
11
|
+
<Input v-model="row.name" size="small" v-if="row.isEdit"/>
|
|
12
|
+
<template v-else>{{text}}</template>
|
|
13
|
+
</a>
|
|
14
|
+
<a slot="age" slot-scope="text,row">
|
|
15
|
+
<Input v-model="row.age" size="small" v-if="row.isEdit"/>
|
|
16
|
+
<template v-else>{{text}}</template>
|
|
17
|
+
</a>
|
|
18
|
+
<a slot="address" slot-scope="text,row">
|
|
19
|
+
<Input v-model="row.address" size="small" v-if="row.isEdit"/>
|
|
20
|
+
<template v-else>{{text}}</template>
|
|
21
|
+
</a>
|
|
11
22
|
<template slot="action" slot-scope="text,row,col">
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
@
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
|
|
23
|
+
<Space>
|
|
24
|
+
<Button theme="normal" size="small" type="primary" v-if="!row.isEdit" @click="row.isEdit=true">Edit</Button>
|
|
25
|
+
<Button theme="normal" size="small" type="primary" v-if="row.isEdit" @click="save(row)">Save</Button>
|
|
26
|
+
<Button theme="normal" size="small" type="primary" v-if="row.isEdit" @click="row.isEdit=false">Cancel</Button>
|
|
27
|
+
<Popconfirm
|
|
28
|
+
title="您确认删除这条内容吗?"
|
|
29
|
+
@ok="e=> removeRow(row.key)"
|
|
30
|
+
>
|
|
31
|
+
<Button theme="normal" size="small" type="danger">Delete</Button>
|
|
32
|
+
</Popconfirm>
|
|
33
|
+
</Space>
|
|
18
34
|
</template>
|
|
19
35
|
</Table>
|
|
20
36
|
</template>
|
|
@@ -23,10 +39,10 @@ export default{
|
|
|
23
39
|
data() {
|
|
24
40
|
return {
|
|
25
41
|
data:[
|
|
26
|
-
{ key:'0', name:'Li Lei' ,age:28 , address:'Wu Han Guanggu No. 328' },
|
|
27
|
-
{ key:'1', name:'Liu Hao' ,age:30 , address:'Wu Han Hongshan No. 128' },
|
|
28
|
-
{ key:'2', name:'Hu Cong' ,age:28 , address:'Wu Han Nanhu No. 198' },
|
|
29
|
-
{ key:'3', name:'Chuchur' ,age:32 , address:'Wu Han Nanhu No. 188' },
|
|
42
|
+
{ key:'0', name:'Li Lei' ,age:28 , address:'Wu Han Guanggu No. 328',isEdit:false },
|
|
43
|
+
{ key:'1', name:'Liu Hao' ,age:30 , address:'Wu Han Hongshan No. 128',isEdit:false },
|
|
44
|
+
{ key:'2', name:'Hu Cong' ,age:28 , address:'Wu Han Nanhu No. 198',isEdit:false },
|
|
45
|
+
{ key:'3', name:'Chuchur' ,age:32 , address:'Wu Han Nanhu No. 188',isEdit:false },
|
|
30
46
|
],
|
|
31
47
|
columns:[
|
|
32
48
|
|
|
@@ -39,6 +55,11 @@ export default{
|
|
|
39
55
|
}
|
|
40
56
|
},
|
|
41
57
|
methods:{
|
|
58
|
+
save(row){
|
|
59
|
+
console.log(row)
|
|
60
|
+
row.isEdit = false
|
|
61
|
+
this.$Message.success('Save successfuly!')
|
|
62
|
+
},
|
|
42
63
|
removeRow(key){
|
|
43
64
|
let data = [...this.data]
|
|
44
65
|
this.data = data.filter(item=> item.key != key)
|
|
@@ -50,7 +71,8 @@ export default{
|
|
|
50
71
|
key: count ,
|
|
51
72
|
name: `Name ${count}` ,
|
|
52
73
|
age: 30,
|
|
53
|
-
address: `China Wuhan no.${count}
|
|
74
|
+
address: `China Wuhan no.${count}`,
|
|
75
|
+
isEdit:false
|
|
54
76
|
}
|
|
55
77
|
this.data.push(row)
|
|
56
78
|
this.count = count
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
My name is {{record.name}}, I am {{record.age}} years old, living in {{record.address}}.
|
|
11
11
|
</template>
|
|
12
12
|
<template slot="tags" slot-scope="tags">
|
|
13
|
-
<
|
|
13
|
+
<Space>
|
|
14
|
+
<Tag v-for="tag in tags" :key="tag" :color="tag=='Python'?'green':'blue'">{{tag}}</Tag>
|
|
15
|
+
</Space>
|
|
14
16
|
</template>
|
|
15
17
|
<Icon :type="text==1 ? Moon : Sunny" slot="gender" slot-scope="text" :color="text==1?'blue':'#f50cff'" size="15"/>
|
|
16
18
|
<template slot="action">
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
<template>
|
|
13
13
|
<Table :data="datas" :columns="columns" @on-select="onSelect" @on-change="onChange" ref="selection">
|
|
14
14
|
<template slot="tags" slot-scope="tags">
|
|
15
|
-
<
|
|
15
|
+
<Space>
|
|
16
|
+
<Tag v-for="tag in tags" :key="tag" :color="tag=='Python'?'green':'blue'">{{tag}}</Tag>
|
|
17
|
+
</Space>
|
|
16
18
|
</template>
|
|
17
19
|
<Icon :type="text==1 ? Sunny : Moon" slot="gender" slot-scope="text" :color="text==1?'blue':'#f50cff'" size="15"/>
|
|
18
20
|
<template slot="action">
|
|
@@ -20,10 +22,12 @@
|
|
|
20
22
|
<a href="javascript:;">Delete</a>
|
|
21
23
|
</template>
|
|
22
24
|
</Table>
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
<Space>
|
|
26
|
+
<Button @click="selectAll(true)">Check All</Button>
|
|
27
|
+
<Button @click="changeChecked">Change Checked</Button>
|
|
28
|
+
<Button @click="changeDisabled">Change Disabled</Button>
|
|
29
|
+
<Button @click="selectAll(false)">UnCheck All</Button>
|
|
30
|
+
</Space>
|
|
27
31
|
</template>
|
|
28
32
|
<script>
|
|
29
33
|
import { Sunny, Moon } from "kui-icons";
|
|
@@ -36,7 +36,9 @@
|
|
|
36
36
|
|
|
37
37
|
<Table :data="data" :columns="columns" :loading="loading" :size="size" :bordered="bordered">
|
|
38
38
|
<template v-slot:tags="values">
|
|
39
|
-
<
|
|
39
|
+
<Space>
|
|
40
|
+
<Tag v-for="tag in values" :key="tag" :color="tag=='Python'?'green':'blue'">{{tag}}</Tag>
|
|
41
|
+
</Space>
|
|
40
42
|
</template>
|
|
41
43
|
<Icon :type="text==1 ? Moon : Sunny" slot="gender" slot-scope="text" :color="text==1?'blue':'#f50cff'" size="15" />
|
|
42
44
|
<template v-slot:action>
|