ProfitSymbol -> script setup

This commit is contained in:
Matthias 2022-12-17 20:08:19 +01:00
parent ca93a019c3
commit b2ef4343ec

View File

@ -4,22 +4,14 @@
</div>
</template>
<script lang="ts">
import { defineComponent, computed } from 'vue';
<script setup lang="ts">
import { computed } from 'vue';
export default defineComponent({
name: 'ProfitSymbol',
props: {
profit: { type: Number, required: true },
},
setup(props) {
const isProfitable = computed(() => {
return props.profit > 0;
});
return {
isProfitable,
};
},
const props = defineProps({
profit: { type: Number, required: true },
});
const isProfitable = computed(() => {
return props.profit > 0;
});
</script>