mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-14 04:03:51 +00:00
46 lines
882 B
Vue
46 lines
882 B
Vue
|
<template>
|
||
|
<b-form-group label="Strategy" label-for="strategyName" invalid-feedback="Strategy is required">
|
||
|
<b-form-select :options="strategyList" v-model="strategy" @change="strategyChanged">
|
||
|
</b-form-select>
|
||
|
</b-form-group>
|
||
|
</template>
|
||
|
|
||
|
<script lang="ts">
|
||
|
import { Component, Vue, Prop, Emit } from 'vue-property-decorator';
|
||
|
import { namespace } from 'vuex-class';
|
||
|
|
||
|
const ftbot = namespace('ftbot');
|
||
|
|
||
|
@Component({})
|
||
|
export default class StrategyList extends Vue {
|
||
|
@Prop() value!: string;
|
||
|
|
||
|
@ftbot.Action getStrategyList;
|
||
|
|
||
|
@ftbot.State strategyList;
|
||
|
|
||
|
@Emit('input')
|
||
|
emitStrategy(strategy: string) {
|
||
|
return strategy;
|
||
|
}
|
||
|
|
||
|
get strategy() {
|
||
|
return this.value;
|
||
|
}
|
||
|
|
||
|
set strategy(val) {
|
||
|
this.emitStrategy(val);
|
||
|
}
|
||
|
|
||
|
strategyChanged(newVal) {
|
||
|
this.value = newVal;
|
||
|
}
|
||
|
|
||
|
mounted() {
|
||
|
this.getStrategyList();
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style></style>
|