I am attempting to show an icon when a certain condition is met, using a theme icon
Script Code
<script setup>
import { h } from 'vue'
const props = defineProps({
itemDetail: Object
});
const passedIcon = h('i', {class: 'bx bxs-check-circle'});
const failedIcon = h('i', {class: 'bx bxs-cross-circle'});
</script>
Template Code
<template>
<tr>
<td>Zip check</td>
<td>
{{ props.itemDetail.status == 'pass' ? 'Passed ' + passedIcon : 'Failed ' + failedIcon }}
</td>
</tr>
</template>
However, the output shows:
Passed [object Object]
or
Failed [object Object]
I experimented with the h() render function and it worked fine, but how can I directly call it as HTML within the template?