[Vuejs]-Vuejs change the prop dynamically

0👍

Found the solution:

<alert :loading="false" loadingtext="" type="danger" v-if="file.error">{{file.error}}</alert>

<div v-bind:class="setType(type)" role="alert">

methods: {
    setType(type) {
        return 'alert alert-' + type + ' fade in alert-dismissible';
    }
},

Leave a comment