This commit is contained in:
2023-07-27 10:48:13 +02:00
parent cd649473d3
commit c9b23df46b

View File

@@ -17,13 +17,11 @@ const props = withDefaults(defineProps<Props>(), {
const threshold = useStorage('reprocess-threshold', 0); const threshold = useStorage('reprocess-threshold', 0);
const useSellOrder = useStorage('reprocess-use-sell-order', false); const useSellOrder = useStorage('reprocess-use-sell-order', false);
const { sortedArray, headerProps } = useSort(computed(() => { const { sortedArray, headerProps } = useSort(computed(() => props.result.map(r =>({
return props.result.map(r =>({ ...r,
...r, buy_ratio: r.buy === 0 ? 1 : (r.buy_reprocess / r.buy) - 1,
buy_ratio: r.buy === 0 ? 1 : (r.buy_reprocess / r.buy) - 1, sell_ratio: r.sell === 0 ? 1 : (r.sell_reprocess / r.sell) - 1
sell_ratio: r.sell === 0 ? 1 : (r.sell_reprocess / r.sell) - 1 }))), {
}))
}), {
defaultSortKey: 'name', defaultSortKey: 'name',
defaultSortDirection: 'asc' defaultSortDirection: 'asc'
}) })