Fix lint warnings

This commit is contained in:
Meng Xiangzhuo 2024-10-15 16:37:57 +08:00
parent c724abd655
commit b781a45bee
No known key found for this signature in database
GPG Key ID: 7A1735AB4A5A3594

View File

@ -11,12 +11,12 @@ const emit = defineEmits<{ 'trade-select': [trade: Trade] }>();
const botStore = useBotStore(); const botStore = useBotStore();
const selectedTrade = ref({} as Trade); const selectedTrade = ref({} as Trade);
const sortDescendingOrder = ref(true) const sortDescendingOrder = ref(true);
const sortMethod = ref('openDate') const sortMethod = ref('openDate');
const sortMethodOptions = [ const sortMethodOptions = [
{text: 'Open date', value: 'openDate'}, { text: 'Open date', value: 'openDate' },
{text: 'Profit', value: 'profit'}, { text: 'Profit %', value: 'profit' },
] ];
const onTradeSelect = (trade: Trade) => { const onTradeSelect = (trade: Trade) => {
selectedTrade.value = trade; selectedTrade.value = trade;
@ -31,7 +31,7 @@ const sortedTrades = computed(() => {
sortDescendingOrder.value sortDescendingOrder.value
? b.profit_ratio - a.profit_ratio ? b.profit_ratio - a.profit_ratio
: a.profit_ratio - b.profit_ratio, : a.profit_ratio - b.profit_ratio,
) );
} else { } else {
return props.trades return props.trades
.slice() .slice()
@ -57,11 +57,7 @@ watch(
<div> <div>
<div class="d-flex justify-content-center"> <div class="d-flex justify-content-center">
<span class="me-2">Sort by:</span> <span class="me-2">Sort by:</span>
<BFormRadioGroup <BFormRadioGroup v-model="sortMethod" :options="sortMethodOptions" name="radio-options" />
v-model="sortMethod"
:options="sortMethodOptions"
name="radio-options"
/>
</div> </div>
<BListGroup> <BListGroup>
<BListGroupItem <BListGroupItem