@e-xi/xion 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/bin/icon-generator.d.ts +22 -0
- package/dist/bin/index.d.ts +5 -0
- package/dist/bin/index.js +92 -0
- package/dist/bin/logo-generator.d.ts +22 -0
- package/dist/chunk-files/chunk-34OODP7M.js +147 -0
- package/dist/chunk-files/chunk-3KBZWBNP.js +51 -0
- package/dist/chunk-files/chunk-3R6EJDYR.js +10 -0
- package/dist/chunk-files/chunk-3RVKOFMP.js +68 -0
- package/dist/chunk-files/chunk-3S5OTD47.js +35 -0
- package/dist/chunk-files/chunk-3XB4IEWO.js +195 -0
- package/dist/chunk-files/chunk-3XOVD6UX.js +8 -0
- package/dist/chunk-files/chunk-4HEDNQUP.js +426 -0
- package/dist/chunk-files/chunk-4SSGMLEE.js +934 -0
- package/dist/chunk-files/chunk-5PKWVAQP.js +92 -0
- package/dist/chunk-files/chunk-6BOPFOZD.js +19 -0
- package/dist/chunk-files/chunk-6FDO72PN.js +25 -0
- package/dist/chunk-files/chunk-6X74EPRM.js +0 -0
- package/dist/chunk-files/chunk-B2FI5WI5.js +67 -0
- package/dist/chunk-files/chunk-B7DTBTWQ.js +74 -0
- package/dist/chunk-files/chunk-BFD2LHLK.js +60 -0
- package/dist/chunk-files/chunk-BJOPQNB2.js +319 -0
- package/dist/chunk-files/chunk-BMOLIJ3W.js +89 -0
- package/dist/chunk-files/chunk-BPTFUGTP.js +97 -0
- package/dist/chunk-files/chunk-CSUNGWAE.js +405 -0
- package/dist/chunk-files/chunk-D5ZV4VMI.js +627 -0
- package/dist/chunk-files/chunk-DD6WZ4NY.js +841 -0
- package/dist/chunk-files/chunk-DEODEAKM.js +19 -0
- package/dist/chunk-files/chunk-DRMV3M5V.js +1970 -0
- package/dist/chunk-files/chunk-EQTU45UO.js +21 -0
- package/dist/chunk-files/chunk-F7YTK2MY.js +154 -0
- package/dist/chunk-files/chunk-FMQTZ3QV.js +17 -0
- package/dist/chunk-files/chunk-FPN7JYR4.js +67 -0
- package/dist/chunk-files/chunk-FULHNQ4O.js +1243 -0
- package/dist/chunk-files/chunk-GN2FNR3Z.js +259 -0
- package/dist/chunk-files/chunk-GROGDGEL.js +177 -0
- package/dist/chunk-files/chunk-GUOSVDXA.js +34 -0
- package/dist/chunk-files/chunk-HT5V5A7S.js +6 -0
- package/dist/chunk-files/chunk-ID3YDA2K.js +19 -0
- package/dist/chunk-files/chunk-IH3R2NDR.js +230 -0
- package/dist/chunk-files/chunk-IMGYTSWY.js +261 -0
- package/dist/chunk-files/chunk-J34MOWJP.js +26 -0
- package/dist/chunk-files/chunk-KFK47PDH.js +77 -0
- package/dist/chunk-files/chunk-KFV4GXVE.js +11 -0
- package/dist/chunk-files/chunk-LFHJJQW3.js +723 -0
- package/dist/chunk-files/chunk-LQ67F6EY.js +32 -0
- package/dist/chunk-files/chunk-MJ6Q3TIX.js +703 -0
- package/dist/chunk-files/chunk-OUFO3LM4.js +135 -0
- package/dist/chunk-files/chunk-P4CX6I4J.js +14 -0
- package/dist/chunk-files/chunk-PL5KNBCY.js +78 -0
- package/dist/chunk-files/chunk-PVWRRUOK.js +11 -0
- package/dist/chunk-files/chunk-Q7LCZIQP.js +15 -0
- package/dist/chunk-files/chunk-Q7YMMN7J.js +220 -0
- package/dist/chunk-files/chunk-RAVPJRBA.js +118 -0
- package/dist/chunk-files/chunk-RN7AI33H.js +26 -0
- package/dist/chunk-files/chunk-RODB64YF.js +148 -0
- package/dist/chunk-files/chunk-SVTZ4T6S.js +10 -0
- package/dist/chunk-files/chunk-T3QCAOCO.js +20 -0
- package/dist/chunk-files/chunk-U4XEWVBH.js +19 -0
- package/dist/chunk-files/chunk-UCMR6V67.js +746 -0
- package/dist/chunk-files/chunk-UFYEZIUE.js +1269 -0
- package/dist/chunk-files/chunk-UIJUY7QZ.js +18 -0
- package/dist/chunk-files/chunk-VGDNICVG.js +67 -0
- package/dist/chunk-files/chunk-W2I3I7U7.js +35 -0
- package/dist/chunk-files/chunk-WGYOMA43.js +33 -0
- package/dist/chunk-files/chunk-WKVLVI6N.js +44 -0
- package/dist/chunk-files/chunk-WOJ2UKI7.js +11 -0
- package/dist/chunk-files/chunk-Y3OEXVQ2.js +59 -0
- package/dist/chunk-files/chunk-YLZRRUY7.js +6 -0
- package/dist/chunk-files/chunk-YTHS2ZV7.js +51 -0
- package/dist/chunk-files/chunk-YXAEUJKJ.js +331 -0
- package/dist/chunk-files/chunk-YZOJOLFL.js +121 -0
- package/dist/main/app/app-lifecycle-abstract.d.ts +190 -0
- package/dist/main/app/app-lifecycle.d.ts +7 -0
- package/dist/main/app/icons/icon.ico +0 -0
- package/dist/main/app/index.d.ts +8 -0
- package/dist/main/app/index.js +1226 -0
- package/dist/main/app/types/app.d.ts +74 -0
- package/dist/main/app/xo-app-abstract.d.ts +464 -0
- package/dist/main/app/xo-app.d.ts +23 -0
- package/dist/main/auth/index.d.ts +8 -0
- package/dist/main/auth/index.js +109 -0
- package/dist/main/auth/jwt-auth-manager.d.ts +302 -0
- package/dist/main/auth/jwt-auth-provider-abstract.d.ts +100 -0
- package/dist/main/auth/jwt-auth-refresh-rejected-error.d.ts +12 -0
- package/dist/main/auth/jwt-auth-session-changed-error.d.ts +12 -0
- package/dist/main/auth/types/jwt-auth-manager.d.ts +13 -0
- package/dist/main/banner/banner-abstract.d.ts +38 -0
- package/dist/main/banner/banner-manager.d.ts +20 -0
- package/dist/main/banner/index.d.ts +6 -0
- package/dist/main/banner/index.js +10 -0
- package/dist/main/banner/types/banner.d.ts +17 -0
- package/dist/main/config/app-config.d.ts +6 -0
- package/dist/main/config/index.d.ts +13 -0
- package/dist/main/config/index.js +33 -0
- package/dist/main/config/logger-config.d.ts +6 -0
- package/dist/main/config/remote-service-config.d.ts +6 -0
- package/dist/main/config/tray-config.d.ts +6 -0
- package/dist/main/config/types/app.d.ts +38 -0
- package/dist/main/config/types/logger.d.ts +82 -0
- package/dist/main/config/types/window.d.ts +35 -0
- package/dist/main/config/updater-config.d.ts +6 -0
- package/dist/main/config/window/main-window-config.d.ts +6 -0
- package/dist/main/config/window/setting-window-config.d.ts +6 -0
- package/dist/main/file-association/file-association-handlers-abstract.d.ts +23 -0
- package/dist/main/file-association/file-association-manager-abstract.d.ts +87 -0
- package/dist/main/file-association/file-association-manager.d.ts +13 -0
- package/dist/main/file-association/handlers/app-file-association-handlers.d.ts +12 -0
- package/dist/main/file-association/index.d.ts +8 -0
- package/dist/main/file-association/index.js +13 -0
- package/dist/main/file-association/types/file-association.d.ts +31 -0
- package/dist/main/ipc/handlers/app-handlers.d.ts +13 -0
- package/dist/main/ipc/handlers/auth-handlers.d.ts +12 -0
- package/dist/main/ipc/handlers/clipboard-handlers.d.ts +13 -0
- package/dist/main/ipc/handlers/contex-menu-handlers.d.ts +13 -0
- package/dist/main/ipc/handlers/dialog-handlers.d.ts +13 -0
- package/dist/main/ipc/handlers/file-handlers.d.ts +13 -0
- package/dist/main/ipc/handlers/log-handlers.d.ts +45 -0
- package/dist/main/ipc/handlers/remote-service-handlers.d.ts +13 -0
- package/dist/main/ipc/handlers/shell-handlers.d.ts +13 -0
- package/dist/main/ipc/handlers/theme-handlers.d.ts +13 -0
- package/dist/main/ipc/handlers/updater-handlers.d.ts +13 -0
- package/dist/main/ipc/handlers/window-handlers.d.ts +13 -0
- package/dist/main/ipc/index.d.ts +20 -0
- package/dist/main/ipc/index.js +60 -0
- package/dist/main/ipc/ipc-handlers-abstract.d.ts +23 -0
- package/dist/main/ipc/ipc-manager-abstract.d.ts +46 -0
- package/dist/main/ipc/ipc-manager.d.ts +13 -0
- package/dist/main/ipc/types/ipc-handler.d.ts +22 -0
- package/dist/main/ipc/utils/ipc-handler-util.d.ts +24 -0
- package/dist/main/logger/index.d.ts +4 -0
- package/dist/main/logger/index.js +13 -0
- package/dist/main/logger/xo-logger.d.ts +113 -0
- package/dist/main/menu/consts/menu-type.d.ts +1 -0
- package/dist/main/menu/index.d.ts +8 -0
- package/dist/main/menu/index.js +28 -0
- package/dist/main/menu/menu-items.d.ts +192 -0
- package/dist/main/menu/menu-manager-abstract.d.ts +273 -0
- package/dist/main/menu/menu-manager.d.ts +12 -0
- package/dist/main/menu/types/menu.d.ts +101 -0
- package/dist/main/mode/app-mode.d.ts +32 -0
- package/dist/main/mode/index.d.ts +5 -0
- package/dist/main/mode/index.js +9 -0
- package/dist/main/mode/types/mode.d.ts +25 -0
- package/dist/main/protocol/consts/protocol-keys.d.ts +10 -0
- package/dist/main/protocol/handlers/app-protocol-handlers.d.ts +12 -0
- package/dist/main/protocol/index.d.ts +9 -0
- package/dist/main/protocol/index.js +15 -0
- package/dist/main/protocol/protocol-handlers-abstract.d.ts +23 -0
- package/dist/main/protocol/protocol-manager-abstract.d.ts +85 -0
- package/dist/main/protocol/protocol-manager.d.ts +13 -0
- package/dist/main/protocol/types/protocol.d.ts +33 -0
- package/dist/main/remote-service/consts/remote-service-methods.d.ts +5 -0
- package/dist/main/remote-service/index.d.ts +7 -0
- package/dist/main/remote-service/index.js +17 -0
- package/dist/main/remote-service/remote-service-manager-abstract.d.ts +303 -0
- package/dist/main/remote-service/remote-service-manager.d.ts +7 -0
- package/dist/main/remote-service/types/remote-service.d.ts +9 -0
- package/dist/main/renderer-protocol/handlers/renderer-remote-service-protocol-handlers.d.ts +130 -0
- package/dist/main/renderer-protocol/handlers/renderer-root-protocol-handlers.d.ts +65 -0
- package/dist/main/renderer-protocol/index.d.ts +9 -0
- package/dist/main/renderer-protocol/index.js +18 -0
- package/dist/main/renderer-protocol/renderer-protocol-handlers-abstract.d.ts +23 -0
- package/dist/main/renderer-protocol/renderer-protocol-manager-abstract.d.ts +78 -0
- package/dist/main/renderer-protocol/renderer-protocol-manager.d.ts +13 -0
- package/dist/main/renderer-protocol/types/renderer-protocol.d.ts +34 -0
- package/dist/main/shortcut/handlers/app-shortcut-handlers.d.ts +11 -0
- package/dist/main/shortcut/handlers/window-shortcut-handlers.d.ts +11 -0
- package/dist/main/shortcut/index.d.ts +9 -0
- package/dist/main/shortcut/index.js +17 -0
- package/dist/main/shortcut/shortcut-handlers-abstract.d.ts +18 -0
- package/dist/main/shortcut/shortcut-manager-abstract.d.ts +121 -0
- package/dist/main/shortcut/shortcut-manager.d.ts +12 -0
- package/dist/main/shortcut/types/shortcut.d.ts +50 -0
- package/dist/main/store/app-store.d.ts +179 -0
- package/dist/main/store/index.d.ts +7 -0
- package/dist/main/store/index.js +13 -0
- package/dist/main/store/jwt-auth-store.d.ts +36 -0
- package/dist/main/store/types/app-store.d.ts +46 -0
- package/dist/main/store/types/jwt-auth-store.d.ts +14 -0
- package/dist/main/theme/consts/theme-sources.d.ts +10 -0
- package/dist/main/theme/index.d.ts +7 -0
- package/dist/main/theme/index.js +16 -0
- package/dist/main/theme/theme-manager-abstract.d.ts +93 -0
- package/dist/main/theme/theme-manager.d.ts +7 -0
- package/dist/main/theme/types/theme.d.ts +38 -0
- package/dist/main/tray/consts/tray-animation-name.d.ts +1 -0
- package/dist/main/tray/consts/tray-icon-name.d.ts +1 -0
- package/dist/main/tray/icons/blur.ico +0 -0
- package/dist/main/tray/icons/error.ico +0 -0
- package/dist/main/tray/icons/focus.ico +0 -0
- package/dist/main/tray/icons/none.ico +0 -0
- package/dist/main/tray/icons/offline.ico +0 -0
- package/dist/main/tray/icons/online.ico +0 -0
- package/dist/main/tray/icons/success.ico +0 -0
- package/dist/main/tray/index.d.ts +11 -0
- package/dist/main/tray/index.js +27 -0
- package/dist/main/tray/tray-animation.d.ts +48 -0
- package/dist/main/tray/tray-icon.d.ts +51 -0
- package/dist/main/tray/tray-lifecycle-abstract.d.ts +154 -0
- package/dist/main/tray/tray-lifecycle.d.ts +7 -0
- package/dist/main/tray/tray-manager.d.ts +173 -0
- package/dist/main/tray/types/tray.d.ts +81 -0
- package/dist/main/updater/dev-app-update.yml +5 -0
- package/dist/main/updater/index.d.ts +6 -0
- package/dist/main/updater/index.js +20 -0
- package/dist/main/updater/types/updater.d.ts +167 -0
- package/dist/main/updater/updater-manager-abstract.d.ts +237 -0
- package/dist/main/updater/updater-manager.d.ts +7 -0
- package/dist/main/utils/file-association-util.d.ts +43 -0
- package/dist/main/utils/index.d.ts +14 -0
- package/dist/main/utils/index.js +105 -0
- package/dist/main/utils/menu-util.d.ts +12 -0
- package/dist/main/utils/protocol-util.d.ts +49 -0
- package/dist/main/utils/runtime-config-util.d.ts +75 -0
- package/dist/main/utils/shortcut-util.d.ts +38 -0
- package/dist/main/utils/tray-util.d.ts +18 -0
- package/dist/main/utils/window-util.d.ts +55 -0
- package/dist/main/utils/xo-app-root-util.d.ts +30 -0
- package/dist/main/utils/xo-app-util.d.ts +24 -0
- package/dist/main/utils/xo-path-util.d.ts +59 -0
- package/dist/main/utils/xo-util.d.ts +17 -0
- package/dist/main/window/index.d.ts +10 -0
- package/dist/main/window/index.js +36 -0
- package/dist/main/window/main/main-window-lifecycle.d.ts +7 -0
- package/dist/main/window/main/main-window-type.d.ts +5 -0
- package/dist/main/window/setting/setting-window-lifecycle.d.ts +7 -0
- package/dist/main/window/setting/setting-window-type.d.ts +5 -0
- package/dist/main/window/types/window.d.ts +86 -0
- package/dist/main/window/window-lifecycle-abstract.d.ts +514 -0
- package/dist/main/window/window-manager.d.ts +422 -0
- package/dist/preload/bridge/bridge-abstract.d.ts +11 -0
- package/dist/preload/bridge/bridge.d.ts +35 -0
- package/dist/preload/bridge/index.d.ts +6 -0
- package/dist/preload/bridge/index.js +117 -0
- package/dist/preload/bridge/preload.cjs +1706 -0
- package/dist/preload/bridge/preload.internal.d.ts +1 -0
- package/dist/preload/bridge/types/bridge.d.ts +19 -0
- package/dist/preload/bridges/app/app-bridge.d.ts +142 -0
- package/dist/preload/bridges/app/types/app.d.ts +65 -0
- package/dist/preload/bridges/auth/auth-bridge.d.ts +36 -0
- package/dist/preload/bridges/auth/types/auth.d.ts +23 -0
- package/dist/preload/bridges/clipboard/clipboard-bridge.d.ts +37 -0
- package/dist/preload/bridges/clipboard/types/clipboard.d.ts +23 -0
- package/dist/preload/bridges/context-menu/context-menu-bridge.d.ts +27 -0
- package/dist/preload/bridges/context-menu/types/context-menu.d.ts +19 -0
- package/dist/preload/bridges/dialog/dialog-bridge.d.ts +30 -0
- package/dist/preload/bridges/dialog/types/dialog.d.ts +41 -0
- package/dist/preload/bridges/file/file-bridge.d.ts +34 -0
- package/dist/preload/bridges/file/types/file.d.ts +21 -0
- package/dist/preload/bridges/index.d.ts +29 -0
- package/dist/preload/bridges/index.js +40 -0
- package/dist/preload/bridges/ipc/ipc-bridge.d.ts +43 -0
- package/dist/preload/bridges/ipc/types/ipc.d.ts +23 -0
- package/dist/preload/bridges/log/log-bridge.d.ts +52 -0
- package/dist/preload/bridges/log/types/log.d.ts +20 -0
- package/dist/preload/bridges/remote-service/remote-service-bridge.d.ts +55 -0
- package/dist/preload/bridges/remote-service/types/remote-service.d.ts +29 -0
- package/dist/preload/bridges/shell/shell-bridge.d.ts +27 -0
- package/dist/preload/bridges/shell/types/shell.d.ts +19 -0
- package/dist/preload/bridges/theme/theme-bridge.d.ts +32 -0
- package/dist/preload/bridges/theme/types/theme.d.ts +21 -0
- package/dist/preload/bridges/updater/types/updater.d.ts +35 -0
- package/dist/preload/bridges/updater/updater-bridge.d.ts +66 -0
- package/dist/preload/bridges/window/internal/route-redirect-buffer.d.ts +36 -0
- package/dist/preload/bridges/window/types/window.d.ts +53 -0
- package/dist/preload/bridges/window/window-bridge.d.ts +118 -0
- package/dist/preload/utils/bridge-util.d.ts +43 -0
- package/dist/preload/utils/index.d.ts +4 -0
- package/dist/preload/utils/index.js +7 -0
- package/dist/renderer/app/bootstrap-renderer.d.ts +6 -0
- package/dist/renderer/app/index.d.ts +5 -0
- package/dist/renderer/app/index.js +164 -0
- package/dist/renderer/app/styles-element-plus.internal.d.ts +2 -0
- package/dist/renderer/app/styles-xion.internal.d.ts +2 -0
- package/dist/renderer/app/types/app.d.ts +51 -0
- package/dist/renderer/components/captcha/internal/captcha-controller.d.ts +280 -0
- package/dist/renderer/components/captcha/internal/captcha-css-property.d.ts +25 -0
- package/dist/renderer/components/captcha/internal/captcha-defaults.d.ts +33 -0
- package/dist/renderer/components/captcha/internal/captcha-errors.d.ts +21 -0
- package/dist/renderer/components/captcha/internal/captcha-helper.d.ts +72 -0
- package/dist/renderer/components/captcha/internal/captcha-injector.d.ts +16 -0
- package/dist/renderer/components/captcha/internal/captcha-runtime-types.d.ts +153 -0
- package/dist/renderer/components/captcha/internal/captcha-service.d.ts +22 -0
- package/dist/renderer/components/captcha/internal/captcha-slide-types.d.ts +62 -0
- package/dist/renderer/components/captcha/internal/captcha-ui-patch.d.ts +43 -0
- package/dist/renderer/components/captcha/internal/captcha-wasm-loader.d.ts +36 -0
- package/dist/renderer/components/captcha/style/index.less +132 -0
- package/dist/renderer/components/captcha/types/captcha.d.ts +132 -0
- package/dist/renderer/components/captcha/xo-captcha-host.vue +151 -0
- package/dist/renderer/components/captcha/xo-captcha.vue +83 -0
- package/dist/renderer/components/captcha.d.ts +40 -0
- package/dist/renderer/components/context-menu/types/context-menu.d.ts +55 -0
- package/dist/renderer/components/context-menu/xo-context-menu-items.vue +112 -0
- package/dist/renderer/components/context-menu/xo-context-menu.vue +356 -0
- package/dist/renderer/components/context-menu.d.ts +32 -0
- package/dist/renderer/components/divider/types/divider.d.ts +31 -0
- package/dist/renderer/components/divider/xo-divider.vue +176 -0
- package/dist/renderer/components/form/types/form-flex-row.d.ts +21 -0
- package/dist/renderer/components/form/types/form-flex.d.ts +49 -0
- package/dist/renderer/components/form/xo-form-flex-row.vue +122 -0
- package/dist/renderer/components/form/xo-form-flex.vue +115 -0
- package/dist/renderer/components/index.d.ts +70 -0
- package/dist/renderer/components/index.js +1282 -0
- package/dist/renderer/components/layouts/types/app-layout.d.ts +29 -0
- package/dist/renderer/components/layouts/types/mini-layout.d.ts +23 -0
- package/dist/renderer/components/layouts/types/simple-layout.d.ts +17 -0
- package/dist/renderer/components/layouts/xo-app-layout.vue +350 -0
- package/dist/renderer/components/layouts/xo-mini-layout.vue +207 -0
- package/dist/renderer/components/layouts/xo-simple-layout.vue +43 -0
- package/dist/renderer/components/pages/types/app-page.d.ts +25 -0
- package/dist/renderer/components/pages/types/bootstrap-page.d.ts +35 -0
- package/dist/renderer/components/pages/types/dynamic-page.d.ts +20 -0
- package/dist/renderer/components/pages/types/settings-page.d.ts +23 -0
- package/dist/renderer/components/pages/xo-app-page.vue +230 -0
- package/dist/renderer/components/pages/xo-bootstrap-page.vue +93 -0
- package/dist/renderer/components/pages/xo-dynamic-page.vue +28 -0
- package/dist/renderer/components/pages/xo-settings-page.vue +143 -0
- package/dist/renderer/components/radio-group/types/radio-group.d.ts +30 -0
- package/dist/renderer/components/radio-group/xo-radio-group.vue +38 -0
- package/dist/renderer/components/service-status-bar/types/service-status-bar.d.ts +65 -0
- package/dist/renderer/components/service-status-bar/xo-service-status-bar.vue +193 -0
- package/dist/renderer/components/settings-components/types/setting-app-opacity.d.ts +19 -0
- package/dist/renderer/components/settings-components/types/setting-log-level.d.ts +23 -0
- package/dist/renderer/components/settings-components/types/setting-shortcut-keys-record-for-form-flex-rows.d.ts +47 -0
- package/dist/renderer/components/settings-components/types/setting-shortcut-keys-record.d.ts +23 -0
- package/dist/renderer/components/settings-components/types/setting-window-material.d.ts +23 -0
- package/dist/renderer/components/settings-components/xo-setting-app-opacity.vue +105 -0
- package/dist/renderer/components/settings-components/xo-setting-log-level.vue +84 -0
- package/dist/renderer/components/settings-components/xo-setting-shortcut-keys-record-for-form-flex-rows.vue +37 -0
- package/dist/renderer/components/settings-components/xo-setting-shortcut-keys-record.vue +74 -0
- package/dist/renderer/components/settings-components/xo-setting-window-material.vue +83 -0
- package/dist/renderer/components/settings-pages/types/setting-page-folder.d.ts +41 -0
- package/dist/renderer/components/settings-pages/types/setting-page-general.d.ts +23 -0
- package/dist/renderer/components/settings-pages/types/setting-page-remote-service.d.ts +19 -0
- package/dist/renderer/components/settings-pages/types/setting-page-updater.d.ts +27 -0
- package/dist/renderer/components/settings-pages/xo-setting-page-folder.vue +137 -0
- package/dist/renderer/components/settings-pages/xo-setting-page-general.vue +255 -0
- package/dist/renderer/components/settings-pages/xo-setting-page-remote-service.vue +183 -0
- package/dist/renderer/components/settings-pages/xo-setting-page-updater.vue +350 -0
- package/dist/renderer/components/shortcut-keys-record/types/shortcut-keys-record.d.ts +25 -0
- package/dist/renderer/components/shortcut-keys-record/xo-shortcut-keys-record.vue +161 -0
- package/dist/renderer/components/side-bar/types/sidebar-logo.d.ts +39 -0
- package/dist/renderer/components/side-bar/xo-sidebar-logo.vue +133 -0
- package/dist/renderer/components/spacing-line/types/spacing-line.d.ts +17 -0
- package/dist/renderer/components/spacing-line/xo-spacing-line.vue +53 -0
- package/dist/renderer/components/theme-switch/types/theme-switch-mini.d.ts +21 -0
- package/dist/renderer/components/theme-switch/types/theme-switch.d.ts +45 -0
- package/dist/renderer/components/theme-switch/xo-theme-switch-mini.vue +93 -0
- package/dist/renderer/components/theme-switch/xo-theme-switch.vue +200 -0
- package/dist/renderer/components/title-bar/types/title-bar.d.ts +58 -0
- package/dist/renderer/components/title-bar/xo-title-bar.vue +364 -0
- package/dist/renderer/components/types/sidebar-menu.d.ts +37 -0
- package/dist/renderer/components/types/vue.d.ts +9 -0
- package/dist/renderer/components/updater/types/updater.d.ts +97 -0
- package/dist/renderer/components/updater/xo-updater.vue +1190 -0
- package/dist/renderer/components/window-control/types/window-control.d.ts +17 -0
- package/dist/renderer/components/window-control/xo-window-control.vue +193 -0
- package/dist/renderer/composables/index.d.ts +7 -0
- package/dist/renderer/composables/index.js +570 -0
- package/dist/renderer/composables/use-xo-boolean.d.ts +14 -0
- package/dist/renderer/composables/use-xo-data-loader.d.ts +73 -0
- package/dist/renderer/composables/use-xo-form-control.d.ts +84 -0
- package/dist/renderer/composables/use-xo-updater-action.d.ts +25 -0
- package/dist/renderer/global/index.d.ts +4 -0
- package/dist/renderer/global/index.js +0 -0
- package/dist/renderer/global/types/window.d.ts +21 -0
- package/dist/renderer/icons/demo.css +539 -0
- package/dist/renderer/icons/iconfont.css +490 -0
- package/dist/renderer/services/index.d.ts +6 -0
- package/dist/renderer/services/index.js +444 -0
- package/dist/renderer/services/orval-axios-mutator.d.ts +9 -0
- package/dist/renderer/services/types/xo-api.d.ts +92 -0
- package/dist/renderer/services/xo-api-requester.d.ts +129 -0
- package/dist/renderer/store/app/app-store.d.ts +68 -0
- package/dist/renderer/store/auth/auth-store.d.ts +43 -0
- package/dist/renderer/store/index.d.ts +9 -0
- package/dist/renderer/store/index.js +595 -0
- package/dist/renderer/store/remote-service/remote-service-store.d.ts +52 -0
- package/dist/renderer/store/theme/theme-store.d.ts +52 -0
- package/dist/renderer/store/updater/updater-store.d.ts +88 -0
- package/dist/renderer/store/window/window-store.d.ts +58 -0
- package/dist/renderer/styles/css/element-plus.less +280 -0
- package/dist/renderer/styles/css/iconfont-patch.less +6 -0
- package/dist/renderer/styles/css/reset.less +83 -0
- package/dist/renderer/styles/css/scrollbar.less +56 -0
- package/dist/renderer/styles/index.less +35 -0
- package/dist/renderer/styles/mixin.less +144 -0
- package/dist/renderer/styles/var/element-plus/dark.less +32 -0
- package/dist/renderer/styles/var/element-plus/root.less +88 -0
- package/dist/renderer/styles/var/global/dark.less +10 -0
- package/dist/renderer/styles/var/global/root.less +46 -0
- package/dist/renderer/styles/var/layout/dark.less +7 -0
- package/dist/renderer/styles/var/layout/root.less +9 -0
- package/dist/renderer/styles/var/scrollbar/dark.less +13 -0
- package/dist/renderer/styles/var/scrollbar/root.less +35 -0
- package/dist/renderer/utils/auth-route-util.d.ts +117 -0
- package/dist/renderer/utils/context-util.d.ts +13 -0
- package/dist/renderer/utils/error-util.d.ts +12 -0
- package/dist/renderer/utils/index.d.ts +14 -0
- package/dist/renderer/utils/index.js +1522 -0
- package/dist/renderer/utils/keyboard-util.d.ts +86 -0
- package/dist/renderer/utils/message-util.d.ts +161 -0
- package/dist/renderer/utils/renderer-log-util.d.ts +44 -0
- package/dist/renderer/utils/renderer-util.d.ts +37 -0
- package/dist/renderer/utils/router-util.d.ts +186 -0
- package/dist/renderer/utils/shortcut-util.d.ts +20 -0
- package/dist/renderer/utils/storage-util.d.ts +85 -0
- package/dist/renderer/utils/types/vue-router.d.ts +17 -0
- package/dist/shared/app/consts/app-launch-mode.d.ts +9 -0
- package/dist/shared/app/consts/update-mode.d.ts +8 -0
- package/dist/shared/app/consts/window-close-behavior.d.ts +8 -0
- package/dist/shared/app/consts/window-material.d.ts +8 -0
- package/dist/shared/app/consts/xion-name.d.ts +5 -0
- package/dist/shared/app/electron-app-config.d.ts +5 -0
- package/dist/shared/app/index.d.ts +16 -0
- package/dist/shared/app/index.js +30 -0
- package/dist/shared/app/types/app-info.d.ts +32 -0
- package/dist/shared/app/types/app-launch-mode.d.ts +13 -0
- package/dist/shared/app/types/app-paths.d.ts +27 -0
- package/dist/shared/app/types/general-settings.d.ts +27 -0
- package/dist/shared/app/types/on-window-close.d.ts +13 -0
- package/dist/shared/app/types/update-mode.d.ts +13 -0
- package/dist/shared/app/types/window-material.d.ts +2 -0
- package/dist/shared/auth/const/auth-status.d.ts +2 -0
- package/dist/shared/auth/index.d.ts +5 -0
- package/dist/shared/auth/index.js +5 -0
- package/dist/shared/auth/types/auth.d.ts +78 -0
- package/dist/shared/color/consts/color.d.ts +5 -0
- package/dist/shared/color/index.d.ts +5 -0
- package/dist/shared/color/index.js +6 -0
- package/dist/shared/color/types/color.d.ts +26 -0
- package/dist/shared/electron-builder/index.d.ts +4 -0
- package/dist/shared/electron-builder/index.js +0 -0
- package/dist/shared/electron-builder/types/electron-builder-options.d.ts +34 -0
- package/dist/shared/errors/index.d.ts +4 -0
- package/dist/shared/errors/index.js +10 -0
- package/dist/shared/errors/ipc-invoke-error.d.ts +32 -0
- package/dist/shared/ipc/channels/app-channels.d.ts +56 -0
- package/dist/shared/ipc/channels/auth-channels.d.ts +14 -0
- package/dist/shared/ipc/channels/clipboard-channels.d.ts +14 -0
- package/dist/shared/ipc/channels/context-menu-channels.d.ts +10 -0
- package/dist/shared/ipc/channels/dialog-channels.d.ts +12 -0
- package/dist/shared/ipc/channels/file-channels.d.ts +12 -0
- package/dist/shared/ipc/channels/log-channels.d.ts +14 -0
- package/dist/shared/ipc/channels/remote-service-channels.d.ts +20 -0
- package/dist/shared/ipc/channels/shell-channels.d.ts +10 -0
- package/dist/shared/ipc/channels/theme-channels.d.ts +12 -0
- package/dist/shared/ipc/channels/updater-channels.d.ts +26 -0
- package/dist/shared/ipc/channels/window-channels.d.ts +44 -0
- package/dist/shared/ipc/consts/ipc-channel.d.ts +1 -0
- package/dist/shared/ipc/index.d.ts +19 -0
- package/dist/shared/ipc/index.js +46 -0
- package/dist/shared/ipc/ipc-result.d.ts +20 -0
- package/dist/shared/ipc/types/ipc-logger.d.ts +27 -0
- package/dist/shared/ipc/types/ipc.d.ts +61 -0
- package/dist/shared/logger/consts/log-levels.d.ts +14 -0
- package/dist/shared/logger/index.d.ts +4 -0
- package/dist/shared/logger/index.js +10 -0
- package/dist/shared/menu/consts/menu-command.d.ts +1 -0
- package/dist/shared/menu/index.d.ts +6 -0
- package/dist/shared/menu/index.js +10 -0
- package/dist/shared/menu/menu-command.d.ts +24 -0
- package/dist/shared/menu/types/menu.d.ts +72 -0
- package/dist/shared/mode/consts/command.d.ts +10 -0
- package/dist/shared/mode/consts/mode.d.ts +22 -0
- package/dist/shared/mode/index.d.ts +5 -0
- package/dist/shared/mode/index.js +18 -0
- package/dist/shared/remote-service/const/remote-service.d.ts +8 -0
- package/dist/shared/remote-service/index.d.ts +5 -0
- package/dist/shared/remote-service/index.js +38 -0
- package/dist/shared/remote-service/types/remote-service.d.ts +146 -0
- package/dist/shared/renderer/index.d.ts +7 -0
- package/dist/shared/renderer/index.js +0 -0
- package/dist/shared/renderer/types/element-plus.d.ts +20 -0
- package/dist/shared/renderer/types/input.d.ts +11 -0
- package/dist/shared/renderer/types/options.d.ts +22 -0
- package/dist/shared/renderer/types/switch.d.ts +11 -0
- package/dist/shared/renderer-protocol/consts/renderer-protocol-keys.d.ts +10 -0
- package/dist/shared/renderer-protocol/index.d.ts +5 -0
- package/dist/shared/renderer-protocol/index.js +6 -0
- package/dist/shared/renderer-protocol/types/renderer-protocol.d.ts +7 -0
- package/dist/shared/runtime/index.d.ts +4 -0
- package/dist/shared/runtime/index.js +0 -0
- package/dist/shared/runtime/types/runtime.d.ts +20 -0
- package/dist/shared/shortcut/consts/shortcut-handler-ids.d.ts +9 -0
- package/dist/shared/shortcut/consts/shortcut-id.d.ts +1 -0
- package/dist/shared/shortcut/index.d.ts +6 -0
- package/dist/shared/shortcut/index.js +10 -0
- package/dist/shared/shortcut/types/shortcut.d.ts +13 -0
- package/dist/shared/utils/bytes-util.d.ts +16 -0
- package/dist/shared/utils/index.d.ts +15 -0
- package/dist/shared/utils/index.js +42 -0
- package/dist/shared/utils/ipc-util.d.ts +12 -0
- package/dist/shared/utils/log-util.d.ts +33 -0
- package/dist/shared/utils/menu-util.d.ts +12 -0
- package/dist/shared/utils/number-util.d.ts +12 -0
- package/dist/shared/utils/object-util.d.ts +88 -0
- package/dist/shared/utils/regexp-util.d.ts +22 -0
- package/dist/shared/utils/shortcut-util.d.ts +12 -0
- package/dist/shared/utils/string-util.d.ts +14 -0
- package/dist/shared/utils/time-util.d.ts +32 -0
- package/dist/shared/utils/validator-util.d.ts +12 -0
- package/dist/shared/utils/window-shared-util.d.ts +26 -0
- package/dist/shared/window/consts/window-record-id.d.ts +2 -0
- package/dist/shared/window/consts/window-type-name.d.ts +1 -0
- package/dist/shared/window/identity/main-window-identity.d.ts +5 -0
- package/dist/shared/window/identity/setting-window-identity.d.ts +5 -0
- package/dist/shared/window/index.d.ts +8 -0
- package/dist/shared/window/index.js +23 -0
- package/dist/shared/window/types/window.d.ts +84 -0
- package/dist/types/index.d.ts +102 -0
- package/dist/types/index.js +0 -0
- package/dist/vite/build/build-chunk.d.ts +53 -0
- package/dist/vite/build/build-csp-update.d.ts +80 -0
- package/dist/vite/build/build-obfuscation.d.ts +33 -0
- package/dist/vite/build/component-map.d.ts +38 -0
- package/dist/vite/build/component-resolver.d.ts +6 -0
- package/dist/vite/build/index.d.ts +9 -0
- package/dist/vite/build/index.js +18 -0
- package/dist/vite/build/types/build.d.ts +13 -0
- package/dist/vite/config/electron-app-config.d.ts +6 -0
- package/dist/vite/config/electron-builder-config.d.ts +8 -0
- package/dist/vite/config/electron-vite-config.d.ts +9 -0
- package/dist/vite/config/index.d.ts +11 -0
- package/dist/vite/config/index.js +2259 -0
- package/dist/vite/config/types/electron-app-options.d.ts +22 -0
- package/dist/vite/config/types/electron-builder-options.d.ts +16 -0
- package/dist/vite/config/types/electron-vite-options.d.ts +43 -0
- package/dist/vite/config/types/vite-obfuscation.d.ts +36 -0
- package/dist/vite/config/vite-obfuscation-config.d.ts +6 -0
- package/dist/vite/mode/index.d.ts +4 -0
- package/dist/vite/mode/index.js +8 -0
- package/dist/vite/mode/vite-mode.d.ts +37 -0
- package/dist/vite/orval/index.d.ts +4 -0
- package/dist/vite/orval/index.js +75 -0
- package/dist/vite/orval/orval-global-types.d.ts +23 -0
- package/dist/vite/utils/file-write-vite-util.d.ts +30 -0
- package/dist/vite/utils/index.d.ts +5 -0
- package/dist/vite/utils/index.js +10 -0
- package/dist/vite/utils/runtime-config-vite-util.d.ts +39 -0
- package/package.json +287 -0
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
// src/renderer/services/orval-axios-mutator.ts
|
|
2
|
+
import { AxiosError, AxiosHeaders } from "axios";
|
|
3
|
+
async function axiosRequest(config) {
|
|
4
|
+
const response = await window.xion.remoteService.request({
|
|
5
|
+
method: (config.method ?? "GET").toUpperCase(),
|
|
6
|
+
path: config.url?.trim() ?? "",
|
|
7
|
+
query: normalizeQuery(config.params),
|
|
8
|
+
headers: normalizeHeaders(config.headers),
|
|
9
|
+
body: config.data
|
|
10
|
+
});
|
|
11
|
+
const axiosResponse = {
|
|
12
|
+
data: response.data,
|
|
13
|
+
status: response.status,
|
|
14
|
+
statusText: response.statusText,
|
|
15
|
+
headers: AxiosHeaders.from(response.headers),
|
|
16
|
+
config
|
|
17
|
+
};
|
|
18
|
+
const validateStatus = config.validateStatus ?? ((status) => status >= 200 && status < 300);
|
|
19
|
+
if (!validateStatus(response.status)) {
|
|
20
|
+
throw new AxiosError(
|
|
21
|
+
`\u670D\u52A1\u8BF7\u6C42\u5931\u8D25\uFF0CHTTP \u72B6\u6001\u7801 ${response.status}`,
|
|
22
|
+
AxiosError.ERR_BAD_RESPONSE,
|
|
23
|
+
config,
|
|
24
|
+
void 0,
|
|
25
|
+
axiosResponse
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
return axiosResponse;
|
|
29
|
+
}
|
|
30
|
+
function normalizeHeaders(headers) {
|
|
31
|
+
const result = {};
|
|
32
|
+
const values = AxiosHeaders.from(headers).toJSON();
|
|
33
|
+
for (const [name, value] of Object.entries(values)) {
|
|
34
|
+
if (value === null || value === void 0) {
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
result[name] = Array.isArray(value) ? value.join(", ") : String(value);
|
|
38
|
+
}
|
|
39
|
+
return result;
|
|
40
|
+
}
|
|
41
|
+
function normalizeQuery(params) {
|
|
42
|
+
if (!params) {
|
|
43
|
+
return void 0;
|
|
44
|
+
}
|
|
45
|
+
if (params instanceof URLSearchParams) {
|
|
46
|
+
const result2 = {};
|
|
47
|
+
for (const [name, value] of params.entries()) {
|
|
48
|
+
const current = result2[name];
|
|
49
|
+
result2[name] = current === void 0 ? value : Array.isArray(current) ? [...current, value] : [current, value];
|
|
50
|
+
}
|
|
51
|
+
return result2;
|
|
52
|
+
}
|
|
53
|
+
if (typeof params !== "object" || Array.isArray(params)) {
|
|
54
|
+
throw new TypeError("\u67E5\u8BE2\u53C2\u6570\u5FC5\u987B\u662F\u666E\u901A\u5BF9\u8C61\u6216 URLSearchParams");
|
|
55
|
+
}
|
|
56
|
+
const result = {};
|
|
57
|
+
for (const [name, value] of Object.entries(params)) {
|
|
58
|
+
if (value === null || value === void 0) {
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
if (Array.isArray(value)) {
|
|
62
|
+
result[name] = value.map((item) => normalizeQueryValue(name, item));
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
result[name] = normalizeQueryValue(name, value);
|
|
66
|
+
}
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
function normalizeQueryValue(name, value) {
|
|
70
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
throw new TypeError(`\u67E5\u8BE2\u53C2\u6570 ${name} \u53EA\u652F\u6301\u5B57\u7B26\u4E32\u3001\u6570\u5B57\u6216\u5E03\u5C14\u503C`);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// src/renderer/utils/message-util.ts
|
|
77
|
+
import { ElMessage, ElMessageBox, ElNotification } from "element-plus";
|
|
78
|
+
var MessageUtil = class _MessageUtil {
|
|
79
|
+
//<editor-fold desc="Message">
|
|
80
|
+
/**
|
|
81
|
+
* 默认消息配置
|
|
82
|
+
* @type {XoMessageOptions}
|
|
83
|
+
* @private
|
|
84
|
+
*/
|
|
85
|
+
static defaultOptions = {
|
|
86
|
+
duration: 3e3,
|
|
87
|
+
grouping: true,
|
|
88
|
+
offset: 16
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* 打开消息
|
|
92
|
+
* @param {MessageOptions} options 消息配置
|
|
93
|
+
* @returns {MessageHandler}
|
|
94
|
+
*/
|
|
95
|
+
static open(options) {
|
|
96
|
+
const placement = options.placement ?? _MessageUtil.defaultOptions.placement ?? "top";
|
|
97
|
+
const defaultOffset = _MessageUtil.defaultOptions.offset ?? 16;
|
|
98
|
+
const offset = placement.startsWith("bottom") ? defaultOffset : defaultOffset + (window.xionTitleBar?.height ?? 0);
|
|
99
|
+
return ElMessage({
|
|
100
|
+
..._MessageUtil.defaultOptions,
|
|
101
|
+
...options,
|
|
102
|
+
offset: options.offset ?? offset
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* 显示指定类型消息
|
|
107
|
+
* @param {MessageType} type 消息类型
|
|
108
|
+
* @param {XoMessageContent} message 消息内容
|
|
109
|
+
* @param {XoMessageOptions} options 消息配置
|
|
110
|
+
* @returns {MessageHandler}
|
|
111
|
+
* @private
|
|
112
|
+
*/
|
|
113
|
+
static show(type, message, options) {
|
|
114
|
+
return _MessageUtil.open({
|
|
115
|
+
...options,
|
|
116
|
+
type,
|
|
117
|
+
message
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* 成功消息
|
|
122
|
+
* @param {XoMessageContent} message 消息内容
|
|
123
|
+
* @param {XoMessageOptions} options 消息配置
|
|
124
|
+
* @returns {MessageHandler}
|
|
125
|
+
*/
|
|
126
|
+
static success(message, options = {}) {
|
|
127
|
+
return _MessageUtil.show("success", message, options);
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* 主要消息
|
|
131
|
+
* @param {XoMessageContent} message 消息内容
|
|
132
|
+
* @param {XoMessageOptions} options 消息配置
|
|
133
|
+
* @returns {MessageHandler}
|
|
134
|
+
*/
|
|
135
|
+
static primary(message, options = {}) {
|
|
136
|
+
return _MessageUtil.show("primary", message, options);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* 信息消息
|
|
140
|
+
* @param {XoMessageContent} message 消息内容
|
|
141
|
+
* @param {XoMessageOptions} options 消息配置
|
|
142
|
+
* @returns {MessageHandler}
|
|
143
|
+
*/
|
|
144
|
+
static info(message, options = {}) {
|
|
145
|
+
return _MessageUtil.show("info", message, options);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* 警告消息
|
|
149
|
+
* @param {XoMessageContent} message 消息内容
|
|
150
|
+
* @param {XoMessageOptions} options 消息配置
|
|
151
|
+
* @returns {MessageHandler}
|
|
152
|
+
*/
|
|
153
|
+
static warning(message, options = {}) {
|
|
154
|
+
return _MessageUtil.show("warning", message, options);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* 错误消息
|
|
158
|
+
* @param {unknown} error 错误
|
|
159
|
+
* @param {string | XoMessageOptions} fallbackOptions 兜底消息或消息配置
|
|
160
|
+
* @param {XoMessageOptions} options 消息配置
|
|
161
|
+
* @returns {MessageHandler}
|
|
162
|
+
*/
|
|
163
|
+
static error(error, fallbackOptions = "\u64CD\u4F5C\u5931\u8D25", options = {}) {
|
|
164
|
+
const fallback = typeof fallbackOptions === "string" ? fallbackOptions : "\u64CD\u4F5C\u5931\u8D25";
|
|
165
|
+
const config = typeof fallbackOptions === "string" ? options : fallbackOptions;
|
|
166
|
+
return _MessageUtil.show("error", _MessageUtil.parseErrorMessage(error, fallback), config);
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* 关闭全部消息
|
|
170
|
+
* @param {MessageType} type 消息类型
|
|
171
|
+
*/
|
|
172
|
+
static closeAll(type) {
|
|
173
|
+
ElMessage.closeAll(type);
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* 解析错误消息
|
|
177
|
+
* @param {unknown} error 错误
|
|
178
|
+
* @param {string} fallback 兜底消息
|
|
179
|
+
* @returns {string}
|
|
180
|
+
* @private
|
|
181
|
+
*/
|
|
182
|
+
static parseErrorMessage(error, fallback) {
|
|
183
|
+
if (typeof error === "string") {
|
|
184
|
+
return error.trim() || fallback;
|
|
185
|
+
}
|
|
186
|
+
if (error instanceof Error) {
|
|
187
|
+
return error.message || fallback;
|
|
188
|
+
}
|
|
189
|
+
if (_MessageUtil.isMessageObject(error)) {
|
|
190
|
+
return error.message.trim() || fallback;
|
|
191
|
+
}
|
|
192
|
+
return fallback;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* 判断是否为包含 message 的对象
|
|
196
|
+
* @param {unknown} value 值
|
|
197
|
+
* @returns {value is {message: string}}
|
|
198
|
+
* @private
|
|
199
|
+
*/
|
|
200
|
+
static isMessageObject(value) {
|
|
201
|
+
return typeof value === "object" && value !== null && "message" in value && typeof value.message === "string";
|
|
202
|
+
}
|
|
203
|
+
//</editor-fold>
|
|
204
|
+
//<editor-fold desc="Notification">
|
|
205
|
+
/**
|
|
206
|
+
* 打开通知
|
|
207
|
+
* @param {NotificationOptions} options 通知配置
|
|
208
|
+
* @returns {NotificationHandle}
|
|
209
|
+
*/
|
|
210
|
+
static notify(options) {
|
|
211
|
+
const position = options.position ?? "top-right";
|
|
212
|
+
const offset = position.startsWith("bottom") ? 0 : window.xionTitleBar?.height ?? 0;
|
|
213
|
+
return ElNotification({
|
|
214
|
+
...options,
|
|
215
|
+
offset: options.offset ?? offset
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* 关闭全部通知
|
|
220
|
+
*/
|
|
221
|
+
static closeAllNotifications() {
|
|
222
|
+
ElNotification.closeAll();
|
|
223
|
+
}
|
|
224
|
+
//</editor-fold>
|
|
225
|
+
//<editor-fold desc="MessageBox">
|
|
226
|
+
/**
|
|
227
|
+
* 默认消息弹窗配置
|
|
228
|
+
* @type {XoMessageBoxOptions}
|
|
229
|
+
* @private
|
|
230
|
+
*/
|
|
231
|
+
static defaultBoxOptions = {
|
|
232
|
+
confirmButtonText: "\u786E\u5B9A",
|
|
233
|
+
cancelButtonText: "\u53D6\u6D88"
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* 警告弹窗
|
|
237
|
+
* @param {XoMessageBoxContent} message 消息内容
|
|
238
|
+
* @param {string | XoMessageBoxOptions} titleOptions 标题
|
|
239
|
+
* @param {XoMessageBoxOptions} options 消息弹窗配置
|
|
240
|
+
* @returns {Promise<void>}
|
|
241
|
+
*/
|
|
242
|
+
static async alert(message, titleOptions = "\u63D0\u793A", options = {}) {
|
|
243
|
+
const title = typeof titleOptions === "string" ? titleOptions : "\u63D0\u793A";
|
|
244
|
+
const config = typeof titleOptions === "string" ? options : titleOptions;
|
|
245
|
+
try {
|
|
246
|
+
await ElMessageBox.alert(message, title, {
|
|
247
|
+
..._MessageUtil.defaultBoxOptions,
|
|
248
|
+
...config
|
|
249
|
+
});
|
|
250
|
+
} catch (reason) {
|
|
251
|
+
if (!_MessageUtil.isBoxDismissed(reason)) {
|
|
252
|
+
throw reason;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* 确认弹窗
|
|
258
|
+
* @param {XoMessageBoxContent} message 消息内容
|
|
259
|
+
* @param {string | XoMessageBoxOptions} titleOptions 标题
|
|
260
|
+
* @param {XoMessageBoxOptions} options 消息弹窗配置
|
|
261
|
+
* @returns {Promise<boolean>} 是否确认
|
|
262
|
+
*/
|
|
263
|
+
static async confirm(message, titleOptions = "\u63D0\u793A", options = {}) {
|
|
264
|
+
const title = typeof titleOptions === "string" ? titleOptions : "\u63D0\u793A";
|
|
265
|
+
const config = typeof titleOptions === "string" ? options : titleOptions;
|
|
266
|
+
try {
|
|
267
|
+
await ElMessageBox.confirm(message, title, {
|
|
268
|
+
..._MessageUtil.defaultBoxOptions,
|
|
269
|
+
...config
|
|
270
|
+
});
|
|
271
|
+
return true;
|
|
272
|
+
} catch (reason) {
|
|
273
|
+
if (_MessageUtil.isBoxDismissed(reason)) {
|
|
274
|
+
return false;
|
|
275
|
+
}
|
|
276
|
+
throw reason;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* 输入弹窗
|
|
281
|
+
* @param {XoMessageBoxContent} message 消息内容
|
|
282
|
+
* @param {string | XoMessageBoxOptions} titleOptions 标题
|
|
283
|
+
* @param {XoMessageBoxOptions} options 消息弹窗配置
|
|
284
|
+
* @returns {Promise<string | undefined>} 输入值,取消或关闭时返回 undefined
|
|
285
|
+
*/
|
|
286
|
+
static async prompt(message, titleOptions = "\u63D0\u793A", options = {}) {
|
|
287
|
+
const title = typeof titleOptions === "string" ? titleOptions : "\u63D0\u793A";
|
|
288
|
+
const config = typeof titleOptions === "string" ? options : titleOptions;
|
|
289
|
+
try {
|
|
290
|
+
const { value } = await ElMessageBox.prompt(message, title, {
|
|
291
|
+
..._MessageUtil.defaultBoxOptions,
|
|
292
|
+
...config
|
|
293
|
+
});
|
|
294
|
+
return value;
|
|
295
|
+
} catch (reason) {
|
|
296
|
+
if (_MessageUtil.isBoxDismissed(reason)) {
|
|
297
|
+
return void 0;
|
|
298
|
+
}
|
|
299
|
+
throw reason;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
//</editor-fold>
|
|
303
|
+
/**
|
|
304
|
+
* 关闭当前消息弹窗
|
|
305
|
+
*/
|
|
306
|
+
static closeBox() {
|
|
307
|
+
ElMessageBox.close();
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* 判断消息弹窗是否被取消或关闭
|
|
311
|
+
* @param {unknown} reason Promise 拒绝原因
|
|
312
|
+
* @returns {boolean}
|
|
313
|
+
* @private
|
|
314
|
+
*/
|
|
315
|
+
static isBoxDismissed(reason) {
|
|
316
|
+
return reason === "cancel" || reason === "close";
|
|
317
|
+
}
|
|
318
|
+
//</editor-fold>
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
// src/renderer/services/xo-api-requester.ts
|
|
322
|
+
import { isAxiosError } from "axios";
|
|
323
|
+
var XoApiRequester = class _XoApiRequester {
|
|
324
|
+
/** 业务响应选择器 */
|
|
325
|
+
selectors;
|
|
326
|
+
/**
|
|
327
|
+
* 使用业务响应选择器初始化 API 请求器
|
|
328
|
+
* @param {XoApi.Selectors<TResponse>} selectors 业务响应选择器
|
|
329
|
+
*/
|
|
330
|
+
constructor(selectors) {
|
|
331
|
+
this.selectors = selectors;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* 创建 API 请求器
|
|
335
|
+
* @template TResponse 业务响应结构
|
|
336
|
+
* @param {XoApi.Selectors<TResponse>} selectors 业务响应选择器
|
|
337
|
+
* @returns {XoApiRequester<TResponse>}
|
|
338
|
+
*/
|
|
339
|
+
static create(selectors) {
|
|
340
|
+
return new _XoApiRequester(selectors);
|
|
341
|
+
}
|
|
342
|
+
async request(requester, ...optionParams) {
|
|
343
|
+
const options = optionParams[0] ?? {};
|
|
344
|
+
try {
|
|
345
|
+
const args = this.requestArguments(options.args);
|
|
346
|
+
const response = await requester(...args);
|
|
347
|
+
const selectedResponse = response;
|
|
348
|
+
if (this.selectors.isFail?.(selectedResponse)) {
|
|
349
|
+
this.handleFail(this.responseMessage(selectedResponse), options);
|
|
350
|
+
return void 0;
|
|
351
|
+
}
|
|
352
|
+
const data = this.selectors.data(selectedResponse);
|
|
353
|
+
if (data === void 0) {
|
|
354
|
+
this.handleError("\u54CD\u5E94\u6570\u636E\u4E3A\u7A7A", options);
|
|
355
|
+
return void 0;
|
|
356
|
+
}
|
|
357
|
+
return data;
|
|
358
|
+
} catch (error) {
|
|
359
|
+
if (isAxiosError(error) && error.response) {
|
|
360
|
+
try {
|
|
361
|
+
this.handleFail(
|
|
362
|
+
this.responseMessage(
|
|
363
|
+
error.response,
|
|
364
|
+
error.message || "\u8BF7\u6C42\u5931\u8D25"
|
|
365
|
+
),
|
|
366
|
+
options
|
|
367
|
+
);
|
|
368
|
+
} catch (selectorError) {
|
|
369
|
+
this.handleError(this.errorMessage(selectorError), options);
|
|
370
|
+
}
|
|
371
|
+
return void 0;
|
|
372
|
+
}
|
|
373
|
+
this.handleError(this.errorMessage(error), options);
|
|
374
|
+
return void 0;
|
|
375
|
+
} finally {
|
|
376
|
+
options.complete?.();
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* 将请求参数转换为参数元组
|
|
381
|
+
* @template TArgs API 请求参数元组
|
|
382
|
+
* @param {XoApi.Args<TArgs>} args 请求参数
|
|
383
|
+
* @returns {TArgs}
|
|
384
|
+
* @private
|
|
385
|
+
*/
|
|
386
|
+
requestArguments(args) {
|
|
387
|
+
if (args === void 0) {
|
|
388
|
+
return [];
|
|
389
|
+
}
|
|
390
|
+
return Array.isArray(args) ? args : [args];
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* 获取业务响应信息
|
|
394
|
+
* @param {AxiosResponse<TResponse>} response 业务选择器使用的 Axios 响应
|
|
395
|
+
* @param {string} fallback 默认信息
|
|
396
|
+
* @returns {string}
|
|
397
|
+
* @private
|
|
398
|
+
*/
|
|
399
|
+
responseMessage(response, fallback = "\u8BF7\u6C42\u5931\u8D25") {
|
|
400
|
+
const message = this.selectors.message(response);
|
|
401
|
+
return typeof message === "string" && message.trim() ? message : fallback;
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* 处理业务失败
|
|
405
|
+
* @param {string} message 失败信息
|
|
406
|
+
* @param {XoApi.Callbacks} options 请求配置
|
|
407
|
+
* @returns {void}
|
|
408
|
+
* @private
|
|
409
|
+
*/
|
|
410
|
+
handleFail(message, options) {
|
|
411
|
+
if (options.fail) {
|
|
412
|
+
options.fail(message);
|
|
413
|
+
} else {
|
|
414
|
+
MessageUtil.error(message);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* 处理请求异常
|
|
419
|
+
* @param {string} message 错误信息
|
|
420
|
+
* @param {XoApi.Callbacks} options 请求配置
|
|
421
|
+
* @returns {void}
|
|
422
|
+
* @private
|
|
423
|
+
*/
|
|
424
|
+
handleError(message, options) {
|
|
425
|
+
if (options.error) {
|
|
426
|
+
options.error(message);
|
|
427
|
+
} else {
|
|
428
|
+
MessageUtil.error(message);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* 获取请求异常信息
|
|
433
|
+
* @param {unknown} error 请求异常
|
|
434
|
+
* @returns {string}
|
|
435
|
+
* @private
|
|
436
|
+
*/
|
|
437
|
+
errorMessage(error) {
|
|
438
|
+
return error instanceof Error ? error.message : "\u8BF7\u6C42\u5931\u8D25";
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
export {
|
|
442
|
+
XoApiRequester,
|
|
443
|
+
axiosRequest
|
|
444
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
|
+
/**
|
|
3
|
+
* Orval Axios 请求适配器(用于指定 orval 生成配置需要的公共请求方法)
|
|
4
|
+
* <p>生成接口保留 AxiosResponse 返回结构,实际请求通过 preload IPC 交给主进程</p>
|
|
5
|
+
* @template T OpenAPI 响应数据类型
|
|
6
|
+
* @param {AxiosRequestConfig} config Orval 生成的 Axios 请求配置
|
|
7
|
+
* @returns {Promise<AxiosResponse<T>>}
|
|
8
|
+
*/
|
|
9
|
+
export declare function axiosRequest<T>(config: AxiosRequestConfig): Promise<AxiosResponse<T>>;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type {AxiosResponse} from 'axios'
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 渲染进程 API 请求器 命名空间
|
|
7
|
+
*/
|
|
8
|
+
namespace XoApi {
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 从实际响应类型中提取业务数据类型
|
|
12
|
+
* @template TResponse API 实际响应类型
|
|
13
|
+
*/
|
|
14
|
+
type ResponseData<TResponse> =
|
|
15
|
+
TResponse extends { data?: unknown }
|
|
16
|
+
? TResponse['data']
|
|
17
|
+
: unknown
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 响应值选择器
|
|
21
|
+
* @template TResponse 选择器响应
|
|
22
|
+
* @template TValue 选择结果
|
|
23
|
+
*/
|
|
24
|
+
type Selector<TResponse, TValue> = (response: TResponse) => TValue
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 业务响应选择器
|
|
28
|
+
* <p>选择器负责运行时解析响应字段,与响应族提供的编译期类型推断相互独立。</p>
|
|
29
|
+
* @template TResponse 业务响应结构
|
|
30
|
+
*/
|
|
31
|
+
interface Selectors<TResponse> {
|
|
32
|
+
// 响应信息选择器,仅非空字符串会作为提示信息
|
|
33
|
+
message: Selector<AxiosResponse<TResponse>, string>
|
|
34
|
+
// 业务数据选择器,返回 undefined 时视为响应数据为空
|
|
35
|
+
data: Selector<AxiosResponse<TResponse>, unknown>
|
|
36
|
+
// 业务失败判断方法,未设置时 HTTP 请求成功即视为业务成功
|
|
37
|
+
isFail?: Selector<AxiosResponse<TResponse>, boolean>
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 请求回调配置
|
|
42
|
+
*/
|
|
43
|
+
interface Callbacks {
|
|
44
|
+
// HTTP 或业务失败回调
|
|
45
|
+
fail?: (message: string) => void
|
|
46
|
+
// 网络、IPC、选择器或程序运行异常回调
|
|
47
|
+
error?: (message: string) => void
|
|
48
|
+
// 请求完成回调
|
|
49
|
+
complete?: () => void
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* API 请求参数
|
|
54
|
+
* <p>单个非数组参数可以直接传入,也可以使用参数元组;单个数组参数必须使用参数元组。</p>
|
|
55
|
+
* @template TArgs API 请求参数元组
|
|
56
|
+
*/
|
|
57
|
+
type Args<TArgs extends unknown[]> =
|
|
58
|
+
TArgs extends []
|
|
59
|
+
? undefined | []
|
|
60
|
+
: TArgs extends [infer TArg]
|
|
61
|
+
? TArg extends readonly unknown[]
|
|
62
|
+
? TArgs
|
|
63
|
+
: TArg | TArgs
|
|
64
|
+
: TArgs
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* API 请求参数配置
|
|
68
|
+
* <p>请求函数允许无参数调用时,args 可以省略。</p>
|
|
69
|
+
* @template TArgs API 请求参数元组
|
|
70
|
+
*/
|
|
71
|
+
type ArgOptions<TArgs extends unknown[]> = [] extends TArgs
|
|
72
|
+
? { args?: Args<TArgs> }
|
|
73
|
+
: { args: Args<TArgs> }
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* API 请求配置
|
|
77
|
+
* @template TArgs API 请求参数元组
|
|
78
|
+
*/
|
|
79
|
+
type Options<TArgs extends unknown[]> = Callbacks & ArgOptions<TArgs>
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* API 请求配置参数
|
|
83
|
+
* <p>请求函数允许无参数调用时可以省略请求配置,否则必须提供请求配置。</p>
|
|
84
|
+
* @template TArgs API 请求参数元组
|
|
85
|
+
*/
|
|
86
|
+
type OptionParams<TArgs extends unknown[]> = [] extends TArgs
|
|
87
|
+
? [options?: Options<TArgs>]
|
|
88
|
+
: [options: Options<TArgs>]
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export {}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API 请求函数
|
|
3
|
+
* @template TArgs API 请求参数元组
|
|
4
|
+
* @template TResponse API 原始响应体
|
|
5
|
+
*/
|
|
6
|
+
type Requester<TArgs extends unknown[], TResponse> = (...args: TArgs) => Promise<{
|
|
7
|
+
data: TResponse;
|
|
8
|
+
}>;
|
|
9
|
+
/**
|
|
10
|
+
* API 请求器
|
|
11
|
+
* <p>业务端通过通用响应结构描述响应,并通过选择器配置响应信息、业务状态和业务数据的读取方式。</p>
|
|
12
|
+
* <p>调用 {@linkcode XoApiRequester.request} 时,从具体请求函数的响应类型自动推断业务数据类型。</p>
|
|
13
|
+
* @template TResponse 业务响应结构
|
|
14
|
+
* @class XoApiRequester
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // 后端通用响应结构
|
|
18
|
+
* export interface ApiResponse<T = unknown> {
|
|
19
|
+
* // 业务状态码
|
|
20
|
+
* code?: number
|
|
21
|
+
* // 响应信息
|
|
22
|
+
* message?: string
|
|
23
|
+
* // 业务是否成功
|
|
24
|
+
* success?: boolean
|
|
25
|
+
* // 业务数据
|
|
26
|
+
* data?: T
|
|
27
|
+
* }
|
|
28
|
+
*
|
|
29
|
+
* // 创建 API 请求器
|
|
30
|
+
* const Api = XoApiRequester.create<ApiResponse>({
|
|
31
|
+
* // 选择消息
|
|
32
|
+
* message: response => response.data.message ?? '',
|
|
33
|
+
* // 选择业务数据
|
|
34
|
+
* data : response => response.data.data,
|
|
35
|
+
* // 判断业务请求是否失败
|
|
36
|
+
* isFail : response => response.data.success !== true,
|
|
37
|
+
* })
|
|
38
|
+
*
|
|
39
|
+
* // 调用 API 请求函数
|
|
40
|
+
* const login = await Api.request(HomeApi.loginPOST, {
|
|
41
|
+
* args: loginRequest,
|
|
42
|
+
* })
|
|
43
|
+
* console.log(login) // {user: ..., token: ...}
|
|
44
|
+
*
|
|
45
|
+
* // 多参数调用
|
|
46
|
+
* const data = await Api.request(HomeApi.multiParameterPOST, {
|
|
47
|
+
* args: [arg1, arg2, ...],
|
|
48
|
+
* fail: (message: string) => {},
|
|
49
|
+
* error: (message: string) => {},
|
|
50
|
+
* complete: () => {},
|
|
51
|
+
* })
|
|
52
|
+
* console.log(data)
|
|
53
|
+
*/
|
|
54
|
+
export declare class XoApiRequester<TResponse> {
|
|
55
|
+
/** 业务响应选择器 */
|
|
56
|
+
private readonly selectors;
|
|
57
|
+
/**
|
|
58
|
+
* 使用业务响应选择器初始化 API 请求器
|
|
59
|
+
* @param {XoApi.Selectors<TResponse>} selectors 业务响应选择器
|
|
60
|
+
*/
|
|
61
|
+
private constructor();
|
|
62
|
+
/**
|
|
63
|
+
* 创建 API 请求器
|
|
64
|
+
* @template TResponse 业务响应结构
|
|
65
|
+
* @param {XoApi.Selectors<TResponse>} selectors 业务响应选择器
|
|
66
|
+
* @returns {XoApiRequester<TResponse>}
|
|
67
|
+
*/
|
|
68
|
+
static create<TResponse>(selectors: XoApi.Selectors<TResponse>): XoApiRequester<TResponse>;
|
|
69
|
+
/**
|
|
70
|
+
* 调用 API 并提取业务数据
|
|
71
|
+
* @template TArgs API 请求参数元组
|
|
72
|
+
* @template TArg API 请求参数
|
|
73
|
+
* @template TActualResponse API 实际响应体
|
|
74
|
+
* @param {Requester<TArgs, TActualResponse>} requester API 请求函数
|
|
75
|
+
* @param {XoApi.Callbacks & { args: TArg }} options 请求配置
|
|
76
|
+
* @returns {Promise<XoApi.ResponseData<TActualResponse> | undefined>}
|
|
77
|
+
*/
|
|
78
|
+
request<TArg, TActualResponse>(requester: (arg: TArg) => Promise<{
|
|
79
|
+
data: TActualResponse;
|
|
80
|
+
}>, options: XoApi.Callbacks & {
|
|
81
|
+
args: TArg;
|
|
82
|
+
}): Promise<XoApi.ResponseData<TActualResponse> | undefined>;
|
|
83
|
+
request<TArg, TActualResponse>(requester: (arg: TArg) => Promise<{
|
|
84
|
+
data: TActualResponse;
|
|
85
|
+
}>, options: XoApi.Callbacks & {
|
|
86
|
+
args: [TArg];
|
|
87
|
+
}): Promise<XoApi.ResponseData<TActualResponse> | undefined>;
|
|
88
|
+
request<TArgs extends unknown[], TActualResponse>(requester: Requester<TArgs, TActualResponse>, ...optionParams: XoApi.OptionParams<TArgs>): Promise<XoApi.ResponseData<TActualResponse> | undefined>;
|
|
89
|
+
/**
|
|
90
|
+
* 将请求参数转换为参数元组
|
|
91
|
+
* @template TArgs API 请求参数元组
|
|
92
|
+
* @param {XoApi.Args<TArgs>} args 请求参数
|
|
93
|
+
* @returns {TArgs}
|
|
94
|
+
* @private
|
|
95
|
+
*/
|
|
96
|
+
private requestArguments;
|
|
97
|
+
/**
|
|
98
|
+
* 获取业务响应信息
|
|
99
|
+
* @param {AxiosResponse<TResponse>} response 业务选择器使用的 Axios 响应
|
|
100
|
+
* @param {string} fallback 默认信息
|
|
101
|
+
* @returns {string}
|
|
102
|
+
* @private
|
|
103
|
+
*/
|
|
104
|
+
private responseMessage;
|
|
105
|
+
/**
|
|
106
|
+
* 处理业务失败
|
|
107
|
+
* @param {string} message 失败信息
|
|
108
|
+
* @param {XoApi.Callbacks} options 请求配置
|
|
109
|
+
* @returns {void}
|
|
110
|
+
* @private
|
|
111
|
+
*/
|
|
112
|
+
private handleFail;
|
|
113
|
+
/**
|
|
114
|
+
* 处理请求异常
|
|
115
|
+
* @param {string} message 错误信息
|
|
116
|
+
* @param {XoApi.Callbacks} options 请求配置
|
|
117
|
+
* @returns {void}
|
|
118
|
+
* @private
|
|
119
|
+
*/
|
|
120
|
+
private handleError;
|
|
121
|
+
/**
|
|
122
|
+
* 获取请求异常信息
|
|
123
|
+
* @param {unknown} error 请求异常
|
|
124
|
+
* @returns {string}
|
|
125
|
+
* @private
|
|
126
|
+
*/
|
|
127
|
+
private errorMessage;
|
|
128
|
+
}
|
|
129
|
+
export {};
|