Limited length of tab title
This commit is contained in:
parent
8016c4163e
commit
821102f69b
@ -56,7 +56,7 @@
|
|||||||
<b-card no-body>
|
<b-card no-body>
|
||||||
<b-tabs pills card vertical>
|
<b-tabs pills card vertical>
|
||||||
<b-tab v-for="(observation, index) in observationData" v-bind:key="index">
|
<b-tab v-for="(observation, index) in observationData" v-bind:key="index">
|
||||||
<p slot="title">{{ observation.date }}<br/>{{ observation.whom }} {{ observation.type }}<br/>{{ observation.observed }}</p>
|
<p slot="title">{{ observation.date }}<br/>{{ observation.whom }} {{ observation.type }}<br/>{{ shortenedString(observation.observed) }}</p>
|
||||||
<h2>{{ observation.date }}, {{ observation.whom }}<br/>{{ observation.type }}, {{ observation.observed }}</h2>
|
<h2>{{ observation.date }}, {{ observation.whom }}<br/>{{ observation.type }}, {{ observation.observed }}</h2>
|
||||||
<b-row align-h="center">
|
<b-row align-h="center">
|
||||||
<h4>Observed by: <span v-bind:key="index" v-for="(tutor, index) in observation.tutors"><i>{{ tutor.name }}<span v-if="index+1 < observation.tutors.length">, </span></i></span></h4>
|
<h4>Observed by: <span v-bind:key="index" v-for="(tutor, index) in observation.tutors"><i>{{ tutor.name }}<span v-if="index+1 < observation.tutors.length">, </span></i></span></h4>
|
||||||
@ -274,6 +274,14 @@ export default {
|
|||||||
this.errorMessage = error.response.data;
|
this.errorMessage = error.response.data;
|
||||||
this.$refs.errorModal.show();
|
this.$refs.errorModal.show();
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
shortenedString: function(data) {
|
||||||
|
if(data.len < 20){
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return data.substr(0, 20) + "...";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
Loading…
Reference in New Issue
Block a user