[Vuejs]-Dynamically render a bootstrap element in a template

4👍

Use v-if on the <b-icon> to conditionally render that component:

<template>
  <div>
    <b-icon v-if="getUsersEmaillRequestStatus(user.id) === EMAIL_STATUS.SUCCESS"
            icon="check-circle"></b-icon>

    <div v-else>Something else...</div>
  </div>
</template>

demo

👤tony19

Leave a comment