| | |
| | | :show-file-list="false" |
| | | accept="image/png, image/jpeg, image/jpg"> |
| | | <el-avatar |
| | | |
| | | :size="150" |
| | | :src="imgSrc" |
| | | class="pam-avatar cursor--pointer fix-chrome-click--issue" |
| | | ></el-avatar> |
| | | <div class="pam-avatar-uploader__action-label mt-10 cursor--pointer" >設定相片</div> |
| | | <div class="text--center mt-10"> |
| | | <el-button |
| | | >設定相片</el-button> |
| | | </div> |
| | | </el-upload> |
| | | <div |
| | | v-if="showResetAvatarBtn" |
| | | class="pam-avatar-uploader__action-label text--center mt-10 cursor--pointer" |
| | | @click="resetAvatar"> |
| | | 取消上傳相片 |
| | | style="line-height: 1.5" |
| | | > |
| | | <i class="icon-information"></i> |
| | | 請按頁面最下方的送出按鈕來更新照片, |
| | | <span class="text--primary cursor--pointer text--underline" @click="resetAvatar">或點此取消</span> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | |
| | | |
| | | import { MessageBox } from 'element-ui'; |
| | | import { MessageBoxData } from 'element-ui/types/message-box'; |
| | | import _ from 'lodash'; |
| | | |
| | | import myConsultantService from '~/shared/services/my-consultant.service'; |
| | | |
| | |
| | | } |
| | | |
| | | handleAvatarUploaded(file:any): void { |
| | | const isFollowUploadRule =_.includes(file.raw.type,'image/'); |
| | | const isFollowUploadRule = file.raw.type.includes('image/'); |
| | | isFollowUploadRule ? this.getImgSrc(file) : this.showFileUploadErrorMsg() |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | private splitBase64WithCommon(base64: string): void { |
| | | const splitBase64= _.split(base64, ','); // 為了把 data:image , base64 解析分開; |
| | | const splitBase64 = base64.split(','); // 為了把 data:image , base64 解析分開; |
| | | this.syncPhotoBase64 = splitBase64[1]; |
| | | // NOTE: 因為目前以 agentNO 取得 avatar 會失敗, |
| | | // 故加上此判斷來防範不預期顯示'取消按鈕'的狀況。 [Tomas, 2022/1/3] |