Piped/src/components/ErrorHandler.vue

20 lines
499 B
Vue
Raw Normal View History

<template>
2021-12-27 16:29:25 +00:00
<p v-text="message" />
<button @click="toggleTrace" class="btn" v-text="$t('actions.show_more')" />
<p ref="stacktrace" style="white-space: pre-wrap" hidden v-text="error" />
</template>
<script>
export default {
props: {
error: { type: String, default: null },
message: { type: String, default: null },
},
2021-10-31 18:36:47 +00:00
methods: {
toggleTrace() {
this.$refs.stacktrace.hidden = !this.$refs.stacktrace.hidden;
},
},
};
</script>