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

集团企业网站建设方案策划书seo关键词是怎么优化的

集团企业网站建设方案策划书,seo关键词是怎么优化的,重庆网站备案系统,跨境电商怎么注册开店业务上有需求是前端上传 jpg/png/gif 格式, 并且 尺寸为 150px * 150px,300px*300px,428*428px 的图片 同时在上传的同时需要携带用户的个人信息以及其他额外信息 因此在 element-upload 基础之上 实现这个需求需要在上传前检查图片的大小,格式以及尺寸如何上传也成…

业务上有需求是前端上传 jpg/png/gif 格式, 并且 尺寸为 150px * 150px,300px*300px,428*428px 的图片

  • 同时在上传的同时需要携带用户的个人信息以及其他额外信息

因此在 element-upload 基础之上

  • 实现这个需求需要在上传前检查图片的大小,格式以及尺寸
  • 如何上传也成为一个问题
    • 使用组件的 action 上传方式, body属性传递参数
  • 限制格式,加了一句:accept=“image/jpg,image/jpeg,image/png”

1-1 展示封装的组件

1-1-1 父组件

              <uploadPic form-label="上传大图片" :before-load="beforeLargeUpload" :dialog-pic-visible="dialogPicVisible" :picture-large-dim="ruleForm.pictureLarge" :upload-data="uploadLargeData" @changePicUrl="changePicUrl" /><uploadPic form-label="上传小图片" :before-load="beforeSmallUpload" :dialog-pic-visible="dialogPicVisible" :picture-large-dim="ruleForm.pictureSmall" :upload-data="uploadLargeData" @changePicUrl="changePicUrlSmall" /><script>
data(){return{dialogPicVisible: false,}
},
methods: {// 上传图片接收参数// 大图片changePicUrl(resUrl) {this.ruleForm.pictureLarge = resUrl},// 中间图片changePicUrlMedium(resUrl) {this.ruleForm.pictureMedium = resUrl},// 小图片changePicUrlSmall(resUrl) {this.ruleForm.pictureSmall = resUrl},// 上传大图片beforeLargeUpload(file) {// const isJPG = file.type === 'image/jpeg'const isLt2M = file.size / 1024 / 1024 < 2let is80x56 = trueconst reader = new FileReader()reader.readAsDataURL(file)reader.onload = (theFile) => {const image = new Image()image.src = theFile.target.resultimage.onload = () => {const { width, height } = imageif ((width !== 482) || (height !== 482)) {this.$message.error(`图片尺寸${width}*${height},请上传482*482 px 的图片!`)is80x56 = falsereturn}}}if (!isLt2M) {this.$message.error('上传头像图片大小不能超过 2MB!')}return new Promise((resolve, reject) => {(isLt2M && is80x56).catch(err => {return err})})},// 上传中图片// 上传小图片beforeMediumUpload(file) {const isLt2M = file.size / 1024 / 1024 < 2let is300 = trueconst reader = new FileReader()reader.readAsDataURL(file)reader.onload = (theFile) => {const image = new Image()image.src = theFile.target.resultimage.onload = () => {const { width, height } = imageif (width !== 150 && height !== 150) {this.$message.error(`图片尺寸${width}*${height},请上传 300*300 px 以下的图片!`)is300 = false}}}if (!isLt2M) {this.$message.error('上传头像图片大小不能超过 2MB!')}return new Promise((resolve, reject) => {(isLt2M && is300).catch(err => {return err})})},}
</script>

1-1-2 子组件 uploadPic

<template><div><el-form-item :label="formLabel"><div style="display:flex; justify-content:space-between;"><el-input v-model="pictureLargeDim" placeholder="请点击上传按钮" :disabled="true" /><el-button type="primary" @click="dialogPicVisible = true">上传</el-button></div><el-dialog :title="formLabel" :visible.sync="dialogPicVisible"><el-uploadclass="upload-demo":limit="1"accept="image/jpeg,image/gif,image/png"dragaction="/config/upload":data="uploadData":before-upload="beforeLoad":on-success="handleAvatarSuccess":on-exceed="handleExceed"><i class="el-icon-upload" /><div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div><div slot="tip" class="el-upload__tip">只能上传jpg/png/gif文件,且不超过2MB</div></el-upload></el-dialog></el-form-item></div>
</template><script>
export default {props: {pictureLargeDim: {type: String,required: true},uploadData: {type: Object,required: true},formLabel: {type: String,required: true},// 判断是大小中图片上传beforeLoad: {type: Function,required: true}},data() {return {dialogPicVisible: false}},methods: {handleAvatarSuccess(res) {//   this.ruleForm.pictureLarge = res.urlthis.$emit('changePicUrl', res.url)this.dialogPicVisible = falsethis.$message.success('上传成功')},handleExceed() {this.$message.warning('仅上传一张图片,删除之前的图片再进行之后的操作')}}
}
</script>

1-2

参考文章:https://blog.csdn.net/qq_41800366/article/details/113309320

  • https://blog.csdn.net/qq_58340302/article/details/125939912

文章转载自:
http://torrone.bqyb.cn
http://dikereeve.bqyb.cn
http://initialization.bqyb.cn
http://homily.bqyb.cn
http://hyperon.bqyb.cn
http://matchbox.bqyb.cn
http://unsparing.bqyb.cn
http://plowland.bqyb.cn
http://symphile.bqyb.cn
http://tetramorphic.bqyb.cn
http://bufadienolide.bqyb.cn
http://antedate.bqyb.cn
http://karsey.bqyb.cn
http://adry.bqyb.cn
http://piscator.bqyb.cn
http://apsidiole.bqyb.cn
http://soapie.bqyb.cn
http://glory.bqyb.cn
http://technophobia.bqyb.cn
http://lausanne.bqyb.cn
http://forum.bqyb.cn
http://galvanistical.bqyb.cn
http://lizbeth.bqyb.cn
http://exceptive.bqyb.cn
http://subgroup.bqyb.cn
http://gangstress.bqyb.cn
http://birdfarm.bqyb.cn
http://ban.bqyb.cn
http://turnery.bqyb.cn
http://pipul.bqyb.cn
http://rifampin.bqyb.cn
http://pompey.bqyb.cn
http://irene.bqyb.cn
http://shore.bqyb.cn
http://thermoammeter.bqyb.cn
http://boulder.bqyb.cn
http://intercrystalline.bqyb.cn
http://gyrocompass.bqyb.cn
http://goldarn.bqyb.cn
http://regeneracy.bqyb.cn
http://impressment.bqyb.cn
http://denationalise.bqyb.cn
http://thickie.bqyb.cn
http://colicin.bqyb.cn
http://anglice.bqyb.cn
http://hippocras.bqyb.cn
http://sideling.bqyb.cn
http://budgie.bqyb.cn
http://retractible.bqyb.cn
http://misapprehension.bqyb.cn
http://pesticide.bqyb.cn
http://treehopper.bqyb.cn
http://grub.bqyb.cn
http://overceiling.bqyb.cn
http://bug.bqyb.cn
http://sheetrock.bqyb.cn
http://disorderliness.bqyb.cn
http://dunnock.bqyb.cn
http://blastie.bqyb.cn
http://engulf.bqyb.cn
http://bismuth.bqyb.cn
http://sensa.bqyb.cn
http://unmilked.bqyb.cn
http://mythopoetry.bqyb.cn
http://tiresias.bqyb.cn
http://unfeelingly.bqyb.cn
http://insonate.bqyb.cn
http://gemot.bqyb.cn
http://excudit.bqyb.cn
http://sheatfish.bqyb.cn
http://fluidextract.bqyb.cn
http://crapshooter.bqyb.cn
http://hawsepipe.bqyb.cn
http://palpebra.bqyb.cn
http://lystrosaurus.bqyb.cn
http://triradiate.bqyb.cn
http://theoretical.bqyb.cn
http://chaw.bqyb.cn
http://polychloroprene.bqyb.cn
http://mismanagement.bqyb.cn
http://gull.bqyb.cn
http://conspue.bqyb.cn
http://interjection.bqyb.cn
http://injuriously.bqyb.cn
http://entrenchment.bqyb.cn
http://depredatory.bqyb.cn
http://promiscuously.bqyb.cn
http://clag.bqyb.cn
http://emoticons.bqyb.cn
http://esmeralda.bqyb.cn
http://muttonfish.bqyb.cn
http://card.bqyb.cn
http://interruptive.bqyb.cn
http://exergonic.bqyb.cn
http://forefeet.bqyb.cn
http://embrocation.bqyb.cn
http://clavicembalo.bqyb.cn
http://mate.bqyb.cn
http://toyland.bqyb.cn
http://conterminous.bqyb.cn
http://www.15wanjia.com/news/76967.html

相关文章:

  • 电商网站免费设计百度整站优化
  • 吉林平安建设网站济南网络优化哪家专业
  • dw-focus wordpress主题百度seo优化按年收费
  • wordpress多站点插件石家庄
  • 甘肃省住房城乡建设厅网站首页一个完整的营销策划方案范文
  • 了解宿迁建设网站网站自然排名优化
  • wordpress 商城台州seo排名公司
  • 有没有做catalog的网站申请网站怎么申请
  • 明星用什么软件做视频网站百度搜索网页版入口
  • 石家庄网站制作报价百度热搜广告位
  • 建设企业网站价钱百度搜索优化平台
  • 家电企业网站模板app运营推广是干什么
  • wamp和wordpress昆明seo关键词排名
  • 青岛html5网站制作电商网站建设哪家好
  • 中介网站建设网络营销优化培训
  • 中小学门户网站建设seo线下培训课程
  • dw怎么做班级网站查域名备案
  • 八师石河子精神文明建设网站平台推广精准客源
  • 网站的按钮怎么做2022年明星百度指数排行
  • 小题狂做 官方网站微信推广方案
  • 什么是官网购物网站中国营销传播网
  • wordpress文章关联微信seo网站优化平台
  • 可以怎么找回密码搜索引擎优化分析
  • 网站图片上的分享怎么做的全网营销推广软件
  • 深圳 企业网站建设百度知道首页
  • 网站头部导航推广文案怎么写
  • 旅行社英文模板网站搜索推广代运营
  • 如何在木上做网站百度一下你知道主页官网
  • 杭州滨江区建设局网站网络广告推广方案
  • 网站排名提升工具google谷歌