Vanessa 2024-10-23 15:47:36 +08:00
parent 9f0552bc72
commit 814a4ec3ac
7 changed files with 52 additions and 33 deletions

View file

@ -166,6 +166,14 @@ openTab = (options: {
};
/// #endif
const getModelByDockType = (type: TDock | string) => {
/// #if MOBILE
return window.siyuan.mobile.docks[type];
/// #else
return getDockByType(type).data[type];
/// #endif
}
export const API = {
adaptHotkey: updateHotkeyTip,
confirm: confirmDialog,
@ -176,7 +184,7 @@ export const API = {
fetchGet,
getFrontend,
getBackend,
getDockByType,
getModelByDockType,
openTab,
openWindow,
openMobileFileById,