index.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <template>
  2. <div class="drawer">
  3. <a-drawer :placement="placement"
  4. :closable="false"
  5. :visible="visible"
  6. class="tradeDialog">
  7. <!-- 摘牌是top 挂牌是bottom 期货交易是tradeDialog -->
  8. <div class="collapse"
  9. @click="cancel"></div>
  10. <div class="collapseCont">
  11. <!-- <div class="title">{{ title }}</div> -->
  12. <div class="content highContent">
  13. <!-- <Listed></Listed> -->
  14. <!-- <Delisting></Delisting> -->
  15. <Trade></Trade>
  16. </div>
  17. </div>
  18. </a-drawer>
  19. </div>
  20. </template>
  21. <script lang="ts">
  22. import { defineComponent, ref, PropType } from 'vue';
  23. import { closeModal, ModalName } from '@/setup/controlModal/index';
  24. import Listed from '@/views/market/warehouseTrade/components/listed/index.vue';
  25. import Delisting from '@/views/market/warehouseTrade/components/delisting/index.vue';
  26. import Trade from '@/views/market/warehouseTrade/components/trade/index.vue';
  27. interface Key {
  28. [propName: string]: string;
  29. }
  30. export default defineComponent({
  31. name: 'drawer',
  32. props: {
  33. modalName: {
  34. default: 'drawer',
  35. type: String as PropType<keyof ModalName>,
  36. },
  37. title: {
  38. default: '',
  39. type: String,
  40. },
  41. placement: {
  42. // 需要绑定的值得 key
  43. default: 'right',
  44. type: String,
  45. },
  46. },
  47. components: {
  48. Listed,
  49. Delisting,
  50. Trade,
  51. },
  52. setup(props, context) {
  53. const { visible, cancel } = closeModal(props.modalName);
  54. return {
  55. visible,
  56. cancel,
  57. };
  58. },
  59. });
  60. </script>
  61. <style lang="less">
  62. .bottom {
  63. .position(fixed, auto, 0, -2px, auto);
  64. width: 586px;
  65. height: 330px;
  66. background: transparent;
  67. z-index: 10;
  68. }
  69. .top {
  70. .position(fixed, 116px, 0, auto, auto);
  71. width: 446px;
  72. height: 350px;
  73. background: transparent;
  74. z-index: 10;
  75. }
  76. .tradeDialog {
  77. .position(fixed, 116px, 0, auto, auto);
  78. width: 467px;
  79. height: 310px;
  80. background: transparent;
  81. z-index: 10;
  82. }
  83. .ant-drawer.ant-drawer-open {
  84. .ant-drawer-mask {
  85. background: transparent;
  86. }
  87. .ant-drawer-content-wrapper {
  88. width: 586px !important;
  89. box-shadow: none;
  90. .ant-drawer-content {
  91. background: transparent;
  92. .ant-drawer-wrapper-body {
  93. overflow: hidden;
  94. .ant-drawer-body {
  95. width: 100%;
  96. height: 100%;
  97. padding: 0;
  98. .inlineflex;
  99. .collapse {
  100. width: 26px;
  101. height: 66px;
  102. margin-top: 15px;
  103. background: url(../../assets/images/dialogClose.png) center center no-repeat;
  104. background-size: cover;
  105. }
  106. .collapseCont {
  107. flex: 1;
  108. height: 100%;
  109. border: 2px solid @m-blue0;
  110. border-right: 0;
  111. .flex;
  112. flex-direction: column;
  113. .title {
  114. width: 100%;
  115. height: 36px;
  116. line-height: 36px;
  117. text-align: center;
  118. background: linear-gradient(0deg, @m-blue4, @m-blue5);
  119. font-size: 16px;
  120. color: @m-white1;
  121. border-bottom: 2px solid @m-blue0;
  122. }
  123. .content {
  124. flex: 1;
  125. width: 100%;
  126. max-height: calc(100% - 36px);
  127. overflow-y: auto;
  128. background: @m-grey11;
  129. }
  130. .highContent {
  131. max-height: 100%;
  132. }
  133. }
  134. }
  135. }
  136. }
  137. }
  138. }
  139. </style>;