mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-11 02:33:51 +00:00
CustomTradeList - support pagination
This commit is contained in:
parent
7bc6192f73
commit
7bcc2e44ac
|
@ -2,7 +2,7 @@
|
||||||
<div class="h-100 overflow-auto w-100 m-1">
|
<div class="h-100 overflow-auto w-100 m-1">
|
||||||
<b-list-group>
|
<b-list-group>
|
||||||
<b-list-group-item
|
<b-list-group-item
|
||||||
v-for="trade in trades"
|
v-for="trade in filteredTrades"
|
||||||
:key="trade.trade_id"
|
:key="trade.trade_id"
|
||||||
class="border border-secondary rounded my-05 px-2"
|
class="border border-secondary rounded my-05 px-2"
|
||||||
>
|
>
|
||||||
|
@ -105,7 +105,14 @@ export default class CustomTradeList extends Vue {
|
||||||
return this.trades.length;
|
return this.trades.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
perPage = this.activeTrades ? 200 : 15;
|
perPage = this.activeTrades ? 200 : 25;
|
||||||
|
|
||||||
|
get filteredTrades() {
|
||||||
|
return this.trades.slice(
|
||||||
|
(this.currentPage - 1) * this.perPage,
|
||||||
|
this.currentPage * this.perPage,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
formatPriceWithDecimals(price) {
|
formatPriceWithDecimals(price) {
|
||||||
return formatPrice(price, this.stakeCurrencyDecimals);
|
return formatPrice(price, this.stakeCurrencyDecimals);
|
||||||
|
@ -188,14 +195,4 @@ export default class CustomTradeList extends Vue {
|
||||||
margin-top: 0.125rem;
|
margin-top: 0.125rem;
|
||||||
margin-bottom: 0.125rem;
|
margin-bottom: 0.125rem;
|
||||||
}
|
}
|
||||||
.card-body {
|
|
||||||
padding: 0 0.2em;
|
|
||||||
}
|
|
||||||
.table-sm {
|
|
||||||
font-size: $fontsize-small;
|
|
||||||
}
|
|
||||||
.btn-xs {
|
|
||||||
padding: 0.1rem 0.25rem;
|
|
||||||
font-size: 0.75rem;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user