mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
This commit is contained in:
parent
875f00398e
commit
99725ea21d
14 changed files with 122 additions and 40 deletions
|
|
@ -18,7 +18,7 @@ const runCode = (code: string, sourceURL: string) => {
|
|||
export const loadPlugins = (app: App) => {
|
||||
fetchPost("/api/petal/loadPetals", {}, response => {
|
||||
let css = "";
|
||||
response.data.forEach((item: { id: string, name: string, js: string, css: string, i18n: IObject }) => {
|
||||
response.data.forEach((item: { name: string, js: string, css: string, i18n: IObject }) => {
|
||||
const exportsObj: { [key: string]: any } = {};
|
||||
const moduleObj = {exports: exportsObj};
|
||||
try {
|
||||
|
|
@ -39,7 +39,6 @@ export const loadPlugins = (app: App) => {
|
|||
const plugin = new pluginClass({
|
||||
app,
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
i18n: item.i18n
|
||||
});
|
||||
app.plugins.push(plugin);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue