mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
This commit is contained in:
parent
74273ebc1c
commit
f49dfa8273
7 changed files with 53 additions and 70 deletions
|
|
@ -1,3 +1,16 @@
|
|||
export const openByMobile = (uri:string) => {
|
||||
if (!uri) {
|
||||
return;
|
||||
}
|
||||
if (window.siyuan.config.system.container === "ios") {
|
||||
window.location.href = uri;
|
||||
} else if (window.siyuan.config.system.container === "android" && window.JSAndroid) {
|
||||
window.JSAndroid.openExternal(uri);
|
||||
} else {
|
||||
window.open(uri);
|
||||
}
|
||||
};
|
||||
|
||||
export const writeText = async (text: string) => {
|
||||
try {
|
||||
// navigator.clipboard.writeText 抛出异常不进入 catch,这里需要先处理移动端复制
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue