Skip to content

Commit

Permalink
💄 update upload avatar & setting
Browse files Browse the repository at this point in the history
  • Loading branch information
nicejade committed Feb 16, 2021
1 parent 05fdcb2 commit f6b5eec
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/assets/scss/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ $zindex-subhead: 100;
$zindex-mobile-search: 1000;
$zindex-header-mobile: 2000;
$zindex-side-nav: 2000;
$zindex-upload-avatar: 10000;
$zindex-upload-avatar: 100000;
$zindex-quickapp-btn: 99999;

//--------------------- width height ----------------------
Expand Down
2 changes: 1 addition & 1 deletion src/components/UploadAvatar.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="vue-image-crop-upload" v-show="value">
<div class="vue-image-crop-upload" v-if="value">
<div class="vicp-wrap">
<div class="vicp-close" @click="off">
<i class="vicp-icon4"></i>
Expand Down
2 changes: 1 addition & 1 deletion src/components/dialog/EditDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
</div>

<div class="form-group">
<label class="col-sm-3 control-label"> {{ this.$t('isAlive') }} :</label>
<label class="control-label"> {{ this.$t('isAlive') }} :</label>
<el-switch
:on-text="$t('yes')"
:off-text="$t('no')"
Expand Down
20 changes: 11 additions & 9 deletions src/views/Setting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,12 @@
<hr />

<div class="form-group">
<div class="col-sm-12">
<div class="update-avatar-area">
<img class="preview-avatar" :src="imgDataUrl" :alt="$t('niceLinksStr')" />
<br />
<el-button :loading="isLoading" type="text" @click="onUpdateAvatarClick">
{{ $t('updateAvatar') }}
</el-button>
</div>
<div class="update-avatar-area">
<img class="preview-avatar" :src="imgDataUrl" :alt="$t('niceLinksStr')" />
<br />
<el-button :loading="isLoading" type="text" @click="onUpdateAvatarClick">
{{ $t('updateAvatar') }}
</el-button>
</div>
</div>
</el-card>
Expand Down Expand Up @@ -256,6 +254,7 @@ export default {
this.imgDataUrl = `/api/avatar/${imgPath}`
// ReUpdate UserInfo
this.$getUserInfo()
this.isShowUploadAvatar = false
},
},
Expand All @@ -272,10 +271,13 @@ export default {

<style lang="scss">
.update-avatar-area {
width: 221px;
width: 100%;
text-align: center;
margin: auto;
margin-top: 25px;
.preview-avatar {
width: 100px;
height: 100px;
border: 1px solid #d1dbe5;
border-radius: 50%;
}
Expand Down

0 comments on commit f6b5eec

Please sign in to comment.