Files
phptimerboard2/vendor/facade/ignition/resources/js/components/Shared/ExceptionMessage.vue
2019-09-29 19:47:00 -05:00

38 lines
835 B
Vue

<template>
<div class="ui-exception-message ui-exception-message-full">
<span
v-if="tooLong"
@click="fullException = !fullException"
class="cursor-pointer select-none"
:title="name"
>
<template v-if="!fullException"
>{{ name.substring(0, maxLength) }}</template
>
<template v-else>{{ name }}</template>
</span>
<template v-else>{{ name }}</template>
</div>
</template>
<script>
export default {
props: {
name: { required: true },
maxLength: { default: 500 },
},
data() {
return {
fullException: false,
};
},
computed: {
tooLong() {
return this.name.length > this.maxLength;
},
},
};
</script>