editPassword.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 cursor-pointer border-bottom-primary" @click.stop="showEdit = true">修改密码</span>
  9. </div>
  10. <div class="editPageBox">
  11. <editPasswordPage
  12. v-if="showEdit"
  13. :phone="userInfo.phone"
  14. @cancel="showEdit = false"
  15. class="editPage"
  16. ></editPasswordPage>
  17. </div>
  18. </div>
  19. </template>
  20. <script setup name="editPassword">
  21. import { ref } from 'vue'
  22. import editPasswordPage from '@/views/login/components/editPassword.vue'
  23. const showEdit = ref(false)
  24. // 当前登录的用户信息
  25. const userInfo = JSON.parse(localStorage.getItem('userInfo'))
  26. </script>
  27. <style lang="scss" scoped>
  28. h3 {
  29. font-size: 20px;
  30. text-align: left;
  31. font-weight: 600;
  32. padding-bottom: 25px;
  33. }
  34. .login-user {
  35. color: var(--color-666);
  36. font-weight: 600;
  37. }
  38. .editPageBox {
  39. width: 100%;
  40. display: flex;
  41. justify-content: center;
  42. align-items: center;
  43. }
  44. .editPage {
  45. // display: flex;
  46. // justify-content: center;
  47. // align-items: center;
  48. width: 450px;
  49. height: 450px;
  50. }
  51. </style>