vant的upload上传身份证样式更改(魔改van-uploader)

 

template中

  <van-uploader  max-count="1"
                     upload-text="上传身份证正面"
                     :upload-icon="require('../../assets/身份证正面.jpg')"
                     v-model="frontFileList"
                     :after-read="uploadIDcardFront"
      ></van-uploader>

css样式需要更改

/deep/ .van-uploader__upload,
/deep/ .van-image,
/deep/ .van-uploader__preview-image{
  width: 44vw;
  height: 110px;
}
/deep/ .van-uploader__upload-text {
  margin-top: 8px;
  color: #969799;
  font-size: 12px;
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 30px;
  line-height: 30px;
  background: #1da4f2;
  color: #fff;
  text-align: center;
}
/deep/ .van-uploader__upload,
/deep/ .van-image{
  background: #E8F6FE;
  border-radius: 10px;
  overflow: hidden;
}
/deep/ .van-icon__image {
  width: 4em;
  height: 3em;
  -o-object-fit: contain;
  object-fit: contain;
  margin-bottom: 23px;
}

 

本文仅供自己学习,不喜勿喷

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值