editPassword.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <div style="position: relative; width: 100%; height: 100%;">
  3. <h3>{{ $t('setting.editPassword') }}</h3>
  4. <v-divider class="mb-4"></v-divider>
  5. <div v-if="!showEdit" class="login-user mb-4">
  6. 当前登录账号:
  7. <span>{{ userInfo.phone }}</span>
  8. <span class="color-primary ml-5 text-decoration-underline cursor-pointer" @click="showEdit = true">修改密码</span>
  9. </div>
  10. <editPasswordPage v-if="showEdit" :phone="userInfo.phone" @cancel="showEdit = false" class="editPage"></editPasswordPage>
  11. </div>
  12. </template>
  13. <script setup name="editPassword">
  14. import { ref } from 'vue'
  15. import editPasswordPage from '@/views/login/components/editPassword.vue'
  16. const showEdit = ref(false)
  17. // 当前登录的用户信息
  18. const userInfo = JSON.parse(localStorage.getItem('userInfo'))
  19. </script>
  20. <style lang="scss" scoped>
  21. h3 {
  22. font-size: 20px;
  23. text-align: left;
  24. font-weight: 600;
  25. padding-bottom: 25px;
  26. }
  27. .login-user {
  28. color: var(--color-666);
  29. font-weight: 600;
  30. }
  31. .editPage {
  32. position: absolute;
  33. top: 50%;
  34. left: 50%;
  35. transform: translate(-50%, -50%);
  36. }
  37. </style>