From 30a1729ee64a237a547566f655fee1ce93827768 Mon Sep 17 00:00:00 2001 From: long <515897141@qq.com> Date: 星期四, 09 九月 2021 10:41:55 +0800 Subject: [PATCH] 上传单图组件 和 上传多图组件 添加可拖拽上传 --- src/components_simple/UploadSingleImg.vue | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/components_simple/UploadSingleImg.vue b/src/components_simple/UploadSingleImg.vue index 514d418..424ebc1 100644 --- a/src/components_simple/UploadSingleImg.vue +++ b/src/components_simple/UploadSingleImg.vue @@ -2,6 +2,7 @@ <div> <!-- 涓婁紶鍥剧墖缁勪欢(鍗曞浘) --> <el-upload + id="UploadSingleImg" ref="refUploadImg" :accept="accept" :auto-upload="false" @@ -9,6 +10,7 @@ :class="{disabled:uploadDisabled}" action="#" :limit="1" + drag :file-list="uploadImgs" :on-change="addUploadImg" :on-remove="delUploadImg" @@ -141,4 +143,8 @@ .el-upload-list--picture-card .el-upload-list__item{ margin-bottom: 0 } +#UploadSingleImg .el-upload-dragger{ + width: auto; + height: auto; +} </style> -- Gitblit v1.8.0