mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 01:20:12 +01:00
This commit is contained in:
parent
db690c51b6
commit
09e5828ffe
4 changed files with 22 additions and 11 deletions
|
|
@ -7,6 +7,7 @@ import {resizeTopBar, saveLayout} from "../layout/util";
|
|||
import {API} from "./API";
|
||||
import {getFrontend, isMobile, isWindow} from "../util/functions";
|
||||
import {Constants} from "../constants";
|
||||
import {uninstall} from "./uninstall";
|
||||
|
||||
const requireFunc = (key: string) => {
|
||||
const modules = {
|
||||
|
|
@ -231,3 +232,14 @@ export const afterLoadPlugin = (plugin: Plugin) => {
|
|||
saveLayout();
|
||||
/// #endif
|
||||
};
|
||||
|
||||
export const reloadPlugin = (app: App) => {
|
||||
app.plugins.forEach((item) => {
|
||||
uninstall(this, item.name);
|
||||
});
|
||||
loadPlugins(this).then(() => {
|
||||
app.plugins.forEach(item => {
|
||||
afterLoadPlugin(item);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue