新型管道消毒机前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
3.3 KiB

2 years ago
  1. <template>
  2. <div class="setting_contaienr">
  3. <div class="left_container">
  4. <div class="tab_wrap">
  5. <p class="active_line" v-show="activeTab == 1"></p>
  6. <p :class="activeTab == 1 ? 'title active' : 'title'">设备参数配置</p>
  7. <div class="btn" @click="changeActiveTab(1)">配置</div>
  8. </div>
  9. <div class="tab_wrap">
  10. <p class="active_line" v-show="activeTab == 2"></p>
  11. <p :class="activeTab == 2 ? 'title active' : 'title'">修改管理员密码</p>
  12. <div class="btn" @click="changeActiveTab(2)">修改</div>
  13. </div>
  14. <div class="tab_wrap">
  15. <p class="active_line" v-show="activeTab == 3"></p>
  16. <p :class="activeTab == 3 ? 'title active' : 'title'">用户管理</p>
  17. <div class="btn" @click="changeActiveTab(3)">管理</div>
  18. </div>
  19. <div class="tab_wrap">
  20. <p class="active_line" v-show="activeTab == 4"></p>
  21. <p :class="activeTab == 4 ? 'title active' : 'title'">日期/时间设置</p>
  22. <div class="btn" @click="changeActiveTab(4)">配置</div>
  23. </div>
  24. </div>
  25. <div class="right_container">
  26. <Admin v-if="activeTab == 2" />
  27. <Date v-if="activeTab == 4" />
  28. <Device v-if="activeTab == 1" />
  29. <User v-if="activeTab == 3" />
  30. </div>
  31. </div>
  32. </template>
  33. <script setup>
  34. import { ref } from 'vue'
  35. import Admin from './components/Admin.vue'
  36. import Date from './components/Date.vue'
  37. import Device from './components/Device.vue'
  38. import User from './components/User.vue'
  39. const activeTab = ref(1)
  40. const changeActiveTab = index => {
  41. activeTab.value = index
  42. }
  43. </script>
  44. <style lang="scss" scoped>
  45. .setting_contaienr {
  46. display: flex;
  47. align-items: center;
  48. margin-bottom: 30px;
  49. height: 580px;
  50. box-sizing: border-box;
  51. .left_container {
  52. height: 580px;
  53. width: 424px;
  54. margin-right: 30px;
  55. box-sizing: border-box;
  56. border-radius: 16px;
  57. background: #ffffff;
  58. padding: 20px;
  59. padding-bottom: 180px;
  60. display: grid;
  61. grid-template-columns: repeat(1, 1fr);
  62. grid-template-rows: repeat(4, 1fr);
  63. row-gap: 20px;
  64. .tab_wrap {
  65. width: 384px;
  66. height: 80px;
  67. border-radius: 14px;
  68. background: #f6f6f6;
  69. box-sizing: border-box;
  70. display: flex;
  71. align-items: center;
  72. justify-content: space-between;
  73. padding: 0 18px;
  74. padding-left: 37px;
  75. position: relative;
  76. .title {
  77. font-family: Zona Pro;
  78. font-size: 18px;
  79. font-weight: normal;
  80. letter-spacing: 0.06em;
  81. color: #000000;
  82. }
  83. .active {
  84. color: #06518b;
  85. }
  86. .btn {
  87. width: 87px;
  88. height: 45px;
  89. border-radius: 23px;
  90. background: #06518b;
  91. display: flex;
  92. align-items: center;
  93. justify-content: center;
  94. font-family: Source Han Sans CN;
  95. font-size: 14px;
  96. font-weight: normal;
  97. letter-spacing: 0.1em;
  98. color: #ffffff;
  99. }
  100. .active_line {
  101. position: absolute;
  102. left: 20px;
  103. top: 24px;
  104. width: 4px;
  105. height: 32px;
  106. border-radius: 2px;
  107. background: #06518b;
  108. }
  109. }
  110. }
  111. .right_container {
  112. height: 580px;
  113. flex: 1;
  114. box-sizing: border-box;
  115. border-radius: 16px;
  116. background: #ffffff;
  117. overflow: hidden;
  118. }
  119. }
  120. </style>