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