Piped/src/components/ErrorHandler.vue

20 lines
490 B
Vue
Raw Normal View History

<template>
2021-12-27 16:29:25 +00:00
<p v-text="message" />
2023-07-27 11:46:05 +00:00
<button v-t="'actions.show_more'" class="btn" @click="toggleTrace" />
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>