|
|
@@ -28,7 +28,7 @@
|
|
28
|
28
|
</el-upload>
|
|
29
|
29
|
|
|
30
|
30
|
<!-- 文件列表 -->
|
|
31
|
|
- <transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
|
|
|
31
|
+ <transition-group ref="uploadFileList" class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
|
|
32
|
32
|
<li :key="file.url" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList">
|
|
33
|
33
|
<el-link :href="file.url" :underline="false" target="_blank">
|
|
34
|
34
|
<span class="el-icon-document"> {{ getFileName(file.name) }} </span>
|
|
|
@@ -104,7 +104,7 @@ export default {
|
|
104
|
104
|
mounted() {
|
|
105
|
105
|
if (this.drag) {
|
|
106
|
106
|
this.$nextTick(() => {
|
|
107
|
|
- const element = document.querySelector('.upload-file-list')
|
|
|
107
|
+ const element = this.$refs.uploadFileList?.$el || this.$refs.uploadFileList
|
|
108
|
108
|
Sortable.create(element, {
|
|
109
|
109
|
ghostClass: 'file-upload-darg',
|
|
110
|
110
|
onEnd: (evt) => {
|