mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-27 11:58:49 +01:00
This commit is contained in:
parent
5e38fe4335
commit
de5fe00209
1 changed files with 4 additions and 3 deletions
|
|
@ -26,7 +26,8 @@ export const openNewWindow = (tab: Tab, options: windowOptions = {}) => {
|
|||
width: options.width,
|
||||
height: options.height,
|
||||
id: getCurrentWindow().id,
|
||||
url: `${window.location.protocol}//${window.location.host}/stage/build/app/window.html?v=${Constants.SIYUAN_VERSION}&json=${JSON.stringify(json)}`
|
||||
// 需要 encode, 否则 https://github.com/siyuan-note/siyuan/issues/9343
|
||||
url: `${window.location.protocol}//${window.location.host}/stage/build/app/window.html?v=${Constants.SIYUAN_VERSION}&json=${encodeURIComponent(JSON.stringify(json))}`
|
||||
});
|
||||
/// #endif
|
||||
tab.parent.removeTab(tab.id);
|
||||
|
|
@ -66,7 +67,7 @@ export const openNewWindowById = (id: string, options: windowOptions = {}) => {
|
|||
width: options.width,
|
||||
height: options.height,
|
||||
id: getCurrentWindow().id,
|
||||
url: `${window.location.protocol}//${window.location.host}/stage/build/app/window.html?v=${Constants.SIYUAN_VERSION}&json=${JSON.stringify(json)}`
|
||||
url: `${window.location.protocol}//${window.location.host}/stage/build/app/window.html?v=${Constants.SIYUAN_VERSION}&json=${encodeURIComponent(JSON.stringify(json))}`
|
||||
});
|
||||
/// #endif
|
||||
});
|
||||
|
|
@ -81,7 +82,7 @@ export const openNewWindowById = (id: string, options: windowOptions = {}) => {
|
|||
width: options.width,
|
||||
height: options.height,
|
||||
id: getCurrentWindow().id,
|
||||
url: `${window.location.protocol}//${window.location.host}/stage/build/app/window.html?v=${Constants.SIYUAN_VERSION}&json=${JSON.stringify(json)}`
|
||||
url: `${window.location.protocol}//${window.location.host}/stage/build/app/window.html?v=${Constants.SIYUAN_VERSION}&json=${encodeURIComponent(JSON.stringify(json))}`
|
||||
});
|
||||
/// #endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue