perf: 下载pdf使用自带浏览器

This commit is contained in:
kuaifan
2024-04-17 10:21:35 +08:00
parent ee9cf0a6b6
commit 6cbf2bbada
2 changed files with 17 additions and 1 deletions

View File

@@ -73,6 +73,22 @@
if (themeConf === 'dark') {
document.body.classList.add("dark");
}
//
const isEEUiApp = window && window.navigator && /eeui/i.test(window.navigator.userAgent);
if (isEEUiApp) {
document.querySelector(".link").addEventListener('click', function (e) {
e.preventDefault();
window.top.postMessage({
action: "eeuiAppSendMessage",
data: [
{
action: 'openUrl',
url: "{{ $url }}",
}
]
}, "*")
});
}
</script>
</body>
</html>