From 2750a1b86f002eda7059a5bfce8b87ef2317bd19 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 16 May 2023 18:49:12 +0800 Subject: [PATCH] :iphone: --- app/src/layout/index.ts | 2 +- app/src/plugin/loader.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/layout/index.ts b/app/src/layout/index.ts index e497b35ba..953c77eff 100644 --- a/app/src/layout/index.ts +++ b/app/src/layout/index.ts @@ -3,7 +3,7 @@ import {genUUID} from "../util/genID"; import {addResize, resizeTabs} from "./util"; /// #if MOBILE // 检测移动端是否引入了桌面端的代码 -alert("Need remove unused code"); +debugger; /// #endif export class Layout { diff --git a/app/src/plugin/loader.ts b/app/src/plugin/loader.ts index 160a79596..01c7e4eae 100644 --- a/app/src/plugin/loader.ts +++ b/app/src/plugin/loader.ts @@ -1,8 +1,10 @@ import {fetchPost} from "../util/fetch"; import {App} from "../index"; import {Plugin} from "./index"; -import {API} from "./API"; +/// #if !MOBILE import {exportLayout} from "../layout/util"; +/// #endif +import {API} from "./API"; const getObject = (key: string) => { const api = { @@ -97,9 +99,11 @@ export const loadPlugin = (app: App, item: IPluginData) => { const styleElement = document.createElement("style"); styleElement.textContent = item.css; document.head.append(styleElement); + /// #if !MOBILE exportLayout({ reload: false, onlyData: false, errorExit: false }); + /// #endif };