2021-07-07 14:37:35 +00:00
|
|
|
<template>
|
|
|
|
|
<div class="pm-multiview-header">
|
|
|
|
|
<div class="pm-multiview-header-title"></div>
|
|
|
|
|
<div class="pm-multiview-header-actions">
|
2021-08-09 12:20:48 -04:00
|
|
|
<b-row>
|
|
|
|
|
<b-col sm="8">
|
|
|
|
|
<div class="subtitle" v-if="dataSubtitle">
|
|
|
|
|
<h6>
|
|
|
|
|
{{ dataSubtitle.subtitle }}
|
|
|
|
|
<span>
|
2021-09-03 16:07:56 -04:00
|
|
|
<i :class="dataSubtitle.icon" v-bind:style="setIconColor"></i>
|
2021-08-09 12:20:48 -04:00
|
|
|
</span>
|
|
|
|
|
</h6>
|
2021-07-08 15:00:07 +00:00
|
|
|
</div>
|
2021-08-09 12:20:48 -04:00
|
|
|
</b-col>
|
|
|
|
|
<b-col sm="4" class="pm-multiview-header-actions-buttons">
|
|
|
|
|
<button
|
|
|
|
|
v-for="action in data.actions"
|
|
|
|
|
:key="action.id"
|
|
|
|
|
@click="action.onClick(action)"
|
|
|
|
|
class="pm-multiview-header-button"
|
|
|
|
|
:title="action.title"
|
|
|
|
|
>
|
|
|
|
|
<div>
|
|
|
|
|
<span>
|
|
|
|
|
<i :class="action.icon"></i>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</button>
|
|
|
|
|
</b-col>
|
|
|
|
|
</b-row>
|
2021-07-07 14:37:35 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
name: "MultiviewHeader",
|
2021-08-09 12:20:48 -04:00
|
|
|
props: [
|
|
|
|
|
"data",
|
|
|
|
|
"dataSubtitle"
|
|
|
|
|
],
|
2021-07-07 14:37:35 +00:00
|
|
|
data() {
|
2021-07-08 15:00:07 +00:00
|
|
|
return {};
|
2021-07-07 14:37:35 +00:00
|
|
|
},
|
2021-09-03 16:07:56 -04:00
|
|
|
computed : {
|
|
|
|
|
/**
|
|
|
|
|
* Set color to icon defined from custom case list
|
|
|
|
|
*/
|
|
|
|
|
setIconColor() {
|
|
|
|
|
return {
|
|
|
|
|
color: this.dataSubtitle.color ? this.dataSubtitle.color : '#000'
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-07-07 14:37:35 +00:00
|
|
|
methods: {
|
|
|
|
|
classBtn(cls) {
|
|
|
|
|
return "btn btn-slim btn-force-radius v-btn-header " + cls;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.pm-multiview-header {
|
2021-08-09 12:20:48 -04:00
|
|
|
margin-bottom: 7px;
|
2021-07-07 14:37:35 +00:00
|
|
|
}
|
2021-08-09 12:20:48 -04:00
|
|
|
.pm-multiview-header-actions-buttons {
|
2021-07-08 15:00:07 +00:00
|
|
|
text-align: end;
|
2021-07-07 14:37:35 +00:00
|
|
|
}
|
|
|
|
|
.pm-multiview-header-button {
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
border-color: white;
|
|
|
|
|
font-size: 1.6rem;
|
|
|
|
|
color: #007bff;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
padding: 0px 7px 0px 7px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|