From a62c0e6059cae95b90e73ec145547f57dc266d23 Mon Sep 17 00:00:00 2001 From: buqiyuan <1743369777@qq.com> Date: Wed, 8 Jun 2022 15:41:05 +0800 Subject: [PATCH] refator: change sendSync to send --- src/platform/electron-browser/preload.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/electron-browser/preload.ts b/src/platform/electron-browser/preload.ts index bd07f5c4..605e074c 100644 --- a/src/platform/electron-browser/preload.ts +++ b/src/platform/electron-browser/preload.ts @@ -150,12 +150,12 @@ window.eo.getModuleSettings = (moduleID) => { // 注册单个mock路由 window.eo.registerMockRoute = ({ method, path, data }) => { - return ipcRenderer.sendSync('eo-sync', { action: 'registerMockRoute', data: { method, path, data } }); + return ipcRenderer.send('eo-sync', { action: 'registerMockRoute', data: { method, path, data } }); }; // 注销mock路由 window.eo.unRegisterMockRoute = ({ method, path }) => { - return ipcRenderer.sendSync('eo-sync', { action: 'unRegisterMockRoute', data: { method, path } }); + return ipcRenderer.send('eo-sync', { action: 'unRegisterMockRoute', data: { method, path } }); }; // 获取mock服务地址 window.eo.getMockUrl = () => {