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,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
.k-table {
|
|
4
4
|
background: var(--kui-color-back);
|
|
5
|
+
border-radius: @radius;
|
|
5
6
|
width: 100%;
|
|
6
7
|
margin: 10px 0;
|
|
7
|
-
// overflow: auto;
|
|
8
8
|
box-sizing: border-box;
|
|
9
9
|
position: relative;
|
|
10
10
|
color: var(--kui-color-font);
|
|
@@ -16,10 +16,8 @@
|
|
|
16
16
|
z-index: 3;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
// width: 0;
|
|
22
|
-
// }
|
|
19
|
+
|
|
20
|
+
|
|
23
21
|
|
|
24
22
|
.k-table-cell-fixed-left {
|
|
25
23
|
position: sticky;
|
|
@@ -38,15 +36,17 @@
|
|
|
38
36
|
left: 0;
|
|
39
37
|
top: 0;
|
|
40
38
|
z-index: 100;
|
|
39
|
+
border-radius: @radius;
|
|
41
40
|
|
|
42
41
|
.k-spin-loading {
|
|
42
|
+
border-radius: @radius;
|
|
43
43
|
background-color: var(--kui-color-spin);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.k-table-container {
|
|
48
48
|
width: 100%;
|
|
49
|
-
|
|
49
|
+
border-radius: @radius;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
table {
|
|
@@ -55,54 +55,54 @@
|
|
|
55
55
|
border-spacing: 0;
|
|
56
56
|
background: var(--kui-color-back);
|
|
57
57
|
margin: 0;
|
|
58
|
+
border-radius: @radius;
|
|
59
|
+
|
|
58
60
|
|
|
59
|
-
// tr{
|
|
60
|
-
// border: none;
|
|
61
|
-
// background: none;
|
|
62
|
-
// }
|
|
63
61
|
thead {
|
|
64
|
-
background: var(--kui-color-table-header);
|
|
65
62
|
border-bottom: 1px solid var(--kui-color-table-border);
|
|
66
|
-
|
|
67
|
-
.k-table-cell-fixed-left,
|
|
68
|
-
.k-table-cell-fixed-right {
|
|
69
|
-
background: var(--kui-color-table-header);
|
|
70
|
-
}
|
|
71
63
|
}
|
|
72
64
|
|
|
73
|
-
tr
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
text-align: left;
|
|
65
|
+
tr th:first-child {
|
|
66
|
+
border-top-left-radius: @radius;
|
|
67
|
+
}
|
|
77
68
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
69
|
+
tr th:last-child {
|
|
70
|
+
border-top-right-radius: @radius;
|
|
81
71
|
}
|
|
82
72
|
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
83
76
|
.k-table {
|
|
84
77
|
margin: -10px -10px -11px -10px
|
|
85
78
|
}
|
|
86
79
|
|
|
87
|
-
|
|
88
|
-
text-align: center;
|
|
89
|
-
padding: 0;
|
|
90
|
-
}
|
|
80
|
+
|
|
91
81
|
|
|
92
82
|
tr>th,
|
|
93
83
|
tr>td {
|
|
94
84
|
font-size: 14px;
|
|
95
|
-
padding: 10px;
|
|
85
|
+
padding: 10px 16px;
|
|
96
86
|
box-sizing: border-box;
|
|
97
|
-
// overflow-wrap: break-word;
|
|
98
|
-
// word-wrap: break-word;
|
|
99
87
|
word-break: break-all;
|
|
100
88
|
word-wrap: break-word;
|
|
101
89
|
border-bottom: 1px solid var(--kui-color-table-border);
|
|
102
90
|
}
|
|
103
91
|
|
|
92
|
+
tr>th {
|
|
93
|
+
background: var(--kui-color-table-header);
|
|
94
|
+
font-weight: 500;
|
|
95
|
+
overflow-wrap: break-word;
|
|
96
|
+
text-align: left;
|
|
97
|
+
padding: 16px;
|
|
98
|
+
|
|
99
|
+
&[colspan]:not([colspan="1"]) {
|
|
100
|
+
text-align: center;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
104
|
.k-table-header-col {
|
|
105
|
-
display:
|
|
105
|
+
display: flex;
|
|
106
106
|
max-width: 100%;
|
|
107
107
|
|
|
108
108
|
.k-table-header-title {
|
|
@@ -112,18 +112,6 @@
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
.k-table-cell-ellipsis {
|
|
116
|
-
white-space: nowrap;
|
|
117
|
-
overflow: hidden;
|
|
118
|
-
text-overflow: ellipsis;
|
|
119
|
-
|
|
120
|
-
.k-table-header-title ,span {
|
|
121
|
-
display: block !important;
|
|
122
|
-
overflow: hidden;
|
|
123
|
-
text-overflow: ellipsis;
|
|
124
|
-
white-space: nowrap;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
115
|
|
|
128
116
|
.k-table-cell-sorter {
|
|
129
117
|
cursor: pointer;
|
|
@@ -135,12 +123,14 @@
|
|
|
135
123
|
align-items: center;
|
|
136
124
|
line-height: 1;
|
|
137
125
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
126
|
+
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.k-table-header-title {
|
|
130
|
+
flex: 1;
|
|
131
|
+
display: flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
line-height: 1;
|
|
144
134
|
}
|
|
145
135
|
|
|
146
136
|
&:hover {
|
|
@@ -167,6 +157,32 @@
|
|
|
167
157
|
}
|
|
168
158
|
}
|
|
169
159
|
|
|
160
|
+
.k-table-cell-ellipsis {
|
|
161
|
+
white-space: nowrap;
|
|
162
|
+
overflow: hidden;
|
|
163
|
+
text-overflow: ellipsis;
|
|
164
|
+
|
|
165
|
+
.k-table-header-title {
|
|
166
|
+
display: inline-block;
|
|
167
|
+
overflow: hidden;
|
|
168
|
+
text-overflow: ellipsis;
|
|
169
|
+
white-space: nowrap;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
th.k-table-cell-selection {
|
|
174
|
+
text-align: center;
|
|
175
|
+
padding: 0;
|
|
176
|
+
|
|
177
|
+
.k-table-header-col {
|
|
178
|
+
justify-content: center;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.k-table-header-title {
|
|
182
|
+
align-items: center;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
170
186
|
tbody>tr {
|
|
171
187
|
|
|
172
188
|
.k-table-cell-fixed-left,
|
|
@@ -201,6 +217,16 @@
|
|
|
201
217
|
}
|
|
202
218
|
}
|
|
203
219
|
|
|
220
|
+
.k-table-thead {
|
|
221
|
+
border-top-left-radius: @radius;
|
|
222
|
+
border-top-right-radius: @radius;
|
|
223
|
+
|
|
224
|
+
tr th:first-child,
|
|
225
|
+
tr th:last-child {
|
|
226
|
+
border-radius: 0;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
204
230
|
&-thead {
|
|
205
231
|
overflow: auto;
|
|
206
232
|
}
|
|
@@ -214,6 +240,8 @@
|
|
|
214
240
|
padding: 10px;
|
|
215
241
|
border-bottom: 1px solid var(--kui-color-table-border);
|
|
216
242
|
background-color: var(--kui-color-table-header);
|
|
243
|
+
border-bottom-left-radius: @radius;
|
|
244
|
+
border-bottom-right-radius: @radius;
|
|
217
245
|
}
|
|
218
246
|
|
|
219
247
|
th>a,
|
|
@@ -276,7 +304,10 @@
|
|
|
276
304
|
&-sm {
|
|
277
305
|
table tr {
|
|
278
306
|
|
|
279
|
-
th
|
|
307
|
+
th {
|
|
308
|
+
padding: 10px 8px;
|
|
309
|
+
}
|
|
310
|
+
|
|
280
311
|
td {
|
|
281
312
|
padding: 5px 8px;
|
|
282
313
|
}
|
|
@@ -286,19 +317,35 @@
|
|
|
286
317
|
&-lg {
|
|
287
318
|
table tr {
|
|
288
319
|
|
|
289
|
-
th
|
|
320
|
+
th {
|
|
321
|
+
padding: 20px 16px;
|
|
322
|
+
}
|
|
323
|
+
|
|
290
324
|
td {
|
|
291
325
|
padding: 16px;
|
|
292
326
|
}
|
|
293
327
|
}
|
|
294
328
|
}
|
|
295
329
|
|
|
330
|
+
.k-table-header+.k-table-container {
|
|
331
|
+
table tr th:first-child {
|
|
332
|
+
border-radius: 0;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
table tr th:last-child {
|
|
336
|
+
border-radius: 0;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
296
340
|
&-bordered {
|
|
297
341
|
border: 1px solid var(--kui-color-table-border);
|
|
342
|
+
border-radius: @radius;
|
|
298
343
|
|
|
299
344
|
.k-table-footer {
|
|
300
345
|
border-top: 1px solid var(--kui-color-table-border);
|
|
301
346
|
border-bottom: none;
|
|
347
|
+
border-bottom-left-radius: @radius;
|
|
348
|
+
border-bottom-right-radius: @radius;
|
|
302
349
|
}
|
|
303
350
|
|
|
304
351
|
thead {
|
|
@@ -311,6 +358,8 @@
|
|
|
311
358
|
.k-table-header {
|
|
312
359
|
border-bottom: 1px solid var(--kui-color-table-border);
|
|
313
360
|
border-top: none;
|
|
361
|
+
border-top-left-radius: @radius;
|
|
362
|
+
border-top-right-radius: @radius;
|
|
314
363
|
}
|
|
315
364
|
|
|
316
365
|
th,
|
|
@@ -144,7 +144,7 @@ export default {
|
|
|
144
144
|
}
|
|
145
145
|
})
|
|
146
146
|
if (expandNode) {
|
|
147
|
-
tr.unshift(<td class="k-table-row-expand-icon-cell"><
|
|
147
|
+
tr.unshift(<td class="k-table-row-expand-icon-cell"><Button size="small" onClick={e => this.onExpand(d)} icon={d._expanded ? Remove : Add} /></td>)
|
|
148
148
|
}
|
|
149
149
|
let trProps = {
|
|
150
150
|
class: { 'k-table-row-hover': d._hover },
|
|
@@ -4,7 +4,4 @@
|
|
|
4
4
|
| title | 显示的标题 | String,Slots | - |
|
|
5
5
|
| color | 背景颜色 | String | - |
|
|
6
6
|
| placement | 提示框出现的位置,可选值为`top`,`top-left`,`top-right`,`bottom`,`bottom-left`,`bottom-right`,`left`,`left-top`,`left-bottom`,`right`,`right-top`,`right-bottom` | String | top |
|
|
7
|
-
| width | 展示的宽度,默认为内容区域的大小 | String | - |
|
|
8
|
-
| transfer | 默认渲染到body 上,如定位有问题,请尝试修改为 false | Boolean | true |
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
| width | 展示的宽度,默认为内容区域的大小 | String | - |
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
.k-tooltip-content {
|
|
14
14
|
// min-width: 200px;
|
|
15
15
|
// .k-tooltip-inner {
|
|
16
|
-
background: @dark-back-color-10; // var(--kui-color-control-10);
|
|
16
|
+
// background: @dark-back-color-10; // var(--kui-color-control-10);
|
|
17
|
+
background: #333; // var(--kui-color-control-10);
|
|
17
18
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
18
19
|
color: #fff; //var(--kui-color-font);
|
|
19
20
|
border-radius: 8px; // var(--kui-border-radius);
|
|
@@ -34,7 +35,8 @@
|
|
|
34
35
|
display: flex;
|
|
35
36
|
width: 24px;
|
|
36
37
|
height: 7px;
|
|
37
|
-
color: @dark-back-color-10;
|
|
38
|
+
// color: @dark-back-color-10;
|
|
39
|
+
color: #333;
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
&[k-placement^=top] {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
#### 上传文件类型
|
|
3
3
|
通过 accept 属性(input的原生html` 属性)可以限制上传的文件类型。
|
|
4
4
|
accept 支持传入以下两种类型字符串:
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
文件后缀名集合(推荐),如 .jpg、.png 等;
|
|
6
|
+
文件类型的 MIME types 集合,可参考[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types) 文档
|
|
7
7
|
>例如只允许用户上传 PNG 和 PDF 文件,accept 可以这样写: accept = '.pdf,.png' 或 accept = 'application/pdf,image/png'(将 PNG 与 PDF 的 MIME type 通过,连接起来即可)。
|
|
8
8
|
</cn>
|
|
9
9
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<cn>
|
|
2
2
|
#### 手动上传/自定义属性
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
通过设置 data、headers 可添加自定义上传属性
|
|
4
|
+
autoTrigger='false',选中文件后将不会自动触发上传。需要手动调用 ref 上的 upload 方法触发
|
|
5
|
+
name 为上传文件名
|
|
6
6
|
</cn>
|
|
7
7
|
|
|
8
8
|
```vue
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
<cn>
|
|
3
3
|
#### 上传前处理图片
|
|
4
|
-
利用 transformFile 可以在文件上传前处理文件,
|
|
4
|
+
利用 transformFile 可以在文件上传前处理文件, 上传之前压缩等
|
|
5
5
|
</cn>
|
|
6
6
|
|
|
7
7
|
```vue
|
|
@@ -38,11 +38,13 @@ export default{
|
|
|
38
38
|
const ctx = canvas.getContext('2d', { willReadFrequently: true });
|
|
39
39
|
|
|
40
40
|
const img = new Image();
|
|
41
|
+
const filename = file.name
|
|
41
42
|
img.onload = function () {
|
|
42
43
|
canvas.width = 200;
|
|
43
44
|
canvas.height = 300;
|
|
44
45
|
ctx.drawImage(img, (img.width - canvas.width) / 2, (img.height - canvas.height) / 2, canvas.width, canvas.height);
|
|
45
46
|
// canvas to file obj
|
|
47
|
+
let data = canvas.toDataURL('image/png');
|
|
46
48
|
var arr = data.split(','),
|
|
47
49
|
mime = arr[0].match(/:(.*?);/)[1],
|
|
48
50
|
bstr = atob(arr[1]),
|
|
@@ -219,9 +219,20 @@ export default {
|
|
|
219
219
|
event
|
|
220
220
|
})
|
|
221
221
|
}
|
|
222
|
+
xhr.onload = (e) => {
|
|
223
|
+
if (xhr.status != 200) {
|
|
224
|
+
item.status = 'error'
|
|
225
|
+
delete this.uploadTemp[item.uid]
|
|
226
|
+
|
|
227
|
+
this.$emit('change', {
|
|
228
|
+
file: Object.assign(item, { response: xhr.responseText }),
|
|
229
|
+
fileList: this.defaultFileList,
|
|
230
|
+
event: event
|
|
231
|
+
})
|
|
232
|
+
}
|
|
233
|
+
}
|
|
222
234
|
xhr.onerror = event => {
|
|
223
235
|
item.status = 'error'
|
|
224
|
-
|
|
225
236
|
delete this.uploadTemp[item.uid]
|
|
226
237
|
|
|
227
238
|
this.$emit('change', {
|