title: Vuejs change the prop dynamically
body: <p>I have a component upload and it's passing type to the Alert.vue this works. What i want is passing just danger, warning or success into alert.vue and concat there the class.</p>
  
  <p>Like this:</p>
  
  <pre><code>&lt;alert :loading="false" loadingtext="" type="danger" :alerttext="errortypes[file.error]" v-if="file.error"&gt;{{file.error}}&lt;/alert&gt;
  </code></pre>
  
  <p>How can i achieve?</p>
  
  <p>Upload.vue:</p>
  
  <pre><code>&lt;div v-for="(file, index) in files" :key="file.id"&gt;
      &lt;span v-if="selectedfile"&gt;{{file.name}}&lt;/span&gt;
      &lt;alert :loading="false" loadingtext="" type="alert alert-danger fade in alert-dismissible" :alerttext="errortypes[file.error]" v-if="file.error"&gt;{{file.error}}&lt;/alert&gt;
      &lt;alert :loading="false" loadingtext="" type="alert alert-success fade in alert-dismissible" :alerttext="alertfilesuccessuploaded" v-else-if="file.success"&gt;&lt;/alert&gt;
      &lt;alert :loading="false" loadingtext="" type="alert alert-warning fade in alert-dismissible" :alerttext="loadingtext" v-else-if="file.active"&gt;&lt;/alert&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Alert.vue:</p>
  
  <pre><code>&lt;template&gt;
      &lt;div :class="type" role="alert"&gt;
          &lt;a href="#" class="close" data-dismiss="alert" aria-label="close" title="close"&gt;×&lt;/a&gt;
          &lt;span v-html="alerttext"&gt;&lt;/span&gt;
          &lt;loading v-show="loading" :loadingdata="loadingtext"&gt;&lt;/loading&gt;
      &lt;/div&gt;
  &lt;/template&gt;
  &lt;script&gt;
      export default {
          props: {
              type: String,
              alerttext: String,
              loading: Boolean,
              loadingtext: String
          },
          created() {
              this.newtype = 'alert alert-' + this.type + ' fade in alert-dismissible';
          },
          data: function () {
              return {
                  newtype:''
              }
          },
      }
  &lt;/script&gt;
  </code></pre>