fix(front): enhance error logging in error.vue and improve Tiptap component styling for better readability

This commit is contained in:
keven1024
2025-07-28 17:07:35 +08:00
parent ecc4aefd33
commit c64c152124
2 changed files with 18 additions and 17 deletions

View File

@@ -44,5 +44,8 @@ onUnmounted(() => {
})
</script>
<template>
<editor-content :editor="editor" class="prose prose-sm bg-white/50 rounded-md p-2 [&>*]:outline-none prose-p:my-1" />
<editor-content
:editor="editor"
class="prose prose-sm bg-white/50 rounded-md p-2 [&>*]:outline-none prose-p:my-1 prose-headings:my-2 prose-pre:mb-0"
/>
</template>

View File

@@ -1,24 +1,22 @@
<script setup lang="ts">
import type { NuxtError } from "#app";
import { useI18n } from "vue-i18n";
import { Button } from "@/components/ui/button";
import type { NuxtError } from '#app'
import { useI18n } from 'vue-i18n'
import { Button } from '@/components/ui/button'
const { t } = useI18n();
const { t } = useI18n()
const props = defineProps({
error: Object as () => NuxtError,
});
const handleError = () => clearError({ redirect: "/" });
error: Object as () => NuxtError,
})
console.error(props.error, 'error')
const handleError = () => clearError({ redirect: '/' })
</script>
<template>
<NuxtLayout>
<div
class="rounded-xl p-5 bg-white/50 backdrop-blur-xl w-full lg:w-200 flex flex-col items-center justify-center min-h-[50vh] mt-5 gap-10"
>
<div class="font-bold text-5xl">{{ error?.statusCode }}</div>
<Button @click="handleError">{{ t("btn.backToHome") }}</Button>
</div>
</NuxtLayout>
<NuxtLayout>
<div class="rounded-xl p-5 bg-white/50 backdrop-blur-xl w-full lg:w-200 flex flex-col items-center justify-center min-h-[50vh] mt-5 gap-10">
<div class="font-bold text-5xl">{{ error?.statusCode }}</div>
<Button @click="handleError">{{ t('btn.backToHome') }}</Button>
</div>
</NuxtLayout>
</template>