|
1 | 1 | <template>
|
2 | 2 | <transition-group
|
3 |
| - class="ele-upload el-upload-list el-upload-list--text" |
| 3 | + class="ele-upload-file-list el-upload-list el-upload-list--text" |
4 | 4 | name="el-list"
|
5 | 5 | tag="ul"
|
6 | 6 | >
|
7 | 7 | <li
|
8 |
| - :class="['el-upload-list__item', 'is-' + file.status]" |
9 | 8 | :key="file.uid"
|
10 |
| - class="el-upload-list__item" |
| 9 | + class="el-upload-list__item ele-upload-list__item-content" |
11 | 10 | v-for="(file, index) in files"
|
12 | 11 | >
|
13 |
| - <div class="ele-upload-list__item-content"> |
| 12 | + <el-link |
| 13 | + :href="file.url" |
| 14 | + :underline="false" |
| 15 | + target="_blank" |
| 16 | + > |
| 17 | + <img |
| 18 | + :src="getExtension(file.name)" |
| 19 | + class="el-upload-list__item-content-name-icon" |
| 20 | + /> |
| 21 | + <span>{{file.name}}</span> |
| 22 | + </el-link> |
| 23 | + <div class="ele-upload-list__item-content-action"> |
14 | 24 | <el-link
|
15 |
| - :href="file.url" |
16 | 25 | :underline="false"
|
17 |
| - target="_blank" |
18 |
| - > |
19 |
| - <img |
20 |
| - :src="getExtension(file.name)" |
21 |
| - class="el-upload-list__item-content-name-icon" |
22 |
| - /> |
23 |
| - <span>{{file.name}}</span> |
24 |
| - </el-link> |
25 |
| - <div class="ele-upload-list__item-content-action"> |
26 |
| - <el-link |
27 |
| - :underline="false" |
28 |
| - v-if="isShowSize" |
29 |
| - >{{getSize(file.size)}}</el-link> |
30 |
| - <el-link |
31 |
| - :underline="false" |
32 |
| - @click="handleDownload(file)" |
33 |
| - v-if="isCanDownload" |
34 |
| - >下载</el-link> |
35 |
| - <el-link |
36 |
| - :underline="false" |
37 |
| - @click="handleDelete(index, file)" |
38 |
| - type="danger" |
39 |
| - v-if="!disabled && isCanDelete" |
40 |
| - >删除</el-link> |
41 |
| - </div> |
| 26 | + v-if="isShowSize" |
| 27 | + >{{getSize(file.size)}}</el-link> |
| 28 | + <el-link |
| 29 | + :underline="false" |
| 30 | + @click="handleDownload(file)" |
| 31 | + v-if="isCanDownload" |
| 32 | + >下载</el-link> |
| 33 | + <el-link |
| 34 | + :underline="false" |
| 35 | + @click="handleDelete(index, file)" |
| 36 | + type="danger" |
| 37 | + v-if="!disabled && isCanDelete" |
| 38 | + >删除</el-link> |
42 | 39 | </div>
|
43 | 40 | </li>
|
44 | 41 | </transition-group>
|
@@ -114,21 +111,21 @@ export default {
|
114 | 111 | </script>
|
115 | 112 |
|
116 | 113 | <style>
|
117 |
| -.ele-upload .el-upload-list__item { |
| 114 | +.ele-upload-file-list .el-upload-list__item { |
118 | 115 | border: 1px solid #e4e7ed;
|
119 | 116 | line-height: 2;
|
120 |
| - margin-top: 10px; |
| 117 | + margin-bottom: 10px; |
121 | 118 | position: relative;
|
122 | 119 | }
|
123 | 120 |
|
124 |
| -.ele-upload .ele-upload-list__item-content { |
| 121 | +.ele-upload-file-list .ele-upload-list__item-content { |
125 | 122 | display: flex;
|
126 | 123 | justify-content: space-between;
|
127 | 124 | align-items: center;
|
128 | 125 | color: inherit;
|
129 | 126 | }
|
130 | 127 |
|
131 |
| -.ele-upload .el-upload-list__item-content-name-icon { |
| 128 | +.ele-upload-file-list .el-upload-list__item-content-name-icon { |
132 | 129 | padding-left: 8px;
|
133 | 130 | padding-right: 5px;
|
134 | 131 | width: 20px;
|
|
0 commit comments