index.vue 5.8 KB

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