index.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <div class="layout">
  3. <LayoutTop />
  4. <template v-if="isBottom">
  5. <div class="sliderLayout">
  6. <div class="shortLine"></div>
  7. </div>
  8. <LayoutBottom />
  9. </template>
  10. </div>
  11. </template>
  12. <script lang="ts">
  13. import LayoutTop from './components/top.vue';
  14. import LayoutBottom from './components/bottom.vue';
  15. import { defineComponent, ref } from 'vue';
  16. import { handleOrderData } from '@/common/setup/order/orderData';
  17. // 控制下半部分是否显示
  18. function submitBottomIsShow() {
  19. const isShowBottomPart = ref<boolean>(false);
  20. function chooseMenu(value: boolean) {
  21. isShowBottomPart.value = value;
  22. }
  23. return { isShowBottomPart, chooseMenu };
  24. }
  25. export default defineComponent({
  26. name: 'layout',
  27. components: {
  28. LayoutTop,
  29. LayoutBottom,
  30. },
  31. setup() {
  32. const { isBottom } = handleOrderData();
  33. return { isBottom };
  34. },
  35. });
  36. </script>
  37. <style lang="less">
  38. .layout {
  39. .flex;
  40. width: 100%;
  41. height: 100%;
  42. flex-direction: column;
  43. .sliderLayout {
  44. width: 100%;
  45. height: 4px;
  46. background: @m-black0;
  47. border-top: 1px solid @m-grey5;
  48. border-bottom: 1px solid @m-grey5;
  49. position: relative;
  50. .shortLine {
  51. width: 30px;
  52. height: 2px;
  53. background: @m-black20;
  54. border-radius: 1px;
  55. .position(absolute, 50%, auto, auto, 50%);
  56. transform: translate(-50%, -50%);
  57. }
  58. }
  59. }
  60. </style>