Unverified Commit 6cafa337 authored by 稚屿's avatar 稚屿 Committed by Gitee

修复图片上传组件在同一页面中被多次引用时,仅有第一个组件拖拽功能生效的问题

Signed-off-by: 's avatar稚屿 <1491182878@qq.com>
parent 88b0f5bc
......@@ -104,7 +104,7 @@ export default {
mounted() {
if (this.drag) {
this.$nextTick(() => {
const element = document.querySelector('.el-upload-list')
const element = this.$refs.imageUpload?.$el?.querySelector('.el-upload-list')
Sortable.create(element, {
onEnd: (evt) => {
const movedItem = this.fileList.splice(evt.oldIndex, 1)[0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment