Преглед изворни кода

fix: deletePic 兼容 up-upload delete 事件参数格式

Developer пре 1 недеља
родитељ
комит
97af47726a
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      pagesHome/fillNonprofitArchives.vue

+ 2 - 1
pagesHome/fillNonprofitArchives.vue

@@ -58,7 +58,8 @@
 	const fileList = ref([])
 	
 	const deletePic = (event) => {
-	  fileList.value.splice(event.index, 1);
+	  const index = typeof event === 'object' ? event.index : event
+	  fileList.value.splice(index, 1);
 	};
 	
 	// 新增图片