index.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <template>
  2. <div class="app-container classifiedGrading">
  3. <div class="top-button-max-box">
  4. <div class="top-button-box" @click="buttonPageType(1)">
  5. <p :class="pageType == 1 ? 'p-color':''">基础配置</p>
  6. <p :class="pageType == 1 ? 'p-back':''"></p>
  7. </div>
  8. <div class="top-button-box" @click="buttonPageType(2)">
  9. <p :class="pageType == 2 ? 'p-color':''">化学品终端</p>
  10. <p :class="pageType == 2 ? 'p-back':''"></p>
  11. </div>
  12. <div class="top-button-box" @click="buttonPageType(3)">
  13. <p :class="pageType == 3 ? 'p-color':''">一体机</p>
  14. <p :class="pageType == 3 ? 'p-back':''"></p>
  15. </div>
  16. <div class="top-button-box" @click="buttonPageType(4)">
  17. <p :class="pageType == 4 ? 'p-color':''">小程序</p>
  18. <p :class="pageType == 4 ? 'p-back':''"></p>
  19. </div>
  20. <div class="top-button-box" @click="buttonPageType(5)">
  21. <p :class="pageType == 5 ? 'p-color':''">开发配置</p>
  22. <p :class="pageType == 5 ? 'p-back':''"></p>
  23. </div>
  24. </div>
  25. <basics-config v-if="pageType == 1"></basics-config>
  26. <chemicals-config v-if="pageType == 2"></chemicals-config>
  27. <integrationConfig v-if="pageType == 3"></integrationConfig>
  28. <program-config v-if="pageType == 4"></program-config>
  29. <exploit-config v-if="pageType == 5"></exploit-config>
  30. </div>
  31. </template>
  32. <script>
  33. import basicsConfig from "./basicsConfig.vue";
  34. import chemicalsConfig from "./chemicalsConfig.vue";
  35. import integrationConfig from "./integrationConfig.vue";
  36. import programConfig from "./programConfig.vue";
  37. import exploitConfig from "./exploitConfig.vue";
  38. export default {
  39. name: "index",
  40. components: {
  41. basicsConfig,
  42. chemicalsConfig,
  43. integrationConfig,
  44. programConfig,
  45. exploitConfig,
  46. },
  47. data() {
  48. return {
  49. pageType:1,
  50. }
  51. },
  52. created() {
  53. },
  54. mounted(){
  55. },
  56. methods:{
  57. // 选项卡切换
  58. buttonPageType(type){
  59. if(this.pageType != type){
  60. this.pageType = type;
  61. }
  62. },
  63. }
  64. }
  65. </script>
  66. <style scoped lang="scss">
  67. .classifiedGrading{
  68. flex:1;
  69. display: flex;
  70. flex-direction: column;
  71. *{
  72. margin:0;
  73. }
  74. .top-button-max-box{
  75. display: flex;
  76. padding:16px 10px 0;
  77. border-bottom:1px solid #D8D8D8;
  78. .top-button-box{
  79. height:73px;
  80. padding:0 25px;
  81. p:nth-child(1){
  82. line-height:68px;
  83. text-align: center;
  84. font-weight:500;
  85. cursor: pointer;
  86. }
  87. p:nth-child(2){
  88. height:5px;
  89. border-radius:2px;
  90. }
  91. .p-color{
  92. color:#0045AF;
  93. }
  94. .p-back{
  95. background: #0045AF;
  96. }
  97. }
  98. }
  99. }
  100. </style>