refactor: 移除 userAgent 相关代码以简化窗口管理逻辑

This commit is contained in:
kuaifan 2026-01-12 09:07:10 +08:00
parent 7321ab06f0
commit 4cfc5e6024
6 changed files with 1 additions and 6 deletions

View File

@ -239,7 +239,7 @@ export default {
"onDocumentReady": this.onDocumentReady,
},
};
if (/\/hideenOfficeTitle\//.test(window.navigator.userAgent)) {
if ($A.isElectron) {
config.document.title = " ";
}
if (this.readOnly || this.historyId > 0) {

View File

@ -3786,7 +3786,6 @@ export default {
path: path,
title,
titleFixed: true,
userAgent: "/hideenOfficeTitle/",
});
} else if (this.$isEEUIApp) {
this.$store.dispatch('openAppChildPage', {

View File

@ -186,7 +186,6 @@ export default {
path: path,
title,
titleFixed: true,
userAgent: "/hideenOfficeTitle/",
});
} else if (this.$isEEUIApp) {
this.$store.dispatch('openAppChildPage', {

View File

@ -1963,7 +1963,6 @@ export default {
path: path,
title: `${file.name} (${$A.bytesToSize(file.size)})`,
titleFixed: true,
userAgent: "/hideenOfficeTitle/",
});
} else if (this.$isEEUIApp) {
this.$store.dispatch('openAppChildPage', {

View File

@ -1525,7 +1525,6 @@ export default {
path: path,
title: $A.getFileName(item),
titleFixed: true,
userAgent: "/hideenOfficeTitle/",
});
} else if (this.$isEEUIApp) {
this.$store.dispatch('openAppChildPage', {

View File

@ -70,7 +70,6 @@ export function openFileInClient(vm, item, options = {}) {
titleFixed: windowConfig.titleFixed,
width: windowConfig.width,
height: windowConfig.height,
userAgent: "/hideenOfficeTitle/",
force: options.force === undefined ? false : options.force,
});
return;