Piped/src/components/ErrorHandler.vue
2023-07-27 12:46:05 +01:00

19 lines
490 B
Vue

<template>
<p v-text="message" />
<button v-t="'actions.show_more'" class="btn" @click="toggleTrace" />
<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 },
},
methods: {
toggleTrace() {
this.$refs.stacktrace.hidden = !this.$refs.stacktrace.hidden;
},
},
};
</script>