fix: 同步浏览器标题显示

This commit is contained in:
Nixevol
2026-07-05 01:02:39 +08:00
parent 4d32a117e2
commit 5207af30f1
5 changed files with 28 additions and 1 deletions
+12
View File
@@ -301,6 +301,10 @@ const appName = ref('');
const appIconUrl = ref(resolveAppIcon());
const filingInfo = ref('');
const toast = ref('');
const browserTitle = computed(() => {
const archiveNo = data.value?.status === 'OK' ? data.value?.artwork?.archiveNo : '';
return archiveNo || appName.value || t('app.name');
});
// 节点图片默认收缩,避免页面过长;点击展开
const expanded = ref<Set<number>>(new Set());
@@ -599,6 +603,14 @@ watch([() => data.value?.artwork?.images, carouselInterval], () => {
resetCarousel();
});
watch(
browserTitle,
(title) => {
document.title = title;
},
{ immediate: true },
);
onUnmounted(() => {
clearAuto();
ro?.disconnect();