This commit is contained in:
Vanessa 2024-11-14 23:21:27 +08:00
parent 0a49a07f2c
commit 4670092d22
2 changed files with 4 additions and 1 deletions

View file

@ -60,6 +60,7 @@
margin: 1px;
overflow: hidden;
border-radius: var(--b3-border-radius);
min-width: 32px;
img, svg {
height: 24px;

View file

@ -8,8 +8,10 @@ export const openByMobile = (uri: string) => {
}
if (isInIOS()) {
if (uri.startsWith("assets/")) {
window.webkit.messageHandlers.openLink.postMessage(location.origin + "/" + uri);
// iOS 16.7 之前的版本uri 需要 encodeURIComponent
window.webkit.messageHandlers.openLink.postMessage(location.origin + "/assets/" + encodeURIComponent(uri.replace("assets/", "")));
} else if (uri.startsWith("/")) {
// 导出 zip 返回的是已经 encode 过的,因此不能再 encode
window.webkit.messageHandlers.openLink.postMessage(location.origin + uri);
} else {
try {