xianniu-ui 0.8.42 → 0.8.43
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/xianniu-ui.common.js +39 -33
- package/lib/xianniu-ui.umd.js +39 -33
- package/lib/xianniu-ui.umd.min.js +7 -7
- package/package.json +1 -1
- package/packages/upload/main.vue +116 -113
package/package.json
CHANGED
package/packages/upload/main.vue
CHANGED
|
@@ -38,127 +38,130 @@
|
|
|
38
38
|
</slot>
|
|
39
39
|
</template>
|
|
40
40
|
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
v-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
type="line"
|
|
70
|
-
:stroke-width="2"
|
|
71
|
-
:percentage="process(file.percentage || 0)"
|
|
72
|
-
>
|
|
73
|
-
</el-progress>
|
|
74
|
-
<label
|
|
75
|
-
v-if="file.status === 'success'"
|
|
76
|
-
class="el-upload-list__item-status-label"
|
|
41
|
+
<div slot="file" slot-scope="{ file }" :class="{'xn-upload--slot':['picture-card', 'idcard'].includes(listType)}">
|
|
42
|
+
<template v-if="['list'].includes(listType)">
|
|
43
|
+
<a
|
|
44
|
+
class="el-upload-list__item-name"
|
|
45
|
+
@click="handlePictureCardPreview(file)"
|
|
46
|
+
v-if="$utils.isImg(file)"
|
|
47
|
+
><i class="el-icon-document"></i>{{ file.name }}
|
|
48
|
+
</a>
|
|
49
|
+
<a
|
|
50
|
+
class="el-upload-list__item-name"
|
|
51
|
+
@click="handleAVPreview(file)"
|
|
52
|
+
v-else-if="$utils.isAV(file)"
|
|
53
|
+
><i class="el-icon-document"></i>{{ file.name }}
|
|
54
|
+
</a>
|
|
55
|
+
<a
|
|
56
|
+
class="el-upload-list__item-name"
|
|
57
|
+
@click="handleDownload(file)"
|
|
58
|
+
v-else
|
|
59
|
+
><i class="el-icon-document"></i>{{ file.name }}
|
|
60
|
+
</a>
|
|
61
|
+
<a class="el-upload-list__item-name" v-if="file.status === 'uploading'"
|
|
62
|
+
><i class="el-icon-document"></i>{{ file.name }}
|
|
63
|
+
</a>
|
|
64
|
+
<el-progress
|
|
65
|
+
v-if="file.status === 'uploading'"
|
|
66
|
+
type="line"
|
|
67
|
+
:stroke-width="2"
|
|
68
|
+
:percentage="process(file.percentage || 0)"
|
|
77
69
|
>
|
|
70
|
+
</el-progress>
|
|
71
|
+
<label
|
|
72
|
+
v-if="file.status === 'success'"
|
|
73
|
+
class="el-upload-list__item-status-label"
|
|
74
|
+
>
|
|
75
|
+
<i
|
|
76
|
+
:class="{
|
|
77
|
+
'el-icon-upload-success': true,
|
|
78
|
+
'el-icon-circle-check': true,
|
|
79
|
+
}"
|
|
80
|
+
></i>
|
|
81
|
+
</label>
|
|
78
82
|
<i
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
></i>
|
|
84
|
-
</label>
|
|
85
|
-
<i
|
|
86
|
-
class="el-icon-close"
|
|
87
|
-
@click="handleRemove(file, fileList)"
|
|
88
|
-
v-if="allowDelete || ($attrs.disabled==null && !preview) || hideUpload"
|
|
89
|
-
></i>
|
|
90
|
-
</template>
|
|
91
|
-
<div
|
|
92
|
-
slot="file"
|
|
93
|
-
slot-scope="{ file }"
|
|
94
|
-
class="xn-upload--slot"
|
|
95
|
-
v-else-if="['picture-card', 'idcard'].includes(listType)"
|
|
96
|
-
>
|
|
97
|
-
<uploadPop :file="file" @on-download="handleDownload(file)"></uploadPop>
|
|
98
|
-
<template v-if="$utils.isImg(file)">
|
|
99
|
-
<el-image
|
|
100
|
-
class="el-upload-list__item-thumbnail"
|
|
101
|
-
:src="file.url"
|
|
102
|
-
fit="cover"
|
|
103
|
-
/>
|
|
104
|
-
</template>
|
|
105
|
-
<template v-else-if="$utils.isAV(file)">
|
|
106
|
-
<el-image
|
|
107
|
-
class="el-upload-list__item-thumbnail"
|
|
108
|
-
:src="
|
|
109
|
-
file.url +
|
|
110
|
-
'?x-oss-process=video/snapshot,t_0,f_jpg,w_0,h_0,m_fast,ar_auto'
|
|
83
|
+
class="el-icon-close"
|
|
84
|
+
@click="handleRemove(file, fileList)"
|
|
85
|
+
v-if="
|
|
86
|
+
allowDelete || ($attrs.disabled == null && !preview) || hideUpload
|
|
111
87
|
"
|
|
112
|
-
|
|
113
|
-
/>
|
|
88
|
+
></i>
|
|
114
89
|
</template>
|
|
115
|
-
<template v-
|
|
116
|
-
<
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
90
|
+
<template v-if="['picture-card', 'idcard'].includes(listType)">
|
|
91
|
+
<uploadPop :file="file" @on-download="handleDownload(file)"></uploadPop>
|
|
92
|
+
<template v-if="$utils.isImg(file)">
|
|
93
|
+
<el-image
|
|
94
|
+
class="el-upload-list__item-thumbnail"
|
|
95
|
+
:src="file.url"
|
|
96
|
+
fit="cover"
|
|
97
|
+
/>
|
|
98
|
+
</template>
|
|
99
|
+
<template v-else-if="$utils.isAV(file)">
|
|
100
|
+
<el-image
|
|
101
|
+
class="el-upload-list__item-thumbnail"
|
|
102
|
+
:src="
|
|
103
|
+
file.url +
|
|
104
|
+
'?x-oss-process=video/snapshot,t_0,f_jpg,w_0,h_0,m_fast,ar_auto'
|
|
105
|
+
"
|
|
106
|
+
fit="cover"
|
|
107
|
+
/>
|
|
108
|
+
</template>
|
|
109
|
+
<template v-else>
|
|
110
|
+
<div class="xn-upload-list__item-file">
|
|
111
|
+
<div class="annex">
|
|
112
|
+
<i class="el-icon el-icon-folder" />
|
|
113
|
+
<span class="label">附件</span>
|
|
114
|
+
</div>
|
|
115
|
+
<div class="file-name">{{ file.name }}</div>
|
|
120
116
|
</div>
|
|
121
|
-
|
|
117
|
+
</template>
|
|
118
|
+
<div v-if="file.status === 'uploading'" class="process">
|
|
119
|
+
<el-progress
|
|
120
|
+
:status="file.percentage === 100 && !isUploading ? 'success' : null"
|
|
121
|
+
type="circle"
|
|
122
|
+
:percentage="process(file.percentage || 0)"
|
|
123
|
+
:stroke-width="6"
|
|
124
|
+
/>
|
|
122
125
|
</div>
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
<
|
|
126
|
+
<span class="el-upload-list__item-actions">
|
|
127
|
+
<span
|
|
128
|
+
v-if="$utils.isImg(file)"
|
|
129
|
+
class="el-upload-list__item-preview"
|
|
130
|
+
@click="handlePictureCardPreview(file)"
|
|
131
|
+
>
|
|
132
|
+
<i class="fz-16 el-icon-zoom-in" />
|
|
133
|
+
</span>
|
|
134
|
+
<span
|
|
135
|
+
v-if="$utils.isAV(file)"
|
|
136
|
+
class="el-upload-list__item-preview ml-5"
|
|
137
|
+
@click="handleAVPreview(file)"
|
|
138
|
+
>
|
|
139
|
+
<i class="fz-16 el-icon-video-play" />
|
|
140
|
+
</span>
|
|
141
|
+
<span
|
|
142
|
+
class="el-upload-list__item-delete icon ml-5"
|
|
143
|
+
@click="handleDownload(file, fileList)"
|
|
144
|
+
>
|
|
145
|
+
<i class="fz-16 el-icon-download" />
|
|
146
|
+
</span>
|
|
147
|
+
<span
|
|
148
|
+
v-if="allowDelete || (!$attrs.disabled && !preview) || hideUpload"
|
|
149
|
+
class="el-upload-list__item-delete icon ml-5"
|
|
150
|
+
@click="handleRemove(file, fileList)"
|
|
151
|
+
>
|
|
152
|
+
<i class="fz-16 el-icon-delete" />
|
|
153
|
+
</span>
|
|
139
154
|
</span>
|
|
140
|
-
|
|
141
|
-
v-if="$utils.isAV(file)"
|
|
142
|
-
class="el-upload-list__item-preview ml-5"
|
|
143
|
-
@click="handleAVPreview(file)"
|
|
144
|
-
>
|
|
145
|
-
<i class="fz-16 el-icon-video-play" />
|
|
146
|
-
</span>
|
|
147
|
-
<span
|
|
148
|
-
class="el-upload-list__item-delete icon ml-5"
|
|
149
|
-
@click="handleDownload(file, fileList)"
|
|
150
|
-
>
|
|
151
|
-
<i class="fz-16 el-icon-download" />
|
|
152
|
-
</span>
|
|
153
|
-
<span
|
|
154
|
-
v-if="allowDelete || (!$attrs.disabled && !preview) || hideUpload"
|
|
155
|
-
class="el-upload-list__item-delete icon ml-5"
|
|
156
|
-
@click="handleRemove(file, fileList)"
|
|
157
|
-
>
|
|
158
|
-
<i class="fz-16 el-icon-delete" />
|
|
159
|
-
</span>
|
|
160
|
-
</span>
|
|
155
|
+
</template>
|
|
161
156
|
</div>
|
|
157
|
+
<!-- <div
|
|
158
|
+
slot="file"
|
|
159
|
+
slot-scope="{ file }"
|
|
160
|
+
class="xn-upload--slot"
|
|
161
|
+
|
|
162
|
+
>
|
|
163
|
+
|
|
164
|
+
</div> -->
|
|
162
165
|
<div v-if="tip !== ''" slot="tip" class="el-upload__tip">{{ tip }}</div>
|
|
163
166
|
<el-image-viewer
|
|
164
167
|
v-if="isShowImageView"
|