2023-05-23 18:27:33 +00:00
|
|
|
<template>
|
2023-05-26 11:12:40 +00:00
|
|
|
<b-form-group label-cols="4" label-size="md" class="pb-1 text-start" :description="param.help">
|
2023-05-23 18:27:33 +00:00
|
|
|
<b-form-input
|
|
|
|
v-if="param.type === PairlistParamType.string || param.type === PairlistParamType.number"
|
|
|
|
v-model="paramValue"
|
|
|
|
size="sm"
|
|
|
|
></b-form-input>
|
|
|
|
|
|
|
|
<b-form-checkbox
|
|
|
|
v-if="param.type === PairlistParamType.boolean"
|
|
|
|
v-model="paramValue"
|
|
|
|
></b-form-checkbox>
|
|
|
|
|
|
|
|
<b-form-select
|
|
|
|
v-if="param.type === PairlistParamType.option"
|
|
|
|
v-model="paramValue"
|
|
|
|
:options="param.options"
|
|
|
|
></b-form-select>
|
|
|
|
|
|
|
|
<template #label>
|
|
|
|
<label> {{ param.description }}</label>
|
|
|
|
</template>
|
|
|
|
</b-form-group>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
import { PairlistParameter, PairlistParamType } from '@/types';
|
|
|
|
|
2023-05-28 15:25:15 +00:00
|
|
|
defineProps<{
|
2023-05-23 18:27:33 +00:00
|
|
|
param: PairlistParameter;
|
|
|
|
}>();
|
|
|
|
|
2023-07-26 05:00:08 +00:00
|
|
|
// TODO: type should really be PairlistParamValue
|
2023-06-21 05:17:54 +00:00
|
|
|
const paramValue = defineModel<any>();
|
2023-05-23 18:27:33 +00:00
|
|
|
</script>
|