Piped/src/components/ErrorHandler.vue

22 lines
512 B
Vue
Raw Normal View History

<template>
<p>{{ message }}</p>
2021-12-27 14:46:26 +00:00
<button @click="toggleTrace" class="btn">
{{ $t("actions.show_more") }}
</button>
2021-10-31 18:36:47 +00:00
<p ref="stacktrace" style="white-space: pre-wrap" hidden>{{ error }}</p>
</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>