TheDrawer.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <script setup lang="ts">
  2. const modelValue = defineModel<boolean>();
  3. const handlerCloseDrawer = () => {
  4. modelValue.value = false;
  5. };
  6. </script>
  7. <template>
  8. <n-drawer v-model:show="modelValue" placement="right" default-width="100%">
  9. <n-drawer-content
  10. :body-style="{ padding: 0 }"
  11. :body-content-style="{ padding: 0 }"
  12. :footer-style="{background: '#fff', borderColor: '#eee'}"
  13. >
  14. <div class="menu-container">
  15. <ul class="logo-content">
  16. <li>
  17. <BaseIcon name="logo3" width="87" height="34" />
  18. </li>
  19. <li class="close-x" @click="handlerCloseDrawer">
  20. </li>
  21. </ul>
  22. <BaseMenu mode="vertical" @on-menu-item="() => modelValue = false "></BaseMenu>
  23. </div>
  24. <template #footer>
  25. <ul class="drawer-footer">
  26. <li>
  27. 010-63366692
  28. </li>
  29. <li>
  30. <BaseLang></BaseLang>
  31. </li>
  32. </ul>
  33. </template>
  34. </n-drawer-content>
  35. </n-drawer>
  36. </template>
  37. <style scoped lang="scss">
  38. $closeXSize: 20px;
  39. $closeXLine: 2px;
  40. .menu-container {
  41. height: 100%;
  42. // background: #1e2534;
  43. background: #fff;
  44. .logo-content {
  45. @include flex(x, center, between);
  46. height: 60px;
  47. padding: 0 10px;
  48. .img {
  49. width: 89px;
  50. height: 36px;
  51. }
  52. .close-x {
  53. position: relative;
  54. display: inline-block;
  55. width: $closeXSize;
  56. height: $closeXSize;
  57. cursor: pointer;
  58. &::before,
  59. &::after {
  60. position: absolute;
  61. left: 50%;
  62. width: 2px;
  63. height: 100%;
  64. margin-left: 1px;
  65. content: ' ';
  66. transform: rotate(-45deg);
  67. background: #1e2534;
  68. }
  69. &::after {
  70. transform: rotate(45deg);
  71. }
  72. }
  73. }
  74. }
  75. .drawer-footer {
  76. display: flex;
  77. align-items: center;
  78. justify-content: space-between;
  79. width: 100%;
  80. color: #161616;
  81. }
  82. </style>