From 38caeb98d38808aa76a5e04d18b28387018de9a5 Mon Sep 17 00:00:00 2001
From: mg <maokecheng@163.com>
Date: 星期五, 28 十月 2022 18:13:42 +0800
Subject: [PATCH] Merge branch 'master' of http://42.193.1.25:9521/r/sccg_ui
---
src/components/myUpload/index.vue | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/components/myUpload/index.vue b/src/components/myUpload/index.vue
index 6bcc4ff..41d202d 100644
--- a/src/components/myUpload/index.vue
+++ b/src/components/myUpload/index.vue
@@ -11,7 +11,6 @@
:on-success="handleSuccess"
:on-error="handleError"
:list-type="listType"
- :on-preview="handlePreview"
:on-remove="handleRemove"
:headers="getToken()">
<div class="upload-btn" :style="{'height':btnHeight,'width':btnWidth}">
@@ -32,7 +31,7 @@
// 澶氶��
multiple: false,
// 闄愬埗
- limit: 50,
+ limit: 4,
// 鎸夐挳楂樺害
btnHeight: '120px',
// 鎸夐挳瀹藉害
@@ -47,8 +46,8 @@
if (rawFile.type !== 'image/png' && rawFile.type !== 'image/svg+xml' && rawFile.type !== 'image/jpg' && rawFile.type !== 'image/jpeg') {
this.$message.error('鍥剧墖蹇呴』鏄� jpg/svg/jpeg/png 鏍煎紡!')
return false
- } else if (rawFile.size / 105 / 105 > 2) {
- this.$message.error('涓婁紶鍥剧墖涓嶈兘瓒呰繃 2MB!')
+ } else if (rawFile.size / 1024 / 1024 > 5) {
+ this.$message.error('涓婁紶鍥剧墖涓嶈兘瓒呰繃 5MB!')
return false
}
return true
@@ -90,7 +89,7 @@
},
// 绉婚櫎鏂囦欢
handleRemove(file, fileList){
- console.log(file,fileList)
+ this.$emit('delPictureUrl',{url:file.response.data.url1});
}
},
props: {
@@ -98,6 +97,10 @@
setPictureUrl:{
type:Function,
default:()=>{}
+ },
+ delPictureUrl:{
+ type:Function,
+ default:()=>{}
}
}
}
--
Gitblit v1.8.0