index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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/modal/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. .ant-drawer-content-wrapper {
  69. width: 586px !important;
  70. }
  71. }
  72. .top {
  73. .position(fixed, 116px, 0, auto, auto);
  74. width: 446px;
  75. height: 350px;
  76. background: transparent;
  77. z-index: 10;
  78. .ant-drawer-content-wrapper {
  79. width: 446px !important;
  80. }
  81. }
  82. .tradeDialog {
  83. .position(fixed, 116px, 0, auto, auto);
  84. width: 467px;
  85. height: 310px;
  86. background: transparent;
  87. z-index: 10;
  88. .ant-drawer-content-wrapper {
  89. width: 467px !important;
  90. }
  91. }
  92. .ant-drawer.ant-drawer-open {
  93. .ant-drawer-mask {
  94. background: transparent;
  95. }
  96. .ant-drawer-content-wrapper {
  97. box-shadow: none;
  98. .ant-drawer-content {
  99. background: transparent;
  100. .ant-drawer-wrapper-body {
  101. overflow: hidden;
  102. .ant-drawer-body {
  103. width: 100%;
  104. height: 100%;
  105. padding: 0;
  106. .inlineflex;
  107. .collapse {
  108. width: 26px;
  109. height: 66px;
  110. margin-top: 15px;
  111. background: url(../../assets/images/dialogClose.png) center center no-repeat;
  112. background-size: cover;
  113. }
  114. .collapseCont {
  115. flex: 1;
  116. height: 100%;
  117. border: 2px solid @m-blue0;
  118. border-right: 0;
  119. .flex;
  120. flex-direction: column;
  121. .title {
  122. width: 100%;
  123. height: 36px;
  124. line-height: 36px;
  125. text-align: center;
  126. background: linear-gradient(0deg, @m-blue4, @m-blue5);
  127. font-size: 16px;
  128. color: @m-white1;
  129. border-bottom: 2px solid @m-blue0;
  130. }
  131. .content {
  132. flex: 1;
  133. width: 100%;
  134. max-height: calc(100% - 36px);
  135. overflow-y: auto;
  136. background: @m-grey11;
  137. }
  138. .highContent {
  139. max-height: 100%;
  140. }
  141. }
  142. }
  143. }
  144. }
  145. }
  146. }
  147. </style>;