1
0
forked from ruoyi/RuoYi-Vue3

修复上传组件被多次引用拖动仅对第一个有效的问题

This commit is contained in:
RuoYi
2025-05-06 13:43:05 +08:00
parent dae8c5016c
commit 8eee596292
2 changed files with 3 additions and 3 deletions

View File

@@ -227,7 +227,7 @@ function listToString(list, separator) {
onMounted(() => {
if (props.drag) {
nextTick(() => {
const element = document.querySelector('.el-upload-list')
const element = proxy.$refs.imageUpload?.$el?.querySelector('.el-upload-list')
Sortable.create(element, {
onEnd: (evt) => {
const movedItem = fileList.value.splice(evt.oldIndex, 1)[0]