fix(frontend/pageMetadata): ページタイトルが更新されない問題 (#13289)
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp> Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
@@ -122,11 +122,8 @@ const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(computed(() => props.postId ? {
|
||||
title: i18n.ts.edit,
|
||||
icon: 'ti ti-pencil',
|
||||
} : {
|
||||
title: i18n.ts.postToGallery,
|
||||
definePageMetadata(() => ({
|
||||
title: props.postId ? i18n.ts.edit : i18n.ts.postToGallery,
|
||||
icon: 'ti ti-pencil',
|
||||
}));
|
||||
</script>
|
||||
|
||||
@@ -119,10 +119,10 @@ const headerTabs = computed(() => [{
|
||||
icon: 'ti ti-edit',
|
||||
}]);
|
||||
|
||||
definePageMetadata({
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.gallery,
|
||||
icon: 'ti ti-icons',
|
||||
});
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
||||
@@ -163,10 +163,12 @@ const headerActions = computed(() => [{
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(computed(() => post.value ? {
|
||||
title: post.value.title,
|
||||
avatar: post.value.user,
|
||||
} : null));
|
||||
definePageMetadata(() => ({
|
||||
title: post.value ? post.value.title : i18n.ts.gallery,
|
||||
...post.value ? {
|
||||
avatar: post.value.user,
|
||||
} : {},
|
||||
}));
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user