frequi_origin/src/components/ftbot/TimeframeSelect.vue

60 lines
1016 B
Vue
Raw Normal View History

2021-05-23 14:54:38 +00:00
<template>
<b-form-group
label-cols-sm="5"
label="Timeframe:"
label-align-sm="right"
label-for="timeframe-select"
>
<b-form-select
id="timeframe-select"
v-model="selectedTimeframe"
placeholder="Use strategy default"
:options="availableTimeframes"
@change="emitSelectedTimeframe"
></b-form-select>
</b-form-group>
</template>
<script lang="ts">
import { Component, Emit, Prop, Vue, Watch } from 'vue-property-decorator';
@Component({})
export default class Template extends Vue {
selectedTimeframe = '';
@Prop({ default: '' }) value!: string;
@Emit('input')
emitSelectedTimeframe() {
return this.selectedTimeframe;
}
@Watch('value')
watchValue() {
this.selectedTimeframe = this.value;
}
availableTimeframes = [
'1m',
'3m',
'5m',
'15m',
'30m',
'1h',
'2h',
'4h',
'6h',
'8h',
'12h',
'1d',
'3d',
'1w',
'2w',
'1M',
'1y',
];
}
</script>
<style scoped></style>