Vanessa 2023-05-29 20:34:16 +08:00
parent 02b62eba65
commit 953920e4de
3 changed files with 34 additions and 6 deletions

View file

@ -5,7 +5,7 @@ import {Plugin} from "./index";
import {exportLayout} from "../layout/util";
/// #endif
import {API} from "./API";
import {isMobile, isWindow} from "../util/functions";
import {getFrontend, isMobile, isWindow} from "../util/functions";
const getObject = (key: string) => {
const api = {
@ -20,7 +20,7 @@ const runCode = (code: string, sourceURL: string) => {
};
export const loadPlugins = async (app: App) => {
const response = await fetchSyncPost("/api/petal/loadPetals");
const response = await fetchSyncPost("/api/petal/loadPetals", {frontend: getFrontend()});
let css = "";
// 为加快启动速度,不进行 await
response.data.forEach((item: IPluginData) => {