当前位置: 首页 > news >正文

nas怎么做自己的网站吉林网站seo

nas怎么做自己的网站,吉林网站seo,天津哪里有做网站的公司,网络优化分为介绍: 1.单个与多个,就是限制个数不一样;其次就是v-model,一个是字符串,一个是数组,获取详情和提交时map生成fileList就可以了。 2.图片都可预览删除,超过限制后上传按钮隐藏。 一、单个上传&…

介绍:

1.单个与多个,就是限制个数不一样;其次就是v-model,一个是字符串,一个是数组,获取详情和提交时map生成fileList就可以了。
2.图片都可预览删除,超过限制后上传按钮隐藏。

一、单个上传:

效果如图:
在这里插入图片描述
在这里插入图片描述
html:

<el-form :model="newTeam" status-icon :rules="newTeamRules" ref="newTeam" label-width="120px" class='docorTeam'> <el-Row><el-form-item label="上传头像:" prop="headUrl" size="small" :rules="[{ required: true, message: '请上传', trigger: 'change'}]"><el-upload:action='$my.api+"/upload/upload"'list-type="picture-card"name='files':file-list="fileList":limit="1":class="{imgHide:hideUpload}":on-preview="handlePictureCardPreview":on-success='uploadOk':on-remove="handleRemove":on-change="imgChange"><i class="el-icon-plus"></i></el-upload><el-dialog :visible.sync="dialogVisible"><img width="100%" :src="dialogImageUrl" alt=""></el-dialog></el-form-item>
</el-Row> <el-footer class="posFix bottom0 left0 bgf foot flex alic juste"><el-button @click="isShowDetail = false" size="small">返回</el-button><el-button type="primary" @click="submitNewTeam('newTeam')" size="small">提交</el-button></el-footer>
</el-form>

data:

data() {return {newTeam:{headUrl:''},newTeamRules: {headUrl: [{ required: true, message: '请输入', trigger: 'blur'}],},isShowDetail:false,dialogImageUrl: '',dialogVisible: false,fileList: [],hideUpload: false,}
},

methods:

handleRemove(file, fileList) {console.log(file, fileList)this.fileList = fileListthis.newTeam.headUrl = ''this.hideUpload = fileList.length >= 1;
},
handlePictureCardPreview(file) {this.dialogImageUrl = file.url;this.dialogVisible = true;
},
uploadOk(response, file, fileList) {console.log(response, file, fileList)this.fileList.push({name:file.name,url:response})this.newTeam.headUrl = response
},
imgChange(file,fileList){this.hideUpload = fileList.length >= 1;
},
submitNewTeam(formName){ //新增this.$refs[formName].validate((valid) => {if (valid) {//操作this.hideUpload = falsethis.fileList = []} else {console.log('error submit!!');return false;}});
},

css:

.foot{margin-left: 200px;width:calc(100% - 200px)}
//修改组件大小为100px
.docorTeam >>> .el-upload--picture-card{width:100px;height: 100px;line-height: 106px;}
.docorTeam >>>.el-upload-list--picture-card .el-upload-list__item{width:100px;height: 100px;}
//隐藏上传按钮
.imgHide >>> .el-upload--picture-card {display: none;
}

二、多个上传:

效果如图:
在这里插入图片描述
html:

<el-form status-icon :model="imgForm" ref="imgForm"  label-width="100px"> <el-Row><el-form-item prop="url" size="small" :rules="[{ required: true, message: '请上传', trigger: 'change'}]"><el-upload:action='$my.api+"/upload/upload"'list-type="picture-card"name='files':class="{imgHide:hideUpload}":file-list="fileList":limit="5":on-preview="handlePictureCardPreview":on-success='uploadOk':on-remove="handleRemove":on-change="imgChange"><i class="el-icon-plus"></i></el-upload><el-dialog :visible.sync="dialogVisible"><img width="100%" :src="dialogImageUrl" alt=""></el-dialog></el-form-item></el-Row>
</el-form>
<span slot="footer" class="dialog-footer"><el-button @click="dialogImgVisible = false">取 消</el-button><el-button type="primary" @click="submitImg('imgForm')">确 定</el-button>
</span>

data:

data() {return {dialogImgVisible:false,dialogImageUrl: '',dialogVisible: false,fileList: [],imgForm:{url:'',},hideUpload: false,}
},

methods:

showUpImg(val){this.rowData = valthis.hideUpload = falsethis.fileList = []this.formDetail.imageId = ''this.dialogImgVisible = true
},
handleRemove(file, fileList) {console.log(file, fileList)this.fileList = fileListthis.hideUpload = fileList.length >= 5;
},
handlePictureCardPreview(file) {this.dialogImageUrl = file.url;this.dialogVisible = true;
},
uploadOk(response, file, fileList) {console.log(response, file, fileList)this.fileList.push({name:file.name,url:response})
},
imgChange(file,fileList){this.hideUpload = fileList.length >= 5;
},
submitImg(formName){let arr = []this.fileList.map((item)=>{arr.push(item.url)})let data ={url:arr.join(','),}this.imgForm.url = arr.join(',')this.$refs[formName].validate((valid) => {if (valid) {this.$axios.post(this.$my.api + '/bms/healRecord/saveImage', data).then(res => { if(res.data&&res.data.code === 200){  }else{} }).catch(function (error) {})} else {console.log('error submit!!');return false;}});
},

css:

.imgHide >>> .el-upload--picture-card {display: none;
}
http://www.wooajung.com/news/35059.html

相关文章:

  • 上海网站公司营销排名seo
  • 响应式网站建设平台免费seo视频教学
  • 深圳横岗网站建设百度做网站推广电话
  • django做的购物网站百度如何购买关键词
  • 幼儿园网站建设7个基本流程百度大搜数据多少钱一条
  • 望牛墩网站仿做腾讯广告推广怎么做
  • 网站 app 哪个先做网站推广的100种方法
  • 大连做网站外包电话营销话术
  • 学做立体书的网站深圳网络推广怎么做
  • 苏州网站快速推广宁波seo网络推广优化价格
  • 免费建设网站公司哪家好刷排名seo
  • 福州最好的网站建设关键词推广系统
  • 网站建设的基本原则seo社区
  • 推广一个网站需要什么今日国际新闻头条15条
  • 专业的论坛网站建设开发燃灯seo
  • 徐州市专业做网站的公司企业网站推广
  • 艺麟盛世可以做网站推广吗seo 优化公司
  • 天津网站的优化最新国际新闻热点事件
  • html做的旅游网站搜索引擎广告形式有哪些
  • 运维网站建设爱站网seo培训
  • 全国知名十大计算机培训学校seo推广软件代理
  • 青岛手机网站设计公司seo知识是什么意思
  • 免费拓客软件排行榜河北seo网络优化师
  • 头像制作软件app汕头seo托管
  • 专业企业网站建设公司google seo实战教程
  • 怎么在地图上设置自己店的位置马鞍山网站seo
  • 做网站的客户需求搭建网站
  • 东营网站制作公司近三天新闻50字左右
  • 设计网站建网站关键词优化软件
  • 怎么通过做网站挣钱重庆网站推广联系方式