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 ++++++ src/components_simple/UploadMultipleImg.vue | 6 ++++++ src/pages/system/banner.vue | 19 +++++++++++++------ 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/components_simple/UploadMultipleImg.vue b/src/components_simple/UploadMultipleImg.vue index 46416ab..bbfe70e 100644 --- a/src/components_simple/UploadMultipleImg.vue +++ b/src/components_simple/UploadMultipleImg.vue @@ -2,6 +2,7 @@ <div> <!-- 涓婁紶鍥剧墖缁勪欢(澶氬浘) --> <el-upload + id="UploadMultipleImg" ref="refUploadImg" :accept="accept" :auto-upload="false" @@ -9,6 +10,7 @@ :class="{disabled:uploadDisabled}" action="#" :limit="limit" + drag :file-list="uploadImgs" :on-change="addUploadImg" :on-remove="delUploadImg" @@ -153,4 +155,8 @@ .el-upload-list--picture-card .el-upload-list__item{ margin-bottom: 0 } +#UploadMultipleImg .el-upload-dragger{ + width: auto; + height: auto; +} </style> 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> diff --git a/src/pages/system/banner.vue b/src/pages/system/banner.vue index 73d5cf6..9b55b29 100644 --- a/src/pages/system/banner.vue +++ b/src/pages/system/banner.vue @@ -138,6 +138,19 @@ pageSize: 20, // 鍒嗛〉 鈫戔啈鈫戔啈鈫戔啈鈫戔啈鈫戔啈 + jumpTypeOpt: [ + { label: '涓嶈烦杞�', value: 0 }, + { label: '灏忕▼搴忛〉闈�', value: 1 }, + { label: 'H5椤甸潰', value: 2 }, + { label: '鍏跺畠灏忕▼搴�', value: 3 } + ], + + envVersionOpt: [ + { label: '寮�鍙戠増', value: 'develop' }, + { label: '浣撻獙鐗�', value: 'trial' }, + { label: '姝e紡鐗�', value: 'release' } + ], + // 鏄剧ず寮圭獥 isShowDialog: false, @@ -171,12 +184,6 @@ uploadImgs: [] } - } - }, - computed: { - // 涓婁紶绂佺敤 - uploadDisabled() { - return this.dialogData.uploadImgs.length > 0 } }, mounted() { -- Gitblit v1.8.0