2023-05-23 18:27:33 +00:00
|
|
|
<template>
|
|
|
|
<b-card no-body class="mb-2">
|
|
|
|
<template #header>
|
2023-05-26 11:12:40 +00:00
|
|
|
<b-row align-v="center" class="text-start">
|
2023-05-23 18:27:33 +00:00
|
|
|
<b-col>
|
|
|
|
<b-row align-v="center">
|
2023-05-23 18:43:16 +00:00
|
|
|
<b-col cols="auto"><i-mdi-reorder-horizontal class="handle me-2 fs-4" /></b-col>
|
2023-05-23 18:27:33 +00:00
|
|
|
<b-col
|
|
|
|
><b-button variant="link" @click="visible = !visible">
|
|
|
|
<h6 class="mb-0">{{ pairlist.name }}</h6>
|
|
|
|
</b-button></b-col
|
|
|
|
>
|
|
|
|
</b-row>
|
|
|
|
</b-col>
|
|
|
|
<b-col cols="auto">
|
2023-05-26 17:40:07 +00:00
|
|
|
<b-button size="sm" @click="emit('remove', index)"><i-mdi-close></i-mdi-close></b-button>
|
2023-05-23 18:27:33 +00:00
|
|
|
</b-col>
|
|
|
|
</b-row>
|
|
|
|
</template>
|
|
|
|
<b-card-body :class="{ hidden: !visible }">
|
|
|
|
<b-collapse v-model="visible">
|
|
|
|
<PairlistConfigParameter
|
|
|
|
v-for="(parameter, key) in pairlist.params"
|
|
|
|
:key="key"
|
|
|
|
v-model="pairlist.params[key].value"
|
|
|
|
:param="parameter"
|
|
|
|
/>
|
|
|
|
</b-collapse>
|
|
|
|
</b-card-body>
|
|
|
|
</b-card>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
import { Pairlist } from '@/types';
|
2023-05-28 15:25:15 +00:00
|
|
|
import { ref } from 'vue';
|
|
|
|
import PairlistConfigParameter from './PairlistConfigParameter.vue';
|
2023-05-23 18:27:33 +00:00
|
|
|
|
2023-05-28 15:25:15 +00:00
|
|
|
defineProps<{
|
2023-05-23 18:27:33 +00:00
|
|
|
index: number;
|
|
|
|
}>();
|
|
|
|
|
2023-05-28 15:25:15 +00:00
|
|
|
const emit = defineEmits(['remove']);
|
2023-05-23 18:27:33 +00:00
|
|
|
|
|
|
|
const visible = ref(false);
|
|
|
|
|
2023-05-28 15:25:15 +00:00
|
|
|
const pairlist = defineModel<Pairlist>({ required: true });
|
2023-05-23 18:27:33 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.hidden {
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.collapsing {
|
|
|
|
-webkit-transition: none;
|
|
|
|
transition: none;
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
</style>
|