0
I have the following code in a file . Vue:
<template>
<div class="col-6">
<ModalRegister/>
<div class="col-12">
<b-table hover :items="rowData"></b-table>
</div>
</div>
</template>
<script>
import ModalRegisterfrom './ModalRegister';
export default {
data() {
return {
rowData: [
{nome: 'fts-001', modelo: "modelinho1", opção: "<i class='far fa-edit'></i>"},
{nome: 'fts-002', modelo: "modelinho2", opção: "<i class='far fa-edit'></i>"},
{nome: 'fts-003', modelo: "modelinho3", opção: "<i class='far fa-edit'></i>"},
{nome: 'fts-004', modelo: "modelinho4", opção: "<i class='far fa-edit'></i>"},
],
}
},
components: {
ModalRegister
}
}
</script>
But it does not work, it interprets the code as text and does not place the icon. How can I add an icon to the table?
As your question is incomplete, the generic solution is the directive
v-html
(#Docs). But none of that matters if we don’t know the source code of the component<b-table>
. You could show the code of this component or [Edit] the question to add a tag with the library you are using?– fernandosavio