Commit ce7be63b authored by chenqikuai's avatar chenqikuai

fix: 复用组件

parent 6022e11f
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
> >
<template slot="empty"> <template slot="empty">
<div> <div>
<!-- <div class="loading-line"></div> -->
<span v-if="!Loading && Trades.length === 0"> <span v-if="!Loading && Trades.length === 0">
{{ $t('lang.page.nodata') }} {{ $t('lang.page.nodata') }}
</span> </span>
...@@ -43,9 +42,6 @@ ...@@ -43,9 +42,6 @@
<el-table-column :label="$t('lang.trade.hash')"> <el-table-column :label="$t('lang.trade.hash')">
<template slot-scope="item"> <template slot-scope="item">
<div> <div>
<!-- <p class="group-title" v-if="item.row.tradeG === 2">
{{ $t('txDetail.groupTx') }}
</p> -->
<router-link <router-link
:to="`/tradeHash?hash=${item.row.hash}`" :to="`/tradeHash?hash=${item.row.hash}`"
class="light flex-left text-footer-color" class="light flex-left text-footer-color"
...@@ -142,13 +138,14 @@ ...@@ -142,13 +138,14 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import Vue from 'vue' import Vue, { PropType } from 'vue'
import { tradeAccuracy } from '@/utils/common' import { tradeAccuracy } from '@/utils/common'
import { Table, TableColumn } from 'element-ui' import { Table, TableColumn } from 'element-ui'
import PageContainer from '@/components/pc/BlockChainBrowser/PageContainer.vue' import PageContainer from '@/components/pc/BlockChainBrowser/PageContainer.vue'
import TxStatus from '../txStatus.vue' import TxStatus from '../txStatus.vue'
import arrowRightBlue from '@/assets/images/blockChainBrowser/blockDetail/arrow-right-blue.png' import arrowRightBlue from '@/assets/images/blockChainBrowser/blockDetail/arrow-right-blue.png'
import arrowRightDark from '@/assets/images/blockChainBrowser/blockDetail/arrow-right-dark.png' import arrowRightDark from '@/assets/images/blockChainBrowser/blockDetail/arrow-right-dark.png'
import { icustomized2Tx } from '@/types/trade'
export default Vue.extend({ export default Vue.extend({
components: { components: {
...@@ -162,7 +159,7 @@ export default Vue.extend({ ...@@ -162,7 +159,7 @@ export default Vue.extend({
type: Boolean, type: Boolean,
default: false, default: false,
}, },
Trades: Array, Trades: Array as PropType<icustomized2Tx[]>,
Loading: Boolean, Loading: Boolean,
groupCellName: Function, groupCellName: Function,
pageChange: Function, pageChange: Function,
......
...@@ -28,8 +28,16 @@ ...@@ -28,8 +28,16 @@
:total="pages.total" :total="pages.total"
></page-container> ></page-container>
</div> </div>
<TradeTable2
:Trades="txList"
:Loading="loading"
:groupCellName="groupCellName"
:pageChange="pageChange"
:sizeChange="sizeChange"
:pages="pages"
></TradeTable2>
<!-- 表格部分 --> <!-- 表格部分 -->
<el-table <!-- <el-table
:data="txList" :data="txList"
stripe stripe
style="width: 100%;" style="width: 100%;"
...@@ -41,7 +49,6 @@ ...@@ -41,7 +49,6 @@
> >
<template slot="empty"> <template slot="empty">
<div> <div>
<!-- <div class="loading-line"></div> -->
<span v-if="!loading && txList.length === 0"> <span v-if="!loading && txList.length === 0">
{{ $t('lang.page.nodata') }} {{ $t('lang.page.nodata') }}
</span> </span>
...@@ -73,9 +80,6 @@ ...@@ -73,9 +80,6 @@
<el-table-column :label="$t('lang.trade.hash')"> <el-table-column :label="$t('lang.trade.hash')">
<template slot-scope="item"> <template slot-scope="item">
<div> <div>
<!-- <p class="group-title" v-if="item.row.tradeG === 2">
{{ $t('txDetail.groupTx') }}
</p> -->
<router-link <router-link
:to="`/tradeHash?hash=${item.row.hash}`" :to="`/tradeHash?hash=${item.row.hash}`"
class="light flex-left text-footer-color" class="light flex-left text-footer-color"
...@@ -164,9 +168,9 @@ ...@@ -164,9 +168,9 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="40"></el-table-column> <el-table-column width="40"></el-table-column>
</el-table> </el-table> -->
<!-- 底部分页 --> <!-- 底部分页 -->
<div class="bottom-page flex justify-end"> <!-- <div class="bottom-page flex justify-end">
<page-container <page-container
@pageChange="pageChange" @pageChange="pageChange"
@sizeChange="sizeChange" @sizeChange="sizeChange"
...@@ -174,7 +178,7 @@ ...@@ -174,7 +178,7 @@
:pageSize="pages.pageSize" :pageSize="pages.pageSize"
:total="pages.total" :total="pages.total"
></page-container> ></page-container>
</div> </div> -->
</div> </div>
</div> </div>
</template> </template>
...@@ -183,13 +187,21 @@ import VueTypedMixins from 'vue-typed-mixins' ...@@ -183,13 +187,21 @@ import VueTypedMixins from 'vue-typed-mixins'
import ChainSearch from '@/components/pc/BlockChainBrowser/ChainSearch.vue' import ChainSearch from '@/components/pc/BlockChainBrowser/ChainSearch.vue'
import PageContainer from '@/components/pc/BlockChainBrowser/PageContainer.vue' import PageContainer from '@/components/pc/BlockChainBrowser/PageContainer.vue'
import TradeTable from '@/components/pc/BlockChainBrowser/TradeTable/index.vue' import TradeTable from '@/components/pc/BlockChainBrowser/TradeTable/index.vue'
import TradeTable2 from '@/components/pc/BlockChainBrowser/TradeTable2.vue'
import arrowRightBlue from '@/assets/images/blockChainBrowser/blockDetail/arrow-right-blue.png' import arrowRightBlue from '@/assets/images/blockChainBrowser/blockDetail/arrow-right-blue.png'
import arrowRightDark from '@/assets/images/blockChainBrowser/blockDetail/arrow-right-dark.png' import arrowRightDark from '@/assets/images/blockChainBrowser/blockDetail/arrow-right-dark.png'
import Count from '@/components/pc/BlockChainBrowser/Count.vue' import Count from '@/components/pc/BlockChainBrowser/Count.vue'
import tradeMixin from '@/mixin/trade' import tradeMixin from '@/mixin/trade'
import TxStatus from '@/components/pc/txStatus.vue' import TxStatus from '@/components/pc/txStatus.vue'
export default VueTypedMixins(tradeMixin).extend({ export default VueTypedMixins(tradeMixin).extend({
components: { ChainSearch, PageContainer, Count, TradeTable, TxStatus }, components: {
ChainSearch,
PageContainer,
Count,
TradeTable,
TxStatus,
TradeTable2,
},
data() { data() {
return { return {
arrowRightBlue, arrowRightBlue,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment