mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 18:23:50 +00:00
typing for selectedTrade and sorting to setup()
This commit is contained in:
parent
b41cee496a
commit
d2acee7c93
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<b-list-group>
|
||||
<b-list-group-item
|
||||
v-for="trade in trades.sort((a,b) => a.open_timestamp < b.open_timestamp)"
|
||||
v-for="trade in sortedTrades"
|
||||
:key="trade.open_timestamp"
|
||||
button
|
||||
class="d-flex justify-content-between align-items-center py-1"
|
||||
|
@ -42,11 +42,16 @@ export default defineComponent({
|
|||
|
||||
setup(props) {
|
||||
const botStore = useBotStore();
|
||||
const selectedTrade = ref(0)
|
||||
|
||||
const selectedTrade = ref(<Trade>{});
|
||||
|
||||
const sortedTrades = computed(() => {
|
||||
return props.trades.slice().sort((a,b) => b.open_timestamp - a.open_timestamp);
|
||||
});
|
||||
|
||||
return {
|
||||
botStore,
|
||||
selectedTrade
|
||||
selectedTrade,
|
||||
sortedTrades
|
||||
};
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user