mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-23 11:35:14 +00:00
Pair summary -> script setup
This commit is contained in:
parent
0d59031d72
commit
d09dc48944
|
@ -25,12 +25,12 @@
|
||||||
</b-list-group>
|
</b-list-group>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script setup lang="ts">
|
||||||
import { formatPercent, timestampms } from '@/shared/formatters';
|
import { formatPercent, timestampms } from '@/shared/formatters';
|
||||||
import { Lock, Trade } from '@/types';
|
import { Lock, Trade } from '@/types';
|
||||||
import TradeProfit from '@/components/ftbot/TradeProfit.vue';
|
import TradeProfit from '@/components/ftbot/TradeProfit.vue';
|
||||||
import ProfitPill from '@/components/general/ProfitPill.vue';
|
import ProfitPill from '@/components/general/ProfitPill.vue';
|
||||||
import { defineComponent, computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { useBotStore } from '@/stores/ftbotwrapper';
|
import { useBotStore } from '@/stores/ftbotwrapper';
|
||||||
|
|
||||||
interface CombinedPairList {
|
interface CombinedPairList {
|
||||||
|
@ -44,18 +44,14 @@ interface CombinedPairList {
|
||||||
tradeCount: number;
|
tradeCount: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default defineComponent({
|
const props = defineProps({
|
||||||
name: 'PairSummary',
|
|
||||||
components: { TradeProfit, ProfitPill },
|
|
||||||
props: {
|
|
||||||
// TOOD: Should be string list
|
// TOOD: Should be string list
|
||||||
pairlist: { required: true, type: Array as () => string[] },
|
pairlist: { required: true, type: Array as () => string[] },
|
||||||
currentLocks: { required: false, type: Array as () => Lock[], default: () => [] },
|
currentLocks: { required: false, type: Array as () => Lock[], default: () => [] },
|
||||||
trades: { required: true, type: Array as () => Trade[] },
|
trades: { required: true, type: Array as () => Trade[] },
|
||||||
sortMethod: { default: 'normal', type: String },
|
sortMethod: { default: 'normal', type: String },
|
||||||
backtestMode: { required: false, default: false, type: Boolean },
|
backtestMode: { required: false, default: false, type: Boolean },
|
||||||
},
|
});
|
||||||
setup(props) {
|
|
||||||
const botStore = useBotStore();
|
const botStore = useBotStore();
|
||||||
const combinedPairList = computed(() => {
|
const combinedPairList = computed(() => {
|
||||||
const comb: CombinedPairList[] = [];
|
const comb: CombinedPairList[] = [];
|
||||||
|
@ -133,13 +129,6 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
return {
|
|
||||||
combinedPairList,
|
|
||||||
tableFields,
|
|
||||||
botStore,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user