mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 10:21:55 +00:00
Convert performance to typescript
This commit is contained in:
parent
61fe53660b
commit
139d9866cc
|
@ -7,22 +7,21 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex';
|
||||
<script lang="ts">
|
||||
import { Component, Vue } from 'vue-property-decorator';
|
||||
import { namespace } from 'vuex-class';
|
||||
import { PerformanceEntry } from '@/store/types';
|
||||
|
||||
export default {
|
||||
name: 'Performance',
|
||||
computed: {
|
||||
...mapState('ftbot', ['performanceStats']),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableFields: [
|
||||
{ key: 'pair', label: 'Pair' },
|
||||
{ key: 'profit', label: 'Profit' },
|
||||
{ key: 'count', label: 'Count' },
|
||||
],
|
||||
};
|
||||
},
|
||||
};
|
||||
const ftbot = namespace('ftbot');
|
||||
|
||||
@Component({})
|
||||
export default class Performance extends Vue {
|
||||
@ftbot.State performanceStats!: Array<PerformanceEntry>;
|
||||
|
||||
private tableFields = [
|
||||
{ key: 'pair', label: 'Pair' },
|
||||
{ key: 'profit', label: 'Profit' },
|
||||
{ key: 'count', label: 'Count' },
|
||||
];
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<script lang="ts">
|
||||
import { Component, Vue } from 'vue-property-decorator';
|
||||
import LoginModal from '@/views/LoginModal.vue';
|
||||
import { State, Mutation, Action, namespace } from 'vuex-class';
|
||||
import { State, Mutation, namespace } from 'vuex-class';
|
||||
import userService from '@/shared/userService';
|
||||
import BootswatchThemeSelect from '@/components/BootswatchThemeSelect.vue';
|
||||
|
||||
|
|
|
@ -12,6 +12,12 @@ export interface DailyInterface {
|
|||
timescale: number;
|
||||
}
|
||||
|
||||
export interface PerformanceEntry {
|
||||
count: number;
|
||||
pair: string;
|
||||
profit: number;
|
||||
}
|
||||
|
||||
export interface BotState {
|
||||
bid_strategy: object;
|
||||
ask_strategy: object;
|
||||
|
|
Loading…
Reference in New Issue
Block a user