huangbin 4 년 전
부모
커밋
21777c0f17

+ 0 - 7
src/assets/styles/mixin.less

@@ -1834,9 +1834,6 @@ input:-internal-autofill-selected {
                     text-overflow: ellipsis;
                     overflow: hidden;
                 }
-                th:first-child {
-                    display: none;
-                }
             }
         }
         .ant-table-tbody {
@@ -1857,9 +1854,6 @@ input:-internal-autofill-selected {
                     background: rgba(@m-red1, .1) !important;
                     color: @m-white1;
                 }
-                td:first-child {
-                    display: none;
-                }
             }
             // tr.ant-table-expanded-row:hover { //tr.ant-table-expanded-row,
             //     td {
@@ -1883,7 +1877,6 @@ input:-internal-autofill-selected {
         }
     }
     .ant-table-row-expand-icon {
-        display: none;
         border-color: @m-grey17;
         background-color: transparent;
         color:  @m-grey17;

+ 5 - 2
src/common/setup/table/clolumn.ts

@@ -42,7 +42,7 @@ export function getTableColumns() {
             // 序号
             if (columntitle === '序号') {
                 item.customRender = (obj: any) => `${obj.index + 1}`
-                // item.width = 30
+                item.width = 30
             }
             // 设置表格宽度,默认120
             if (columnwidth && columnwidth !== '0') {
@@ -125,4 +125,7 @@ function getFromatterFn(val: string) {
     }
     return result
 }
-
+// table的expandIcon属性,修改默认展开关闭按钮 子表无数据时不显示展开图标
+export function expandIcon(props: any) {
+    return null
+}

+ 28 - 26
src/views/market/spot_trade/components/buy-sell-market/components/buy/index.vue

@@ -1,30 +1,30 @@
 <template>
-    <!-- 买大厅 -->
-    <a-table
-        :columns="columns"
-        class="buyHallTable"
-        :scroll="{ x: '100%', y: 'calc(100vh- 470px)' }"
-        :pagination="false"
-        :loading="loading"
-        :expandedRowKeys="expandedRowKeys"
-        :customRow="Rowclick"
-        rowKey="key"
-        :data-source="tableList"
-    >
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{ record }">
-            <BtnList :btnList="btnList" :record="record" @click="openComponent" />
-        </template>
-    </a-table>
-    <component
-        :is="componentId"
-        v-if="componentId"
-        :selectedRow="selectedRow"
-        :buyOrSell="BuyOrSell.buy"
-        :enumName="enumName"
-        :parantSelectedRow="parantSelectedRow"
-        @cancel="closeComponent"
-    ></component>
+  <!-- 买大厅 -->
+  <a-table :columns="columns"
+           class="buyHallTable"
+           :scroll="{ x: '100%', y: 'calc(100vh- 470px)' }"
+           :pagination="false"
+           :loading="loading"
+           :expandedRowKeys="expandedRowKeys"
+           :customRow="Rowclick"
+           :expandIcon="expandIcon"
+           :expandIconAsCell="false"
+           rowKey="key"
+           :data-source="tableList">
+    <!-- 额外的展开行 -->
+    <template #expandedRowRender="{ record }">
+      <BtnList :btnList="btnList"
+               :record="record"
+               @click="openComponent" />
+    </template>
+  </a-table>
+  <component :is="componentId"
+             v-if="componentId"
+             :selectedRow="selectedRow"
+             :buyOrSell="BuyOrSell.buy"
+             :enumName="enumName"
+             :parantSelectedRow="parantSelectedRow"
+             @cancel="closeComponent"></component>
 </template>
 
 <script lang="ts">
@@ -37,6 +37,7 @@ import { defineAsyncComponent, PropType } from 'vue';
 import { BtnList as btnListType } from '@/common/components/btnList/interface';
 import { getBuyMarketParam } from '../../setup';
 import { BuyOrSell } from '@/common/constants/enumCommon';
+import { expandIcon } from '@/common/setup/table/clolumn';
 
 export default defineComponent({
     emits: ['cancel', 'openComponent'],
@@ -89,6 +90,7 @@ export default defineComponent({
             loading,
             tableList,
             enumName: props.enumName,
+            expandIcon,
         };
     },
 });

+ 28 - 26
src/views/market/spot_trade/components/buy-sell-market/components/sell/index.vue

@@ -1,30 +1,30 @@
 <template>
-    <!-- 卖大厅 -->
-    <a-table
-        :columns="columns"
-        class="sellHallTable"
-        :scroll="{ x: '100%', y: 'calc(100vh - 470px)' }"
-        :pagination="false"
-        :loading="loading"
-        :expandedRowKeys="expandedRowKeys"
-        :customRow="Rowclick"
-        rowKey="key"
-        :data-source="tableList"
-    >
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{ record }">
-            <BtnList :btnList="btnList" :record="record" @click="openComponent" />
-        </template>
-    </a-table>
-    <component
-        :is="componentId"
-        v-if="componentId"
-        :selectedRow="selectedRow"
-        :enumName="enumName"
-        :buyOrSell="BuyOrSell.sell"
-        :parantSelectedRow="parantSelectedRow"
-        @cancel="closeComponent"
-    ></component>
+  <!-- 卖大厅 -->
+  <a-table :columns="columns"
+           class="sellHallTable"
+           :scroll="{ x: '100%', y: 'calc(100vh - 470px)' }"
+           :pagination="false"
+           :loading="loading"
+           :expandedRowKeys="expandedRowKeys"
+           :customRow="Rowclick"
+           :expandIcon="expandIcon"
+           :expandIconAsCell="false"
+           rowKey="key"
+           :data-source="tableList">
+    <!-- 额外的展开行 -->
+    <template #expandedRowRender="{ record }">
+      <BtnList :btnList="btnList"
+               :record="record"
+               @click="openComponent" />
+    </template>
+  </a-table>
+  <component :is="componentId"
+             v-if="componentId"
+             :selectedRow="selectedRow"
+             :enumName="enumName"
+             :buyOrSell="BuyOrSell.sell"
+             :parantSelectedRow="parantSelectedRow"
+             @cancel="closeComponent"></component>
 </template>
 
 <script lang="ts">
@@ -37,6 +37,7 @@ import { defineAsyncComponent, PropType } from 'vue';
 import { BtnList as btnListType } from '@/common/components/btnList/interface';
 import { getSellMarketParam } from '../../setup';
 import { BuyOrSell } from '@/common/constants/enumCommon';
+import { expandIcon } from '@/common/setup/table/clolumn';
 
 export default defineComponent({
     emits: ['cancel', 'openComponent'],
@@ -91,6 +92,7 @@ export default defineComponent({
             tableList,
             BuyOrSell,
             enumName: props.enumName,
+            expandIcon,
         };
     },
 });