Looking to customize my BootstrapVue table
https://i.sstatic.net/x20Si.png
Seeking advice on changing text color based on conditions in the Age
column
Check out the HTML code below
<link href="https://unpkg.com/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="76141919020502041706364258425847">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet"/>
<link href="https://unpkg.com/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="30525f5f4443444251401d46455570021e021e02">[email protected]</a>/dist/bootstrap-vue.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.js"></script>
<script src="https://unpkg.com/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a0c2cfcfd4d3d4d2c1d08dd6d5c5e0928e928e92">[email protected]</a>/dist/bootstrap-vue.min.js"></script>
<div id='app'>
<b-table :items="items" :fields="fields" bordered>
</b-table>
</div>
<script>
new Vue({
el: '#app',
data: dataInit,
})
function dataInit() {
let init_data = {};
init_data.fields = [
{ key: 'id', label: 'ID'},
{ key: 'age', label: 'Age'},
{ key: 'first', label: 'First Name'},
{ key: 'last', label: 'Last Name'},
];
init_data.items = [
{ id: 18, first: 'Mike', last: 'Kristensen', age: 16 },
{ id: 40, first: 'Peter', last: 'Madsen', age: 52 },
{ id: 80, first: 'Mads', last: 'Mikkelsen', age: 76 },
{ id: 28, first: 'Mikkel', last: 'Hansen', age: 34 },
];
return init_data;
}
</script>
Utilizing Vue.js v2 and BootstrapVue for this project.