feat: 为各个页面补全标题与SEO
All checks were successful
deploy to server / build-and-deploy (push) Successful in 3m4s

This commit is contained in:
2025-11-07 15:37:18 +08:00
parent 1cdc29b1ce
commit 0265ea4978
16 changed files with 150 additions and 10 deletions

View File

@ -12,6 +12,17 @@
</el-container>
</template>
<script setup lang="ts">
const { t } = useI18n();
useHead(() => {
const siteTitle = t('company-name');
return {
titleTemplate: (title) => (title ? `${title} - ${siteTitle}` : siteTitle),
};
});
</script>
<style scoped>
.app-container {
display: flex;

View File

@ -3,3 +3,14 @@
<slot />
</div>
</template>
<script setup lang="ts">
const { t } = useI18n();
useHead(() => {
const siteTitle = `${$t('page-title.preview')} - ${t('company-name')}`;
return {
title: siteTitle,
};
});
</script>