提交 5a349fa1 编写于 作者: shuang.zhou's avatar shuang.zhou

Merge branch 'feature/zs-3.21.00000' into 'teasing/3.21.0'

Feature/zs 3.21.00000

See merge request com.pica.cloud.education.frontend/pica.cloud.web-education-admin!351
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
size="small" size="small"
v-model="formData.goodsDescription" v-model="formData.goodsDescription"
placeholder="请输入商品介绍" placeholder="请输入商品介绍"
maxlength="1000" maxlength="30"
show-word-limit show-word-limit
></el-input> ></el-input>
<span class="word-tip">此文案可摘取药品说明书【功能主治】or【适应症】</span> <span class="word-tip">此文案可摘取药品说明书【功能主治】or【适应症】</span>
...@@ -58,7 +58,8 @@ ...@@ -58,7 +58,8 @@
action="#" action="#"
:before-upload="beforeUploadPic" :before-upload="beforeUploadPic"
multiple multiple
:on-exceed="imgExceed"
:limit="6"
> >
<div class="file-pics" v-if="fileGoodsList.length > 0" :key="index" v-for="(item,index) in fileGoodsList"> <div class="file-pics" v-if="fileGoodsList.length > 0" :key="index" v-for="(item,index) in fileGoodsList">
<img :src="item.url" @mouseover.stop="headIndex=index" class="bg-img"/> <img :src="item.url" @mouseover.stop="headIndex=index" class="bg-img"/>
...@@ -71,8 +72,8 @@ ...@@ -71,8 +72,8 @@
<i class="el-icon-delete"></i> <i class="el-icon-delete"></i>
</div> </div>
</div> </div>
<img class="bg-img" src="../../assets/image/small.png" v-if="fileGoodsList.length <10"/> <img class="bg-img" src="../../assets/image/small.png" v-if="fileGoodsList.length < 6"/>
<div class="limit-text"> <div class="limit-text" v-if="fileGoodsList.length < 6">
<!-- <p>限制大小: 200kb</p> --> <!-- <p>限制大小: 200kb</p> -->
<p>建议尺寸:750*420</p> <p>建议尺寸:750*420</p>
<p>支持jpeg, png格式</p> <p>支持jpeg, png格式</p>
...@@ -1595,11 +1596,17 @@ ...@@ -1595,11 +1596,17 @@
}) })
}) })
}, },
imgExceed(file) {
if (file.length > 6) {
this.$message.error("最多只能上传6张图片");
};
},
//上传商品头图 //上传商品头图
beforeUploadPic(file) { beforeUploadPic(file) {
if(this.fileGoodsList.length > 10){ // if(this.fileGoodsList.length > 6){
return ; // this.$message.error("最多只能上传6张图片");
} // return ;
// }
let vm = this; let vm = this;
let picTypes = ['image/jpeg','image/png'] let picTypes = ['image/jpeg','image/png']
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册