index.vue 5.2 KB

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