kui-vue 3.2.5 → 3.2.6-rc
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/_tool/utils.js +9 -3
- package/components/affix/affix.jsx +20 -7
- package/components/avatar/styles/index.less +1 -1
- package/components/base/pop.jsx +7 -4
- package/components/button/styles/index.less +7 -6
- package/components/colorPicker/colorpicker.jsx +27 -15
- package/components/colorPicker/demo/base.md +1 -1
- package/components/colorPicker/demo/index.vue +2 -0
- package/components/colorPicker/demo/shape.md +33 -0
- package/components/colorPicker/index.md +10 -7
- package/components/colorPicker/styles/index.less +30 -13
- package/components/datePicker/datecalendar.jsx +14 -12
- package/components/datePicker/datepicker.jsx +6 -3
- package/components/datePicker/styles/datepicker.less +2 -2
- package/components/drawer/demo/custom.md +1 -1
- package/components/drawer/demo/form.md +1 -1
- package/components/drawer/drawer.jsx +5 -4
- package/components/dropdown/dropdown.jsx +0 -1
- package/components/empty/empty.jsx +2 -1
- package/components/form/form.jsx +1 -1
- package/components/icon/demo/search.vue +2 -2
- package/components/icon/index.md +1 -1
- package/components/index.js +10 -2
- package/components/input/demo/size.md +3 -3
- package/components/input/styles/index.less +5 -5
- package/components/locale/index.js +74 -0
- package/components/locale/lang/de.js +54 -0
- package/components/locale/lang/el.js +71 -0
- package/components/locale/lang/en.js +54 -0
- package/components/locale/lang/fr.js +71 -0
- package/components/locale/lang/it.js +71 -0
- package/components/locale/lang/ja.js +71 -0
- package/components/locale/lang/ko.js +71 -0
- package/components/locale/lang/ru.js +54 -0
- package/components/locale/lang/th.js +71 -0
- package/components/locale/lang/ua.js +54 -0
- package/components/locale/lang/vi.js +54 -0
- package/components/locale/lang/zh-CN.js +54 -0
- package/components/locale/lang/zh-TW.js +54 -0
- package/components/modal/demo/custom.md +1 -1
- package/components/modal/index.js +3 -3
- package/components/modal/modal.jsx +6 -5
- package/components/page/page.jsx +4 -3
- package/components/page/styles/index.less +13 -13
- package/components/popconfirm/popconfirm.jsx +2 -2
- package/components/select/demo/filterable.md +6 -14
- package/components/select/demo/search.md +6 -4
- package/components/select/index.md +20 -19
- package/components/select/select.jsx +7 -4
- package/components/select/styles/index.less +13 -3
- package/components/slider/slider.jsx +6 -4
- package/components/styles/color.less +2 -2
- package/components/table/index.md +4 -3
- package/components/table/table.jsx +2 -1
- package/components/tabs/tabs.jsx +1 -1
- package/components/timeline/demo/base.md +3 -3
- package/components/timeline/demo/icon.md +5 -5
- package/components/timeline/demo/mode.md +12 -6
- package/components/timeline/index.md +7 -6
- package/components/timeline/styles/index.less +40 -13
- package/components/timeline/timeline.jsx +5 -1
- package/components/timeline/timelineitem.jsx +9 -5
- package/components/upload/upload.jsx +4 -3
- package/dist/k-ui.css +7 -1
- package/dist/k-ui.js +2 -2
- package/dist/locale/de.js +8 -0
- package/dist/locale/el.js +8 -0
- package/dist/locale/en.js +8 -0
- package/dist/locale/fr.js +8 -0
- package/dist/locale/it.js +8 -0
- package/dist/locale/ja.js +8 -0
- package/dist/locale/ko.js +8 -0
- package/dist/locale/ru.js +8 -0
- package/dist/locale/th.js +8 -0
- package/dist/locale/ua.js +8 -0
- package/dist/locale/vi.js +8 -0
- package/dist/locale/zhCN.js +8 -0
- package/dist/locale/zhTW.js +8 -0
- package/package.json +4 -3
|
@@ -4,11 +4,12 @@ import Empty from '../empty';
|
|
|
4
4
|
import { hasProp, getChild, isNotEmpty } from '../_tool/utils'
|
|
5
5
|
|
|
6
6
|
import Drop from '../base/drop'
|
|
7
|
+
import { t } from '../locale';
|
|
7
8
|
|
|
8
9
|
export default {
|
|
9
10
|
name: "Select",
|
|
10
11
|
props: {
|
|
11
|
-
placeholder:
|
|
12
|
+
placeholder: String,
|
|
12
13
|
size: {
|
|
13
14
|
default: 'default',
|
|
14
15
|
validator(value) {
|
|
@@ -27,6 +28,7 @@ export default {
|
|
|
27
28
|
showArrow: { type: Boolean, default: true },
|
|
28
29
|
options: Array,
|
|
29
30
|
theme: String,
|
|
31
|
+
emptyText: String,
|
|
30
32
|
icon: String,
|
|
31
33
|
shape: String,
|
|
32
34
|
arrowIcon: { type: String, default: 'chevron-down' },
|
|
@@ -266,7 +268,7 @@ export default {
|
|
|
266
268
|
render() {
|
|
267
269
|
let { disabled, size, multiple,
|
|
268
270
|
opened, placeholder, showArrow, bordered,
|
|
269
|
-
clear, removeTag, queryKey, theme, arrowIcon, icon, shape,filterable,
|
|
271
|
+
clear, removeTag, queryKey, theme, arrowIcon, icon, shape, filterable,
|
|
270
272
|
clearable, label, toggleDrop, transfer } = this
|
|
271
273
|
let childNode = []
|
|
272
274
|
|
|
@@ -305,7 +307,7 @@ export default {
|
|
|
305
307
|
// ? <li class="k-select-empty" onClick={this.emptyClick}><Icon type="albums" /><p class="k-empty-desc">暂无数据</p></li>
|
|
306
308
|
// : childs
|
|
307
309
|
// )
|
|
308
|
-
const loadingNode = <div class="k-select-loading"><Icon type="sync" spin /><span
|
|
310
|
+
const loadingNode = <div class="k-select-loading"><Icon type="sync" spin /><span>{t('k.select.loading')}</span></div>
|
|
309
311
|
const props = {
|
|
310
312
|
ref: 'overlay',
|
|
311
313
|
props: {
|
|
@@ -326,9 +328,10 @@ export default {
|
|
|
326
328
|
}
|
|
327
329
|
}
|
|
328
330
|
}
|
|
329
|
-
let overlay = <Drop {...props}>{this.loading ? loadingNode : (!childs.length ? <Empty onClick={this.emptyClick} /> : <ul>{childs}</ul>)}</Drop>
|
|
331
|
+
let overlay = <Drop {...props}>{this.loading ? loadingNode : (!childs.length ? <Empty onClick={this.emptyClick} description={this.emptyText}/> : <ul>{childs}</ul>)}</Drop>
|
|
330
332
|
|
|
331
333
|
label = multiple ? (label || []) : label
|
|
334
|
+
placeholder = t('k.select.placeholder')
|
|
332
335
|
const placeNode = ((placeholder && ((!label || !label.length) && !queryKey))
|
|
333
336
|
? <div class="k-select-placeholder">{placeholder}</div>
|
|
334
337
|
: null
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
}
|
|
45
45
|
&-search-wrap {
|
|
46
46
|
position: absolute;
|
|
47
|
-
left: 5px;
|
|
47
|
+
// left: 5px;
|
|
48
48
|
z-index: 1;
|
|
49
49
|
top: 50%;
|
|
50
50
|
background: none;
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
padding: 3px 0;
|
|
97
97
|
left: 0;
|
|
98
98
|
top: 0;
|
|
99
|
-
margin: 0;
|
|
99
|
+
margin: 0 0 0 5px;
|
|
100
100
|
vertical-align: middle;
|
|
101
101
|
// .k-select-search {
|
|
102
102
|
// // border: none;
|
|
@@ -255,6 +255,7 @@
|
|
|
255
255
|
.k-select-loading {
|
|
256
256
|
padding: 10px;
|
|
257
257
|
font-size: 14px;
|
|
258
|
+
color: var(--kui-color-font);
|
|
258
259
|
.k-icon {
|
|
259
260
|
font-size: 14px;
|
|
260
261
|
}
|
|
@@ -336,9 +337,10 @@
|
|
|
336
337
|
.k-select-sm {
|
|
337
338
|
.k-select-icon {
|
|
338
339
|
font-size: 14px;
|
|
340
|
+
margin-left: 4px;
|
|
339
341
|
}
|
|
340
342
|
.k-select-selection {
|
|
341
|
-
min-height:
|
|
343
|
+
min-height: 24px;
|
|
342
344
|
}
|
|
343
345
|
.k-select-arrow {
|
|
344
346
|
font-size: 12px;
|
|
@@ -388,6 +390,14 @@
|
|
|
388
390
|
font-size: 12px;
|
|
389
391
|
color: var(--kui-color-font);
|
|
390
392
|
}
|
|
393
|
+
&.k-select-has-icon {
|
|
394
|
+
.k-select-selection > .k-select-search-wrap{
|
|
395
|
+
left: 14px;
|
|
396
|
+
}
|
|
397
|
+
.k-select-placeholder {
|
|
398
|
+
left: 14px;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
391
401
|
}
|
|
392
402
|
|
|
393
403
|
.k-select-lg {
|
|
@@ -18,7 +18,7 @@ export default {
|
|
|
18
18
|
},
|
|
19
19
|
watch: {
|
|
20
20
|
value(v) {
|
|
21
|
-
this.defaultValue = v || this.min
|
|
21
|
+
this.defaultValue = (v || this.min) * 1
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
data() {
|
|
@@ -41,22 +41,24 @@ export default {
|
|
|
41
41
|
},
|
|
42
42
|
render() {
|
|
43
43
|
let { min, max, step, disabled, direction, defaultValue, groupContext } = this
|
|
44
|
+
defaultValue = defaultValue * 1
|
|
45
|
+
console.log(defaultValue)
|
|
44
46
|
let props = {
|
|
45
47
|
class: 'k-slider-bar',
|
|
46
48
|
attrs: {
|
|
47
49
|
min, max, step,
|
|
48
|
-
value: defaultValue,
|
|
50
|
+
value: defaultValue * 1,
|
|
49
51
|
type: 'range',
|
|
50
52
|
disabled,
|
|
51
53
|
},
|
|
52
54
|
style: {
|
|
53
|
-
'background': `linear-gradient(to right,
|
|
55
|
+
'background': `linear-gradient(to right, var(--kui-color-main) ${(defaultValue - min) / (max - min) * 100}%, rgba(255, 255, 255, 0.3) 0%)`
|
|
54
56
|
},
|
|
55
57
|
on: {
|
|
56
58
|
input: this.change
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
|
-
// todo: 懒得写, 用input range
|
|
61
|
+
// todo: 懒得写, 用input range 替代
|
|
60
62
|
return <div class={['k-slider', { 'k-slider-disabled': disabled }]}><input {...props} /></div>
|
|
61
63
|
}
|
|
62
64
|
|
|
@@ -148,8 +148,8 @@
|
|
|
148
148
|
@border-color: rgba(216, 216, 216, 0.5); //边框颜色
|
|
149
149
|
@dark-border-color: rgba(83, 83, 83, 0.5);
|
|
150
150
|
|
|
151
|
-
@disable-border:
|
|
152
|
-
@dark-disable-border:
|
|
151
|
+
@disable-border: rgba(216, 216, 216, 0.4);//禁用边框颜色
|
|
152
|
+
@dark-disable-border: rgba(83, 83, 83, 0.4);
|
|
153
153
|
|
|
154
154
|
@disable-back: #f5f5f5;//禁用背景颜色
|
|
155
155
|
@dark-disable-back: fadeout(@back-color,90%);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
## Table API
|
|
2
2
|
|
|
3
3
|
| 属性 | 说明 | 类型 | 默认值 |
|
|
4
|
-
|
|
4
|
+
| ------------- | ---------------------------------- | --------------------------------------------------- | ----------------------- |
|
|
5
5
|
| bordered | 是否显示边框 | Boolean | false |
|
|
6
6
|
| width | 表格的宽度,超出部分出现滚动条 | Number | - |
|
|
7
7
|
| height | 表格高度,超出部分滚动,头部会固定 | Number | - |
|
|
8
8
|
| size | 值为`small`时展示紧凑模式 | String | - |
|
|
9
|
+
| emptyText | 没有数据时展示的提示 | String | '赞无数据' |
|
|
9
10
|
| loading | 表格异步加载模式 | Boolean | false |
|
|
10
11
|
| data | 显示的结构化数据 | Array | [ ] |
|
|
11
12
|
| columns | 表格列的配置描述, | Array | [ ] |
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
## Column API
|
|
19
20
|
|
|
20
21
|
| 属性 | 说明 | 类型 | 默认值 |
|
|
21
|
-
|
|
22
|
+
| --------- | ------------------------------------------------------------------------------------------------- | ------------------------------ | ------ |
|
|
22
23
|
| title | 列头显示文字 | String | - |
|
|
23
24
|
| key | 对应列内容的字段名 | String | - |
|
|
24
25
|
| width | 列宽 | Number | - |
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
## Data.Item API
|
|
32
33
|
|
|
33
34
|
| 属性 | 说明 | 类型 | 默认值 |
|
|
34
|
-
|
|
35
|
+
| ---------- | ---------------- | ------- | ------ |
|
|
35
36
|
| key | Vue 需要的 key | String | - |
|
|
36
37
|
| \_checked | 选择框是否被选中 | Boolean | false |
|
|
37
38
|
| \_disabled | 选择框是否被禁用 | Boolean | false |
|
|
@@ -22,6 +22,7 @@ export default {
|
|
|
22
22
|
data: { type: Array, default: () => [] }, // 表格数据
|
|
23
23
|
columns: { type: Array, default: () => [] }, // 表格类目
|
|
24
24
|
loading: Boolean,
|
|
25
|
+
emptyText: String,
|
|
25
26
|
},
|
|
26
27
|
data() {
|
|
27
28
|
return {
|
|
@@ -260,7 +261,7 @@ export default {
|
|
|
260
261
|
}
|
|
261
262
|
|
|
262
263
|
if (!data || !data.length) {
|
|
263
|
-
content.push(<Empty />)
|
|
264
|
+
content.push(<Empty description={this.emptyText}/>)
|
|
264
265
|
}
|
|
265
266
|
//custom footer
|
|
266
267
|
if (footer) {
|
package/components/tabs/tabs.jsx
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
<template>
|
|
8
8
|
<div>
|
|
9
9
|
<TimeLine>
|
|
10
|
-
<TimeLineItem
|
|
11
|
-
<TimeLineItem
|
|
12
|
-
<TimeLineItem
|
|
10
|
+
<TimeLineItem time="2020-11-03">发布3.0版本</TimeLineItem>
|
|
11
|
+
<TimeLineItem time="2019-10-25">发布2.0版本</TimeLineItem>
|
|
12
|
+
<TimeLineItem time="2018-10-08">发布1.0版本</TimeLineItem>
|
|
13
13
|
</TimeLine>
|
|
14
14
|
</div>
|
|
15
15
|
</template>
|
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
<template>
|
|
8
8
|
<div>
|
|
9
9
|
<TimeLine>
|
|
10
|
-
<TimeLineItem color="green">优化成吨的改善和体验</TimeLineItem>
|
|
11
|
-
<TimeLineItem color="orange">
|
|
10
|
+
<TimeLineItem color="green" time="2020-11-03">优化成吨的改善和体验</TimeLineItem>
|
|
11
|
+
<TimeLineItem color="orange" time="2020-11-02">
|
|
12
12
|
<p>新增一些很友好的功能</p>
|
|
13
13
|
<p>新增一些很友好的功能</p>
|
|
14
14
|
<p>新增一些很友好的功能</p>
|
|
15
15
|
</TimeLineItem>
|
|
16
|
-
<TimeLineItem icon="ribbon">发布2.0版本</TimeLineItem>
|
|
17
|
-
<TimeLineItem icon="bug" color="red">修复bug</TimeLineItem>
|
|
18
|
-
<TimeLineItem>发布1.0版本</TimeLineItem>
|
|
16
|
+
<TimeLineItem icon="ribbon" color="#3593ff" time="2020-11-01">发布2.0版本</TimeLineItem>
|
|
17
|
+
<TimeLineItem icon="bug" color="red" time="2020-10-03">修复bug</TimeLineItem>
|
|
18
|
+
<TimeLineItem time="2020-10-01">发布1.0版本</TimeLineItem>
|
|
19
19
|
</TimeLine>
|
|
20
20
|
</div>
|
|
21
21
|
</template>
|
|
@@ -9,16 +9,22 @@
|
|
|
9
9
|
<RadioGroup v-model="mode">
|
|
10
10
|
<Radio label="left" value="left" />
|
|
11
11
|
<Radio label="center" value="center" />
|
|
12
|
+
<Radio label="alternate" value="alternate" />
|
|
12
13
|
<Radio label="right" value="right" />
|
|
13
14
|
</RadioGroup>
|
|
14
15
|
<br />
|
|
15
16
|
<br />
|
|
16
17
|
<TimeLine :mode="mode">
|
|
17
|
-
<TimeLineItem color="green">优化成吨的改善和体验</TimeLineItem>
|
|
18
|
-
<TimeLineItem color="orange"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
<TimeLineItem color="green" time="2020-11-03" extra="更多的辅助细节">优化成吨的改善和体验</TimeLineItem>
|
|
19
|
+
<TimeLineItem color="orange" time="2020-11-02">
|
|
20
|
+
<p>新增一些很友好的功能</p>
|
|
21
|
+
<p>新增一些很友好的功能</p>
|
|
22
|
+
<p>新增一些很友好的功能</p>
|
|
23
|
+
<template slot="extra">更多的辅助细节</template>
|
|
24
|
+
</TimeLineItem>
|
|
25
|
+
<TimeLineItem icon="ribbon" color="#3593ff" time="2020-11-01" extra="更多的辅助细节">发布2.0版本</TimeLineItem>
|
|
26
|
+
<TimeLineItem icon="bug" color="red" time="2020-10-03" extra="更多的辅助细节">修复bug</TimeLineItem>
|
|
27
|
+
<TimeLineItem time="2020-10-01" extra="更多的辅助细节">发布1.0版本</TimeLineItem>
|
|
22
28
|
</TimeLine>
|
|
23
29
|
</div>
|
|
24
30
|
</template>
|
|
@@ -26,7 +32,7 @@
|
|
|
26
32
|
export default{
|
|
27
33
|
data(){
|
|
28
34
|
return{
|
|
29
|
-
mode:'
|
|
35
|
+
mode:'left'
|
|
30
36
|
}
|
|
31
37
|
}
|
|
32
38
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
### API
|
|
2
|
-
| 属性
|
|
3
|
-
|
|
4
|
-
| icon | 时间轴 `item` 图标
|
|
5
|
-
| color | 时间轴 `item` 图标颜色
|
|
6
|
-
|
|
|
7
|
-
|
|
|
2
|
+
| 属性 | 说明 | 类型 | 默认值 |
|
|
3
|
+
| ----- | -------------------------------------------------------------------------------------- | ----------- | ------ |
|
|
4
|
+
| icon | 时间轴 `item` 图标 | String | - |
|
|
5
|
+
| color | 时间轴 `item` 图标颜色 | String | - |
|
|
6
|
+
| time | 时间文本 | String | - |
|
|
7
|
+
| extra | 自定义辅助内容 | String,slot | - |
|
|
8
|
+
| mode | 通过设置 `mode` 可以改变时间轴和内容的相对位置 `left` ,`center`, `alternate` , `right` | String | left |
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
padding: 0;
|
|
10
10
|
list-style: none;
|
|
11
11
|
color: var(--kui-color-font);
|
|
12
|
+
width: 100%;
|
|
12
13
|
.k-time-line-item {
|
|
13
14
|
position: relative;
|
|
14
15
|
&:before {
|
|
@@ -26,30 +27,56 @@
|
|
|
26
27
|
}
|
|
27
28
|
.k-time-line-dot {
|
|
28
29
|
position: absolute;
|
|
29
|
-
background: var(--kui-color-back);
|
|
30
|
-
top:
|
|
31
|
-
left:
|
|
30
|
+
// background: var(--kui-color-back);
|
|
31
|
+
top: 2px;
|
|
32
|
+
left: 0;
|
|
32
33
|
font-size: 16px;
|
|
33
|
-
color:
|
|
34
|
+
color: #ccc;
|
|
34
35
|
line-height: 1;
|
|
35
|
-
border-radius: 50%;
|
|
36
|
-
}
|
|
37
|
-
.k-time-line-icon-default {
|
|
38
|
-
font-size: 12px;
|
|
39
|
-
left: 1px;
|
|
40
|
-
top: 5.5px;
|
|
36
|
+
// border-radius: 50%;
|
|
41
37
|
}
|
|
38
|
+
// .k-time-line-icon-default {
|
|
39
|
+
// font-size: 12px;
|
|
40
|
+
// left: 1px;
|
|
41
|
+
// top: 4px;
|
|
42
|
+
// }
|
|
42
43
|
.k-time-line-item-content {
|
|
43
|
-
padding: 0 0 20px
|
|
44
|
-
font-size:
|
|
44
|
+
padding: 0 0 20px 25px;
|
|
45
|
+
font-size: 14px;
|
|
45
46
|
position: relative;
|
|
46
|
-
line-height:
|
|
47
|
+
line-height: 20px;
|
|
47
48
|
top: 0;
|
|
48
49
|
box-sizing: border-box;
|
|
49
50
|
}
|
|
51
|
+
.k-time-line-item-time {
|
|
52
|
+
font-size: 12px;
|
|
53
|
+
color: var(--kui-color-gray-30);
|
|
54
|
+
margin-top: 4px;
|
|
55
|
+
line-height: 16px;
|
|
56
|
+
}
|
|
57
|
+
.k-time-line-item-extra {
|
|
58
|
+
font-size: 12px;
|
|
59
|
+
color: var(--kui-color-gray-30);
|
|
60
|
+
margin-top: 4px;
|
|
61
|
+
line-height: 16px;
|
|
62
|
+
}
|
|
50
63
|
}
|
|
51
64
|
|
|
52
65
|
.k-timeline-center {
|
|
66
|
+
.k-time-line-item {
|
|
67
|
+
width: 50%;
|
|
68
|
+
left: 50%;
|
|
69
|
+
}
|
|
70
|
+
.k-time-line-item-time {
|
|
71
|
+
position: absolute;
|
|
72
|
+
margin-left: calc(-35px - 100%);
|
|
73
|
+
width: 100%;
|
|
74
|
+
text-align: right;
|
|
75
|
+
top: -2px;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.k-timeline-alternate {
|
|
53
80
|
width: 100%;
|
|
54
81
|
display: inline-block;
|
|
55
82
|
.k-time-line-item {
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
export default {
|
|
3
3
|
name: "TimeLine",
|
|
4
4
|
props: {
|
|
5
|
-
mode: {
|
|
5
|
+
mode: {
|
|
6
|
+
type: String, default: 'left', validator: (val) => {
|
|
7
|
+
return ['left', 'right', 'center', 'alternate'].indexOf(val) > -1
|
|
8
|
+
}
|
|
9
|
+
}
|
|
6
10
|
},
|
|
7
11
|
render() {
|
|
8
12
|
const classes = ['k-timeline', `k-timeline-${this.mode}`]
|
|
@@ -3,15 +3,17 @@ export default {
|
|
|
3
3
|
name: "TimeLineItem",
|
|
4
4
|
props: {
|
|
5
5
|
color: String,
|
|
6
|
-
icon: String
|
|
6
|
+
icon: String,
|
|
7
|
+
time: String,
|
|
8
|
+
extra: String,
|
|
7
9
|
},
|
|
8
10
|
render() {
|
|
9
|
-
let { icon, color } = this
|
|
11
|
+
let { icon, color, time } = this
|
|
10
12
|
const styles = { color }
|
|
11
|
-
const type = icon ? icon : "
|
|
13
|
+
const type = icon ? icon : "ellipse";
|
|
12
14
|
const iconNode = this.$slots.dot || <Icon type={type} />
|
|
13
|
-
const iconCls = ['k-time-line-dot'
|
|
14
|
-
|
|
15
|
+
const iconCls = ['k-time-line-dot']
|
|
16
|
+
let extra = this.extra || this.$slots.extra
|
|
15
17
|
return (
|
|
16
18
|
<li class="k-time-line-item">
|
|
17
19
|
<div class={iconCls} style={styles}>
|
|
@@ -19,6 +21,8 @@ export default {
|
|
|
19
21
|
</div>
|
|
20
22
|
<div class="k-time-line-item-content">
|
|
21
23
|
{this.$slots.default}
|
|
24
|
+
{extra && <div class="k-time-line-item-extra">{extra}</div>}
|
|
25
|
+
{time && <div class="k-time-line-item-time">{time}</div>}
|
|
22
26
|
</div>
|
|
23
27
|
</li>
|
|
24
28
|
)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Icon from '../icon'
|
|
2
|
+
import { t } from '../locale'
|
|
2
3
|
import Progress from '../progress'
|
|
3
4
|
import Tooltip from '../tooltip'
|
|
4
5
|
let count = 0
|
|
@@ -130,7 +131,7 @@ export default {
|
|
|
130
131
|
(maxSize !== undefined && maxSize >= 0 && size / 1024 > maxSize)
|
|
131
132
|
) {
|
|
132
133
|
error = true
|
|
133
|
-
item.errorText = '
|
|
134
|
+
item.errorText = t('k.upload.errorFileSize')
|
|
134
135
|
item.status = 'error'
|
|
135
136
|
}
|
|
136
137
|
// if (multiple) {
|
|
@@ -274,7 +275,7 @@ export default {
|
|
|
274
275
|
}
|
|
275
276
|
}
|
|
276
277
|
|
|
277
|
-
let showSelector = (isPicture && limit && limit > defaultFileList.length
|
|
278
|
+
let showSelector = (isPicture && limit && limit > defaultFileList.length) || !isPicture || !limit
|
|
278
279
|
const selector = showSelector ? <div class='k-upload-select'>
|
|
279
280
|
<div class="k-upload-add" {...addProps}>
|
|
280
281
|
<input type="file" class="k-upload-file"
|
|
@@ -292,7 +293,7 @@ export default {
|
|
|
292
293
|
return (showUploadList && !isPicture) || isPicture ? <div class={`k-upload-${isPicture ? 'picture' : 'file'}-list`}>
|
|
293
294
|
{
|
|
294
295
|
defaultFileList.map((item, i) => {
|
|
295
|
-
let statusText = item.status == 'success' ? '
|
|
296
|
+
let statusText = item.status == 'success' ? t('k.upload.successful') : (item.errorText || t('k.upload.failed'))
|
|
296
297
|
delete item.errorText
|
|
297
298
|
item.uid = item.uid || getUuid()
|
|
298
299
|
return (
|