| | |
| | | <u--form labelPosition="top" |
| | | :model="form"> |
| | | <u-form-item labelWidth="25%" |
| | | label="头像" |
| | | label="" |
| | | @click="beforeRead" |
| | | required> |
| | | <u-upload :fileList="fileList1" |
| | | @afterRead="afterRead" |
| | | @delete="deletePic" |
| | | name="1" |
| | | multiple |
| | | :maxCount="1" |
| | | width="250" |
| | | height="150" |
| | | :previewFullImage="true"></u-upload> |
| | | <view class="deleteImg" v-if="fileList1.length>0" @click="deletePic"> |
| | | <u-icon |
| | | name="close" |
| | | color="#000000" |
| | | size="30" |
| | | ></u-icon> |
| | | </view> |
| | | <view class="upload"> |
| | | <u-upload :fileList="fileList1" |
| | | @afterRead="afterRead" |
| | | @delete="deletePic" |
| | | name="1" |
| | | multiple |
| | | :maxCount="1" |
| | | width="180" |
| | | height="180" |
| | | customStyle="margin-left:8px;margin-top:8px;" |
| | | :previewFullImage="true"></u-upload> |
| | | </view> |
| | | </u-form-item> |
| | | </u--form> |
| | | </view> |
| | | <view class="addBtn"><u-button text="确认" |
| | | <view class="addBtn"><u-button text="确认"load__butto |
| | | type="primary" |
| | | @click="addToHuoDaiOrDriver" |
| | | :loading="loading"></u-button></view> |
| | |
| | | }, |
| | | // 删除 |
| | | deletePic(event) { |
| | | this.changeisUploadimg(true); |
| | | this[`fileList${event.name}`].splice(event.index, 1); |
| | | this.fileList1.splice(0, 1); |
| | | }, |
| | | uploadFilePromise(url, num) { |
| | | return new Promise((resolve, reject) => { |
| | |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | /deep/.u-form-item__body__right__content__slot{ |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | /deep/u-view.u-upload__button[data-v-69e2a36e]{ |
| | | margin: 0 !important; |
| | | } |
| | | .deleteImg{ |
| | | width: 20px; |
| | | height:20px; |
| | | background-color: #ffffff; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border-radius: 50%; |
| | | position: relative; |
| | | right: -80px; |
| | | top: -25px; |
| | | z-index: 999; |
| | | } |
| | | .upload{ |
| | | width: 80px; |
| | | height: 77px; |
| | | margin:0; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border-radius: 50%; |
| | | overflow: hidden; |
| | | } |
| | | } |
| | | |
| | | .addBtn{ |
| | | width: 120px; |
| | | position: absolute; |
| | | top: 80%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | } |
| | | </style> |