index.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <headerBar
  3. title="初始设备调频设置"
  4. />
  5. <div class="page">
  6. <div class="tabs">
  7. <div class="tab" @click="handleSelect(1)" :class="{active:activeIndex == 1}">设置</div>
  8. <div class="tab" @click="handleSelect(2)" :class="{active:activeIndex == 2}">MCU其他配置设置</div>
  9. <div class="tab" @click="handleSelect(3)" :class="{active:activeIndex == 3}">RS485调试发送</div>
  10. </div>
  11. <normal v-if="activeIndex == 1"/>
  12. <mcu v-if="activeIndex == 2"/>
  13. <cmd v-if="activeIndex == 3"/>
  14. </div>
  15. </template>
  16. <script setup lang="ts">
  17. import headerBar from '@/components/header-bar/index.vue'
  18. import normal from './normal'
  19. import mcu from './mcu'
  20. import cmd from './cmd'
  21. import { ref } from 'vue'
  22. const activeIndex = ref('1')
  23. const handleSelect = (key) => {
  24. activeIndex.value = key
  25. }
  26. </script>
  27. <style scoped lang="scss">
  28. .page {
  29. min-height: calc(100vh - 30px);
  30. }
  31. .tabs {
  32. height: 40px;
  33. line-height: 40px;
  34. position: sticky;
  35. top:30px;
  36. background: #fff;
  37. z-index: 100;
  38. .tab {
  39. height: 38px;
  40. line-height: 40px;
  41. }
  42. }
  43. </style>