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
|
@@ -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);
|
|
@@ -18,10 +18,6 @@
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
// .k-table-thead::-webkit-scrollbar {
|
|
22
|
-
// height: 0;
|
|
23
|
-
// width: 0;
|
|
24
|
-
// }
|
|
25
21
|
|
|
26
22
|
.k-table-cell-fixed-left {
|
|
27
23
|
position: sticky;
|
|
@@ -41,15 +37,16 @@
|
|
|
41
37
|
top: 0;
|
|
42
38
|
z-index: 100;
|
|
43
39
|
border-radius: @radius;
|
|
40
|
+
|
|
44
41
|
.k-spin-loading {
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
border-radius: @radius;
|
|
43
|
+
background-color: var(--kui-color-spin);
|
|
47
44
|
}
|
|
48
45
|
}
|
|
49
46
|
|
|
50
47
|
.k-table-container {
|
|
51
48
|
width: 100%;
|
|
52
|
-
|
|
49
|
+
border-radius: @radius;
|
|
53
50
|
}
|
|
54
51
|
|
|
55
52
|
table {
|
|
@@ -59,17 +56,10 @@
|
|
|
59
56
|
background: var(--kui-color-back);
|
|
60
57
|
margin: 0;
|
|
61
58
|
border-radius: @radius;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
// background: none;
|
|
65
|
-
// }
|
|
59
|
+
|
|
60
|
+
|
|
66
61
|
thead {
|
|
67
62
|
border-bottom: 1px solid var(--kui-color-table-border);
|
|
68
|
-
|
|
69
|
-
.k-table-cell-fixed-left,
|
|
70
|
-
.k-table-cell-fixed-right {
|
|
71
|
-
// background: var(--kui-color-table-header);
|
|
72
|
-
}
|
|
73
63
|
}
|
|
74
64
|
|
|
75
65
|
tr th:first-child {
|
|
@@ -94,8 +84,6 @@
|
|
|
94
84
|
font-size: 14px;
|
|
95
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);
|
|
@@ -103,7 +91,6 @@
|
|
|
103
91
|
|
|
104
92
|
tr>th {
|
|
105
93
|
background: var(--kui-color-table-header);
|
|
106
|
-
// background: #666;
|
|
107
94
|
font-weight: 500;
|
|
108
95
|
overflow-wrap: break-word;
|
|
109
96
|
text-align: left;
|
|
@@ -176,7 +163,6 @@
|
|
|
176
163
|
text-overflow: ellipsis;
|
|
177
164
|
|
|
178
165
|
.k-table-header-title {
|
|
179
|
-
// display: block !important;
|
|
180
166
|
display: inline-block;
|
|
181
167
|
overflow: hidden;
|
|
182
168
|
text-overflow: ellipsis;
|
|
@@ -187,9 +173,11 @@
|
|
|
187
173
|
th.k-table-cell-selection {
|
|
188
174
|
text-align: center;
|
|
189
175
|
padding: 0;
|
|
190
|
-
|
|
176
|
+
|
|
177
|
+
.k-table-header-col {
|
|
191
178
|
justify-content: center;
|
|
192
179
|
}
|
|
180
|
+
|
|
193
181
|
.k-table-header-title {
|
|
194
182
|
align-items: center;
|
|
195
183
|
}
|
|
@@ -252,6 +240,8 @@
|
|
|
252
240
|
padding: 10px;
|
|
253
241
|
border-bottom: 1px solid var(--kui-color-table-border);
|
|
254
242
|
background-color: var(--kui-color-table-header);
|
|
243
|
+
border-bottom-left-radius: @radius;
|
|
244
|
+
border-bottom-right-radius: @radius;
|
|
255
245
|
}
|
|
256
246
|
|
|
257
247
|
th>a,
|
|
@@ -337,6 +327,16 @@
|
|
|
337
327
|
}
|
|
338
328
|
}
|
|
339
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
|
+
|
|
340
340
|
&-bordered {
|
|
341
341
|
border: 1px solid var(--kui-color-table-border);
|
|
342
342
|
border-radius: @radius;
|
|
@@ -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', {
|