mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 10:21:55 +00:00
profit-pill -> script setup
This commit is contained in:
parent
9aecdc9bbf
commit
988615075c
|
@ -19,23 +19,19 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
<script setup lang="ts">
|
||||
import { formatPercent, formatPrice } from '@/shared/formatters';
|
||||
|
||||
import ProfitSymbol from '@/components/general/ProfitSymbol.vue';
|
||||
|
||||
import { defineComponent, computed } from 'vue';
|
||||
import { computed } from 'vue';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'ProfitPill',
|
||||
components: { ProfitSymbol },
|
||||
props: {
|
||||
const props = defineProps({
|
||||
profitRatio: { required: false, default: undefined, type: Number },
|
||||
profitAbs: { required: false, default: undefined, type: Number },
|
||||
stakeCurrency: { required: true, type: String },
|
||||
profitDesc: { required: false, default: '', type: String },
|
||||
},
|
||||
setup(props) {
|
||||
});
|
||||
const isProfitable = computed(() => {
|
||||
return (
|
||||
(props.profitRatio !== undefined && props.profitRatio > 0) ||
|
||||
|
@ -51,9 +47,6 @@ export default defineComponent({
|
|||
}
|
||||
return '';
|
||||
});
|
||||
return { profitString, isProfitable, formatPercent };
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
|
Loading…
Reference in New Issue
Block a user