This commit is contained in:
parent
0a49a07f2c
commit
4670092d22
2 changed files with 4 additions and 1 deletions
|
@ -60,6 +60,7 @@
|
|||
margin: 1px;
|
||||
overflow: hidden;
|
||||
border-radius: var(--b3-border-radius);
|
||||
min-width: 32px;
|
||||
|
||||
img, svg {
|
||||
height: 24px;
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue