tianheng-ui 0.0.57 → 0.0.59
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/lib/index.js +1 -1
- package/lib/theme-chalk/index.scss +1 -0
- package/lib/theme-chalk/styles/upload.scss +598 -0
- package/lib/tianheng-ui.js +12 -12
- package/package.json +2 -2
- package/packages/Col/index.vue +1 -1
- package/packages/FormMaking/Container.vue +156 -1308
- package/packages/FormMaking/GenerateForm.vue +1 -0
- package/packages/Workflow/index.vue +1 -0
- package/packages/upload/index.vue +1 -1
- package/packages/upload/upload-dragger.vue +1 -1
- package/packages/upload/upload-list.vue +68 -46
@@ -10,7 +10,11 @@
|
|
10
10
|
>
|
11
11
|
<li
|
12
12
|
v-for="file in files"
|
13
|
-
:class="[
|
13
|
+
:class="[
|
14
|
+
'el-upload-list__item',
|
15
|
+
'is-' + file.status,
|
16
|
+
focusing ? 'focusing' : ''
|
17
|
+
]"
|
14
18
|
:key="file.uid"
|
15
19
|
tabindex="0"
|
16
20
|
@keydown.delete="!disabled && $emit('remove', file)"
|
@@ -21,28 +25,46 @@
|
|
21
25
|
<slot :file="file">
|
22
26
|
<img
|
23
27
|
class="el-upload-list__item-thumbnail"
|
24
|
-
v-if="
|
25
|
-
|
26
|
-
|
28
|
+
v-if="
|
29
|
+
file.status !== 'uploading' &&
|
30
|
+
['picture-card', 'picture'].indexOf(listType) > -1
|
31
|
+
"
|
32
|
+
:src="file.url"
|
33
|
+
alt=""
|
34
|
+
/>
|
27
35
|
<a class="el-upload-list__item-name" @click="handleClick(file)">
|
28
|
-
<i class="el-icon-document"></i>{{file.name}}
|
36
|
+
<i class="el-icon-document"></i>{{ file.name }}
|
29
37
|
</a>
|
30
38
|
<label class="el-upload-list__item-status-label">
|
31
|
-
<i
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
39
|
+
<i
|
40
|
+
:class="{
|
41
|
+
'el-icon-upload-success': true,
|
42
|
+
'el-icon-circle-check': listType === 'text',
|
43
|
+
'el-icon-check':
|
44
|
+
['picture-card', 'picture'].indexOf(listType) > -1
|
45
|
+
}"
|
46
|
+
></i>
|
36
47
|
</label>
|
37
|
-
<i
|
38
|
-
|
48
|
+
<i
|
49
|
+
class="el-icon-close"
|
50
|
+
v-if="!disabled"
|
51
|
+
@click="$emit('remove', file)"
|
52
|
+
></i>
|
53
|
+
<i class="el-icon-close-tip" v-if="!disabled">{{
|
54
|
+
t("el.upload.deleteTip")
|
55
|
+
}}</i>
|
56
|
+
<!--因为close按钮只在li:focus的时候 display, li blur后就不存在了,所以键盘导航时永远无法 focus到 close按钮上-->
|
39
57
|
<el-progress
|
40
58
|
v-if="file.status === 'uploading'"
|
41
59
|
:type="listType === 'picture-card' ? 'circle' : 'line'"
|
42
60
|
:stroke-width="listType === 'picture-card' ? 6 : 2"
|
43
|
-
:percentage="parsePercentage(file.percentage)"
|
61
|
+
:percentage="parsePercentage(file.percentage)"
|
62
|
+
>
|
44
63
|
</el-progress>
|
45
|
-
<span
|
64
|
+
<span
|
65
|
+
class="el-upload-list__item-actions"
|
66
|
+
v-if="listType === 'picture-card'"
|
67
|
+
>
|
46
68
|
<span
|
47
69
|
class="el-upload-list__item-preview"
|
48
70
|
v-if="handlePreview && listType === 'picture-card'"
|
@@ -63,39 +85,39 @@
|
|
63
85
|
</transition-group>
|
64
86
|
</template>
|
65
87
|
<script>
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
88
|
+
import Locale from "element-ui/src/mixins/locale";
|
89
|
+
import ElProgress from "element-ui/packages/progress";
|
90
|
+
export default {
|
91
|
+
name: "ThUploadList",
|
92
|
+
mixins: [Locale],
|
93
|
+
data() {
|
94
|
+
return {
|
95
|
+
focusing: false
|
96
|
+
};
|
97
|
+
},
|
98
|
+
components: { ElProgress },
|
77
99
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
}
|
84
|
-
},
|
85
|
-
disabled: {
|
86
|
-
type: Boolean,
|
87
|
-
default: false
|
88
|
-
},
|
89
|
-
handlePreview: Function,
|
90
|
-
listType: String
|
91
|
-
},
|
92
|
-
methods: {
|
93
|
-
parsePercentage(val) {
|
94
|
-
return parseInt(val, 10);
|
95
|
-
},
|
96
|
-
handleClick(file) {
|
97
|
-
this.handlePreview && this.handlePreview(file);
|
100
|
+
props: {
|
101
|
+
files: {
|
102
|
+
type: Array,
|
103
|
+
default() {
|
104
|
+
return [];
|
98
105
|
}
|
106
|
+
},
|
107
|
+
disabled: {
|
108
|
+
type: Boolean,
|
109
|
+
default: false
|
110
|
+
},
|
111
|
+
handlePreview: Function,
|
112
|
+
listType: String
|
113
|
+
},
|
114
|
+
methods: {
|
115
|
+
parsePercentage(val) {
|
116
|
+
return parseInt(val, 10);
|
117
|
+
},
|
118
|
+
handleClick(file) {
|
119
|
+
this.handlePreview && this.handlePreview(file);
|
99
120
|
}
|
100
|
-
}
|
121
|
+
}
|
122
|
+
};
|
101
123
|
</script>
|