Piped/src/components/ErrorHandler.vue

20 lines
497 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')" />
2022-01-12 11:59:50 +00:00
<p ref="stacktrace" class="whitespace-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>