huangbin vor 4 Jahren
Ursprung
Commit
98dad440b7

+ 8 - 3
src/views/market/spot_trade/components/buy-sell-market/components/buy/index.vue

@@ -13,18 +13,22 @@
     <template #expandedRowRender="{ record }">
       <BtnList :btnList="btnList"
                :record="record"
-               @click="open" />
+               @click="openComponent" />
     </template>
   </a-table>
+  <component :is="componentId"
+             v-if="componentId"
+             :selectedRow="selectedRow"
+             @cancel="closeComponent"></component>
 </template>
 
 <script lang="ts">
 import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { ComposeTableParam, BtnList, defineComponent, handleComposeTable, queryTableList } from '@/common/export/commonTable';
+import { ComposeTableParam, BtnList, defineComponent, handleComposeTable, queryTableList, ModalEnum } from '@/common/export/commonTable';
 import { _closeModal } from '@/common/setup/modal/modal';
 import { queryOrderQuoteDetail } from '@/services/go/wrtrade';
 import { QueryOrderQuoteDetailReq, WrOrderQuote, WrOrderQuoteDetail } from '@/services/go/wrtrade/interface';
-import { PropType } from 'vue';
+import { defineAsyncComponent, PropType } from 'vue';
 import { BtnList as btnListType } from '@/common/components/btnList/interface';
 import { getBuyMarketParam } from '../../setup';
 
@@ -47,6 +51,7 @@ export default defineComponent({
     },
     components: {
         BtnList,
+        [ModalEnum.spot_trade_warehouse_delisting]: defineAsyncComponent(() => import('../delisting/index.vue')),
     },
     setup(props, context) {
         // 表格列表数据

+ 8 - 3
src/views/market/spot_trade/components/buy-sell-market/components/sell/index.vue

@@ -14,18 +14,22 @@
     <template #expandedRowRender="{ record }">
       <BtnList :btnList="btnList"
                :record="record"
-               @click="open" />
+               @click="openComponent" />
     </template>
   </a-table>
+  <component :is="componentId"
+             v-if="componentId"
+             :selectedRow="selectedRow"
+             @cancel="closeComponent"></component>
 </template>
 
 <script lang="ts">
 import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { ComposeTableParam, BtnList, defineComponent, handleComposeTable, queryTableList } from '@/common/export/commonTable';
+import { ComposeTableParam, BtnList, defineComponent, handleComposeTable, queryTableList, ModalEnum } from '@/common/export/commonTable';
 import { _closeModal } from '@/common/setup/modal/modal';
 import { queryOrderQuoteDetail } from '@/services/go/wrtrade';
 import { QueryOrderQuoteDetailReq, WrOrderQuote, WrOrderQuoteDetail } from '@/services/go/wrtrade/interface';
-import { PropType } from 'vue';
+import { defineAsyncComponent, PropType } from 'vue';
 import { BtnList as btnListType } from '@/common/components/btnList/interface';
 import { getSellMarketParam } from '../../setup';
 
@@ -48,6 +52,7 @@ export default defineComponent({
     },
     components: {
         BtnList,
+        [ModalEnum.spot_trade_warehouse_delisting]: defineAsyncComponent(() => import('../delisting/index.vue')),
     },
     setup(props, context) {
         // 表格列表数据

+ 1 - 7
src/views/market/spot_trade/components/buy-sell-market/index.vue

@@ -54,22 +54,17 @@
       <a-col :span="12"
              v-if="buyMarket.isMarket">
         <Buy :enumName="enumName"
-             @openComponent="openComponent"
              :selectedRow="selectedRow"
              :btnList="buyMarket.btnList" />
       </a-col>
       <a-col :span="12"
              v-if="sellMarket.isMarket">
         <Sell :enumName="enumName"
-              @openComponent="openComponent"
               :selectedRow="selectedRow"
               :btnList="sellMarket.btnList" />
       </a-col>
     </a-row>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"></component>
+
   </div>
 </template>
 
@@ -110,7 +105,6 @@ export default defineComponent({
         LineChartOutlined,
         [ModalEnum.spot_trade_warehouse_detail]: defineAsyncComponent(() => import('../detail/index.vue')),
         [ModalEnum.spot_trade_warehouse_post_buying]: defineAsyncComponent(() => import('../post_buying/index.vue')),
-        [ModalEnum.spot_trade_warehouse_delisting]: defineAsyncComponent(() => import('./components/delisting/index.vue')),
     },
     setup(props, context) {
         const { visible, cancel } = _closeModal(context);