mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-30 07:59:50 -08:00
37 lines
825 B
Vue
37 lines
825 B
Vue
|
|
||
|
<style scoped>
|
||
|
</style>
|
||
|
|
||
|
<template>
|
||
|
<div class="col-md-12" :class="alertType">
|
||
|
<div class="alert" :class="alertClassName">
|
||
|
<button type="button" class="close" @click="hideEvent">×</button>
|
||
|
<i class="fa fa-check faa-pulse animated" v-show="alertType == 'success'"></i>
|
||
|
<strong>{{ title }} </strong>
|
||
|
<slot></slot>
|
||
|
</div>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
/*
|
||
|
* The component's data.
|
||
|
*/
|
||
|
props: ['alertType', 'title'],
|
||
|
|
||
|
computed: {
|
||
|
alertClassName() {
|
||
|
return 'alert-' + this.alertType;
|
||
|
}
|
||
|
},
|
||
|
|
||
|
methods: {
|
||
|
hideEvent() {
|
||
|
this.$emit('hide');
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
</script>
|