Fix tradeaction menu

This commit is contained in:
Matthias 2021-12-26 16:04:19 +01:00
parent 7bcc2e44ac
commit bd76da58b7
3 changed files with 7 additions and 27 deletions

View File

@ -13,7 +13,7 @@
}}</ValuePair>
<!-- <span>Open rate {{ formatPrice(trade.open_rate) }} </span> -->
<ValuePair
v-if="show_details && (trade.close_rate || trade.current_rate)"
v-if="showDetails && (trade.close_rate || trade.current_rate)"
description="Close Rate"
>{{ formatPrice(trade.close_rate || trade.current_rate || 0) }}</ValuePair
>

View File

@ -5,7 +5,7 @@
class="btn-xs text-left"
size="sm"
title="Forcesell"
@click="forcesellHandler(trade)"
@click="$emit('forceSell', trade)"
>
<ForceSellIcon :size="16" title="Forcesell" class="mr-1" />Forcesell
</b-button>
@ -14,7 +14,7 @@
class="btn-xs text-left"
size="sm"
title="Forcesell limit"
@click="forcesellHandler(trade, 'limit')"
@click="$emit('forceSell', trade, 'limit')"
>
<ForceSellIcon :size="16" title="Forcesell" class="mr-1" />Forcesell limit
</b-button>
@ -23,7 +23,7 @@
class="btn-xs text-left mt-1"
size="sm"
title="Forcesell market"
@click="forcesellHandler(trade, 'market')"
@click="$emit('forceSell', trade, 'market')"
>
<ForceSellIcon :size="16" title="Forcesell" class="mr-1" />Forcesell market
</b-button>
@ -60,23 +60,8 @@ export default defineComponent({
},
},
emits: ['forceSell', 'deleteTrade'],
setup(props, { emit, root }) {
const forcesellHandler = (item: Trade, ordertype: string | undefined = undefined) => {
root.$bvModal
.msgBoxConfirm(`Really222 forcesell trade ${item.trade_id} (Pair ${item.pair})?`)
.then((value: boolean) => {
if (value) {
console.log('emitting');
emit('forceSell', item);
emit('forceSell', { item, ordertype });
console.log('emittin2g');
}
});
};
return {
forcesellHandler,
};
setup() {
return {};
},
});
</script>

View File

@ -195,12 +195,7 @@ export default class TradeList extends Vue {
return formatPrice(price, this.stakeCurrencyDecimals);
}
forcesellHandler(item: Trade) {
console.log(item);
}
forcesellHandler2(item: Trade, ordertype: string | undefined = undefined) {
console.log('forcesell parent');
forcesellHandler(item: Trade, ordertype: string | undefined = undefined) {
this.$bvModal
.msgBoxConfirm(`Really forcesell trade ${item.trade_id} (Pair ${item.pair})?`)
.then((value: boolean) => {