index.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <div class="mainContentBox">
  3. <el-tabs
  4. v-model="activeName"
  5. class="demo-tabs"
  6. type="card"
  7. @tab-click="handleClick"
  8. >
  9. <el-tab-pane label="预齐套" name="first">
  10. <div class="contentBox">
  11. <First />
  12. </div>
  13. </el-tab-pane>
  14. <el-tab-pane label="出库" name="second">
  15. <div v-if="activeName === 'second'" class="contentBox">
  16. <StorageOut />
  17. </div>
  18. </el-tab-pane>
  19. <el-tab-pane label="Third" name="third">
  20. <div class="contentBox">
  21. <Third />
  22. </div>
  23. </el-tab-pane>
  24. </el-tabs>
  25. </div>
  26. </template>
  27. <script lang="ts" setup>
  28. import First from "./components/first.vue";
  29. import StorageOut from "@/views/storage-out/index.vue";
  30. import Third from "./components/third.vue";
  31. import { TabsPaneContext } from "element-plus";
  32. const activeName = ref("first");
  33. const handleClick = (tab: TabsPaneContext, event: Event) => {};
  34. </script>
  35. <style lang="scss" scoped>
  36. :deep(.el-tabs--card > .el-tabs__header .el-tabs__nav) {
  37. background: rgba(0, 0, 0, 0.1);
  38. border-radius: 16px 16px 16px 16px;
  39. overflow: hidden;
  40. border: 0;
  41. }
  42. :deep(.el-tabs--card > .el-tabs__header) {
  43. height: 80px;
  44. border: 0;
  45. overflow: hidden;
  46. border-radius: 16px 16px 16px 16px;
  47. }
  48. :deep(.el-tabs--card > .el-tabs__header .el-tabs__item) {
  49. width: 290px;
  50. height: 80px;
  51. border-radius: 0;
  52. font-weight: 500;
  53. font-size: 24px;
  54. overflow: hidden;
  55. background: transparent;
  56. border-color: transparent;
  57. }
  58. :deep(.el-tabs--card > .el-tabs__header .el-tabs__item.is-active) {
  59. background: white;
  60. border-radius: 16px 16px 16px 16px;
  61. border-color: transparent;
  62. overflow: hidden;
  63. }
  64. .contentBox {
  65. height: calc(100vh - 199px);
  66. }
  67. </style>