kui-vue 3.4.1 → 3.4.3
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/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/colorPicker/styles/index.less +8 -0
- package/components/datePicker/datepicker.jsx +79 -62
- package/components/datePicker/demo/theme.md +1 -1
- package/components/descriptions/styles/index.less +41 -6
- package/components/drawer/demo/custom.md +2 -2
- package/components/drawer/demo/target.md +1 -1
- package/components/drawer/styles/index.less +2 -2
- 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 +4 -1
- package/components/inputNumber/demo/format.md +1 -1
- package/components/inputNumber/inputNumber.jsx +2 -1
- package/components/inputNumber/styles/index.less +1 -0
- 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/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/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 +1 -1
- package/components/select/demo/clearable.md +30 -22
- package/components/select/demo/icon.md +6 -4
- package/components/select/demo/theme.md +2 -2
- package/components/select/select.jsx +1 -1
- package/components/select/styles/index.less +10 -84
- 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/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 +22 -22
- 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
- /package/{readme.md → README.md} +0 -0
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
<cn>
|
|
2
2
|
#### 组合使用
|
|
3
3
|
组合使用可以直接使用 `RadioGroup` 的 `options` 来赋值,或者结合 `Radio` 来组合使用,通过 `disabled` 可以设置组件是否被禁用
|
|
4
|
-
|
|
4
|
+
> `RadioGroup` 可以直接使用 `options` 来组合,3.0版本增加
|
|
5
5
|
</cn>
|
|
6
6
|
|
|
7
7
|
```vue
|
|
8
8
|
<template>
|
|
9
|
-
<
|
|
10
|
-
<
|
|
9
|
+
<Space vertical align="start">
|
|
10
|
+
<Space>
|
|
11
|
+
<Button @click="data=''" size="small">Clear</Button>
|
|
12
|
+
<Button @click="data='apple'" size="small">Select apple</Button>
|
|
13
|
+
Selected: {{data}}
|
|
14
|
+
</Space>
|
|
11
15
|
<RadioGroup v-model="data">
|
|
12
16
|
<Radio label="Apple" value="apple" />
|
|
13
17
|
<Radio label="Orange" value="orange" />
|
|
@@ -15,13 +19,10 @@
|
|
|
15
19
|
<Radio label="Grape" value="grape" disabled/>
|
|
16
20
|
<Radio label="Pear" value="pear" disabled/>
|
|
17
21
|
</RadioGroup>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<br/>
|
|
21
|
-
<br/>
|
|
22
|
-
<p>{{cities}}</p>
|
|
22
|
+
|
|
23
|
+
{{cities}}
|
|
23
24
|
<RadioGroup :options="options" v-model="cities"/>
|
|
24
|
-
</
|
|
25
|
+
</Space>
|
|
25
26
|
</template>
|
|
26
27
|
<script>
|
|
27
28
|
export default {
|
|
@@ -5,28 +5,36 @@
|
|
|
5
5
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
|
-
<Space vertical>
|
|
9
|
-
<
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</
|
|
29
|
-
|
|
8
|
+
<Space vertical align="start">
|
|
9
|
+
<Space>
|
|
10
|
+
<Select :width="200" clearable v-model="value1">
|
|
11
|
+
<Option value="1" label="Apple" />
|
|
12
|
+
<Option value="2" label="Orange" />
|
|
13
|
+
<Option value="3" label="Banana"/>
|
|
14
|
+
<Option value="4" label="Pear" />
|
|
15
|
+
</Select>
|
|
16
|
+
{{value1}}
|
|
17
|
+
</Space>
|
|
18
|
+
|
|
19
|
+
<Space>
|
|
20
|
+
<Select :width="200" size="small" clearable v-model="value2">
|
|
21
|
+
<Option value="1" label="Apple" />
|
|
22
|
+
<Option value="2" label="Orange" />
|
|
23
|
+
<Option value="3" label="Banana" />
|
|
24
|
+
<Option value="4" label="Pear" />
|
|
25
|
+
</Select>
|
|
26
|
+
{{value2}}
|
|
27
|
+
|
|
28
|
+
</Space>
|
|
29
|
+
<Space>
|
|
30
|
+
<Select :width="200" multiple clearable v-model="value3">
|
|
31
|
+
<Option value="1" label="Apple" />
|
|
32
|
+
<Option value="2" label="Orange" />
|
|
33
|
+
<Option value="3" label="Banana" />
|
|
34
|
+
<Option value="4" label="Pear" />
|
|
35
|
+
</Select>
|
|
36
|
+
{{value3}}
|
|
37
|
+
</Space>
|
|
30
38
|
</Space>
|
|
31
39
|
</template>
|
|
32
40
|
<script>
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
|
-
<Space vertical>
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
<Space vertical align="start">
|
|
9
|
+
<Space>
|
|
10
|
+
<Select :width="200" :icon="Search" v-model="select" theme="light" :arrow-icon="CaretDown" :options="data"/>
|
|
11
|
+
<Button @click="select=''" size="small">Clear</Button>
|
|
12
|
+
<Button @click="select=1" size="small">Choose orange</Button>
|
|
13
|
+
</Space>
|
|
12
14
|
<Select :width="200" :icon="Location" :arrow-icon="ChevronDownCircleOutline">
|
|
13
15
|
<Option :value="1" label="Apple" />
|
|
14
16
|
<Option :value="2" label="Orange" />
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
|
-
<Space vertical>
|
|
9
|
-
<Checkbox v-model="checked" label="
|
|
8
|
+
<Space vertical align="start">
|
|
9
|
+
<Checkbox v-model="checked" label="Circle" />
|
|
10
10
|
<Select :width="256" clearable :icon="Search" theme="light" :shape="checked?'circle':''" :options="options" />
|
|
11
11
|
<Select :width="256" clearable filterable theme="light" :shape="checked?'circle':''" :options="options">
|
|
12
12
|
</Select>
|
|
@@ -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;
|
|
@@ -19,12 +17,11 @@
|
|
|
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;
|
|
21
|
+
|
|
22
22
|
&:hover {
|
|
23
|
-
|
|
24
|
-
border-color: var(--kui-color-main); // border-color: #3bb4f2;
|
|
25
|
-
// border: 1px solid var(--kui-color-border);
|
|
23
|
+
border-color: var(--kui-color-main);
|
|
26
24
|
box-shadow: 0 0 0 2px var(--kui-color-main-90);
|
|
27
|
-
// }
|
|
28
25
|
}
|
|
29
26
|
|
|
30
27
|
&-selection {
|
|
@@ -39,7 +36,6 @@
|
|
|
39
36
|
position: relative;
|
|
40
37
|
min-height: 30px;
|
|
41
38
|
position: relative;
|
|
42
|
-
// transition: all .25s ease-in-out;
|
|
43
39
|
display: inline-flex;
|
|
44
40
|
align-items: center;
|
|
45
41
|
width: 100%;
|
|
@@ -58,15 +54,11 @@
|
|
|
58
54
|
&-search-wrap {
|
|
59
55
|
position: absolute;
|
|
60
56
|
z-index: 1;
|
|
61
|
-
// top: 50%;
|
|
62
57
|
background: none;
|
|
63
|
-
// transform: translateY(-50%);
|
|
64
58
|
overflow: hidden;
|
|
65
59
|
max-width: 100%;
|
|
66
60
|
|
|
67
|
-
// width: 100%;
|
|
68
61
|
.k-select-search {
|
|
69
|
-
// border: 1px solid #eee;
|
|
70
62
|
border: none;
|
|
71
63
|
width: 7px;
|
|
72
64
|
min-width: 7px;
|
|
@@ -98,7 +90,6 @@
|
|
|
98
90
|
line-height: 18px;
|
|
99
91
|
transition: all .25s ease-in-out;
|
|
100
92
|
|
|
101
|
-
// overflow: hidden;
|
|
102
93
|
.k-icon {
|
|
103
94
|
position: absolute;
|
|
104
95
|
right: 3px;
|
|
@@ -118,18 +109,10 @@
|
|
|
118
109
|
display: inline-block;
|
|
119
110
|
position: relative;
|
|
120
111
|
transform: none;
|
|
121
|
-
// padding: 3px 0;
|
|
122
112
|
left: 0;
|
|
123
113
|
top: 0;
|
|
124
114
|
margin: 0;
|
|
125
115
|
vertical-align: middle;
|
|
126
|
-
// .k-select-search {
|
|
127
|
-
// // border: none;
|
|
128
|
-
// top: 50%;
|
|
129
|
-
// transform: translateY(-50%);
|
|
130
|
-
// z-index: 10;
|
|
131
|
-
// position: absolute;
|
|
132
|
-
// }
|
|
133
116
|
}
|
|
134
117
|
}
|
|
135
118
|
|
|
@@ -142,22 +125,15 @@
|
|
|
142
125
|
top: 0;
|
|
143
126
|
z-index: 1;
|
|
144
127
|
font-size: 12px;
|
|
145
|
-
// max-width: 100%;
|
|
146
|
-
// overflow: hidden;
|
|
147
128
|
}
|
|
148
129
|
|
|
149
130
|
&-placeholder {
|
|
150
|
-
// position: absolute;
|
|
151
|
-
// left: 0;
|
|
152
|
-
// top: 0;
|
|
153
131
|
font-size: 14px;
|
|
154
132
|
z-index: 0;
|
|
155
|
-
|
|
133
|
+
line-height: 1.571;
|
|
156
134
|
overflow: hidden;
|
|
157
135
|
text-overflow: ellipsis;
|
|
158
136
|
color: var(--kui-color-disable-color);
|
|
159
|
-
// top: 50%;
|
|
160
|
-
// transform: translateY(-50%);
|
|
161
137
|
white-space: nowrap;
|
|
162
138
|
max-width: 100%;
|
|
163
139
|
box-sizing: border-box;
|
|
@@ -174,16 +150,13 @@
|
|
|
174
150
|
background: transparent;
|
|
175
151
|
box-sizing: border-box;
|
|
176
152
|
width: 100%;
|
|
153
|
+
line-height: 1.571;
|
|
177
154
|
cursor: pointer;
|
|
178
155
|
font-size: 14px;
|
|
179
156
|
transition: font-size .25s ease-in-out;
|
|
180
157
|
}
|
|
181
158
|
|
|
182
159
|
&-arrow {
|
|
183
|
-
// font-size: 18px;
|
|
184
|
-
// position: absolute;
|
|
185
|
-
// top: 50%;
|
|
186
|
-
// right: 9px;
|
|
187
160
|
font-size: 14px;
|
|
188
161
|
box-sizing: border-box;
|
|
189
162
|
transform: rotate(0deg);
|
|
@@ -192,20 +165,18 @@
|
|
|
192
165
|
transition: all .25s ease-in-out;
|
|
193
166
|
color: var(--kui-color-icon);
|
|
194
167
|
margin: 0 8px;
|
|
168
|
+
|
|
195
169
|
#chevron-up {
|
|
196
170
|
transform: rotate(180deg);
|
|
197
171
|
}
|
|
198
172
|
}
|
|
199
173
|
|
|
200
174
|
&-clearable {
|
|
201
|
-
// position: absolute;
|
|
202
|
-
// top: 50%;
|
|
203
|
-
// right: 9px;
|
|
204
|
-
// transform: translateY(-50%);
|
|
205
175
|
display: none;
|
|
206
176
|
font-size: 15px;
|
|
207
177
|
color: var(--kui-color-icon);
|
|
208
178
|
margin: 0 8px;
|
|
179
|
+
|
|
209
180
|
&:hover {
|
|
210
181
|
color: var(--kui-color-font);
|
|
211
182
|
}
|
|
@@ -221,9 +192,7 @@
|
|
|
221
192
|
|
|
222
193
|
|
|
223
194
|
&.k-select-circle {
|
|
224
|
-
// .k-select-selection {
|
|
225
195
|
border-radius: 30px;
|
|
226
|
-
// }
|
|
227
196
|
}
|
|
228
197
|
}
|
|
229
198
|
|
|
@@ -242,27 +211,16 @@
|
|
|
242
211
|
}
|
|
243
212
|
|
|
244
213
|
.k-select-multiple {
|
|
245
|
-
.k-select-selection {
|
|
246
|
-
// padding-left: 4px;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
214
|
.k-select-placeholder {
|
|
250
215
|
position: absolute;
|
|
251
|
-
// padding-left: 4px;
|
|
252
216
|
}
|
|
253
217
|
}
|
|
254
218
|
|
|
255
|
-
.k-select-has-icon {
|
|
256
|
-
.k-select-placeholder {
|
|
257
|
-
// left: 20px;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
219
|
|
|
261
220
|
.k-select-light {
|
|
262
221
|
&.k-select {
|
|
263
222
|
border-color: transparent;
|
|
264
223
|
background: var(--kui-color-gray-80);
|
|
265
|
-
// border-radius: var(--kui-border-radius);
|
|
266
224
|
transition: none;
|
|
267
225
|
box-shadow: none;
|
|
268
226
|
|
|
@@ -367,7 +325,6 @@
|
|
|
367
325
|
|
|
368
326
|
.k-select-item-selected {
|
|
369
327
|
background: var(--kui-color-selected);
|
|
370
|
-
// color: var(--kui-color-main);
|
|
371
328
|
font-weight: 500;
|
|
372
329
|
|
|
373
330
|
&:hover {
|
|
@@ -409,14 +366,8 @@
|
|
|
409
366
|
|
|
410
367
|
.k-select-selection {
|
|
411
368
|
min-height: 22px;
|
|
412
|
-
// padding-left: 5px;
|
|
413
369
|
}
|
|
414
370
|
|
|
415
|
-
// &.k-select-multiple {
|
|
416
|
-
// .k-select-selection {
|
|
417
|
-
// padding-left: 2px;
|
|
418
|
-
// }
|
|
419
|
-
// }
|
|
420
371
|
&.k-select-show-tags {
|
|
421
372
|
padding-left: 2px;
|
|
422
373
|
|
|
@@ -427,12 +378,10 @@
|
|
|
427
378
|
|
|
428
379
|
.k-select-arrow {
|
|
429
380
|
font-size: 12px;
|
|
430
|
-
// right: 5px;
|
|
431
381
|
margin: 0 4px;
|
|
432
382
|
}
|
|
433
383
|
|
|
434
384
|
.k-select-clearable {
|
|
435
|
-
// right: 5px;
|
|
436
385
|
margin: 0 4px;
|
|
437
386
|
font-size: 12px;
|
|
438
387
|
}
|
|
@@ -461,7 +410,6 @@
|
|
|
461
410
|
|
|
462
411
|
.k-select-tag {
|
|
463
412
|
padding: 2px 20px 2px 5px;
|
|
464
|
-
// margin: 2px 3px 2px 0;
|
|
465
413
|
line-height: 1;
|
|
466
414
|
|
|
467
415
|
.k-icon {
|
|
@@ -487,16 +435,6 @@
|
|
|
487
435
|
font-size: 12px;
|
|
488
436
|
color: var(--kui-color-font);
|
|
489
437
|
}
|
|
490
|
-
|
|
491
|
-
&.k-select-has-icon {
|
|
492
|
-
.k-select-selection>.k-select-search-wrap {
|
|
493
|
-
// left: 14px;
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
.k-select-placeholder {
|
|
497
|
-
// left: 14px;
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
438
|
}
|
|
501
439
|
|
|
502
440
|
.k-select-lg {
|
|
@@ -515,11 +453,9 @@
|
|
|
515
453
|
|
|
516
454
|
.k-select-arrow {
|
|
517
455
|
font-size: 18px;
|
|
518
|
-
// right: 10px;
|
|
519
456
|
}
|
|
520
457
|
|
|
521
458
|
.k-select-clearable {
|
|
522
|
-
// right: 10px;
|
|
523
459
|
font-size: 18px;
|
|
524
460
|
}
|
|
525
461
|
|
|
@@ -539,7 +475,6 @@
|
|
|
539
475
|
|
|
540
476
|
.k-select-tag {
|
|
541
477
|
padding: 7px 20px 7px 5px;
|
|
542
|
-
// margin: 4px 8px 4px 0;
|
|
543
478
|
font-size: 14px;
|
|
544
479
|
line-height: 1;
|
|
545
480
|
|
|
@@ -549,7 +484,6 @@
|
|
|
549
484
|
}
|
|
550
485
|
|
|
551
486
|
.k-select-search-wrap {
|
|
552
|
-
// padding: 4px 0;
|
|
553
487
|
|
|
554
488
|
.k-select-search {
|
|
555
489
|
height: 28px;
|
|
@@ -563,19 +497,13 @@
|
|
|
563
497
|
}
|
|
564
498
|
|
|
565
499
|
.k-select-open {
|
|
566
|
-
|
|
567
|
-
border-color: var(--kui-color-main); // border-color: #3bb4f2;
|
|
568
|
-
// box-shadow: 0 0 5px rgba(59, 180, 242, 0.55);
|
|
500
|
+
border-color: var(--kui-color-main);
|
|
569
501
|
box-shadow: 0 0 0 2px var(--kui-color-main-90);
|
|
570
|
-
// }
|
|
571
502
|
|
|
572
503
|
.k-select-label {
|
|
573
504
|
opacity: .5;
|
|
574
505
|
}
|
|
575
506
|
|
|
576
|
-
// .k-select-arrow {
|
|
577
|
-
// transform: translateY(-50%) rotate(180deg);
|
|
578
|
-
// }
|
|
579
507
|
&.k-select-light .k-select-selection {
|
|
580
508
|
box-shadow: none;
|
|
581
509
|
border-color: transparent;
|
|
@@ -600,10 +528,8 @@
|
|
|
600
528
|
|
|
601
529
|
&:hover,
|
|
602
530
|
&:focus {
|
|
603
|
-
// .k-select-selection {
|
|
604
531
|
border-color: var(--kui-color-disable-border);
|
|
605
532
|
box-shadow: none;
|
|
606
|
-
// }
|
|
607
533
|
}
|
|
608
534
|
}
|
|
609
535
|
|
|
@@ -625,8 +551,8 @@
|
|
|
625
551
|
|
|
626
552
|
&:hover,
|
|
627
553
|
&:focus {
|
|
628
|
-
|
|
629
|
-
|
|
554
|
+
border-color: transparent;
|
|
555
|
+
box-shadow: none;
|
|
630
556
|
}
|
|
631
557
|
|
|
632
558
|
.k-select-selection {
|
|
@@ -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>
|
|
@@ -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>
|