fix: 同步浏览器标题显示
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user