index.vue 4.8 KB

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