AccountManagement.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <script setup lang="ts">
  2. import { ref } from "vue";
  3. import { message } from "@/utils/message";
  4. import { deviceDetection } from "@pureadmin/utils";
  5. defineOptions({
  6. name: "AccountManagement"
  7. });
  8. const list = ref([
  9. {
  10. title: "账户密码",
  11. illustrate: "当前密码强度:强",
  12. button: "修改"
  13. },
  14. {
  15. title: "密保手机",
  16. illustrate: "已经绑定手机:158****6789",
  17. button: "修改"
  18. },
  19. {
  20. title: "密保问题",
  21. illustrate: "未设置密保问题,密保问题可有效保护账户安全",
  22. button: "修改"
  23. },
  24. {
  25. title: "备用邮箱",
  26. illustrate: "已绑定邮箱:pure***@163.com",
  27. button: "修改"
  28. }
  29. ]);
  30. function onClick(item) {
  31. console.log("onClick", item.title);
  32. message("请根据具体业务自行实现", { type: "success" });
  33. }
  34. </script>
  35. <template>
  36. <div
  37. :class="[
  38. 'min-w-[180px]',
  39. deviceDetection() ? 'max-w-[100%]' : 'max-w-[70%]'
  40. ]"
  41. >
  42. <h3 class="my-8!">账户管理</h3>
  43. <div v-for="(item, index) in list" :key="index">
  44. <div class="flex items-center">
  45. <div class="flex-1">
  46. <p>{{ item.title }}</p>
  47. <el-text class="mx-1" type="info">{{ item.illustrate }}</el-text>
  48. </div>
  49. <el-button type="primary" text @click="onClick(item)">
  50. {{ item.button }}
  51. </el-button>
  52. </div>
  53. <el-divider />
  54. </div>
  55. </div>
  56. </template>
  57. <style lang="scss" scoped>
  58. .el-divider--horizontal {
  59. border-top: 0.1px var(--el-border-color) var(--el-border-style);
  60. }
  61. </style>