2023-05-23 18:27:33 +00:00
|
|
|
<template>
|
|
|
|
<b-card no-body class="mb-2">
|
|
|
|
<template #header>
|
2023-05-29 06:51:40 +00:00
|
|
|
<div class="d-flex text-start align-items-center">
|
|
|
|
<div class="d-flex flex-grow-1 align-items-center">
|
|
|
|
<i-mdi-reorder-horizontal role="button" class="handle me-2 fs-4" />
|
2023-05-29 17:51:54 +00:00
|
|
|
<div
|
|
|
|
role="button"
|
|
|
|
class="d-flex flex-grow-1 align-items-start flex-column"
|
|
|
|
@click="visible = !visible"
|
|
|
|
>
|
|
|
|
<span class="fw-bold fd-italic">{{ pairlist.name }}</span>
|
|
|
|
<span class="fw-lighter">{{ pairlist.description }}</span>
|
|
|
|
</div>
|
2023-05-29 06:51:40 +00:00
|
|
|
</div>
|
|
|
|
<b-button size="sm" @click="emit('remove', index)">
|
|
|
|
<i-mdi-close />
|
|
|
|
</b-button>
|
|
|
|
</div>
|
2023-05-23 18:27:33 +00:00
|
|
|
</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>
|
|
|
|
|
2023-05-28 15:52:44 +00:00
|
|
|
<style lang="scss" scoped>
|
2023-05-23 18:27:33 +00:00
|
|
|
.hidden {
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
2023-05-28 23:38:44 +00:00
|
|
|
:deep(.collapsing) {
|
2023-05-23 18:27:33 +00:00
|
|
|
-webkit-transition: none;
|
|
|
|
transition: none;
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
</style>
|