This commit is contained in:
Vanessa 2023-05-16 18:49:12 +08:00
parent a335101d49
commit 2750a1b86f
2 changed files with 6 additions and 2 deletions

View file

@ -3,7 +3,7 @@ import {genUUID} from "../util/genID";
import {addResize, resizeTabs} from "./util"; import {addResize, resizeTabs} from "./util";
/// #if MOBILE /// #if MOBILE
// 检测移动端是否引入了桌面端的代码 // 检测移动端是否引入了桌面端的代码
alert("Need remove unused code"); debugger;
/// #endif /// #endif
export class Layout { export class Layout {

View file

@ -1,8 +1,10 @@
import {fetchPost} from "../util/fetch"; import {fetchPost} from "../util/fetch";
import {App} from "../index"; import {App} from "../index";
import {Plugin} from "./index"; import {Plugin} from "./index";
import {API} from "./API"; /// #if !MOBILE
import {exportLayout} from "../layout/util"; import {exportLayout} from "../layout/util";
/// #endif
import {API} from "./API";
const getObject = (key: string) => { const getObject = (key: string) => {
const api = { const api = {
@ -97,9 +99,11 @@ export const loadPlugin = (app: App, item: IPluginData) => {
const styleElement = document.createElement("style"); const styleElement = document.createElement("style");
styleElement.textContent = item.css; styleElement.textContent = item.css;
document.head.append(styleElement); document.head.append(styleElement);
/// #if !MOBILE
exportLayout({ exportLayout({
reload: false, reload: false,
onlyData: false, onlyData: false,
errorExit: false errorExit: false
}); });
/// #endif
}; };