mirror of
https://github.com/certd/certd.git
synced 2026-07-13 00:37:36 +08:00
chore: 完善第三方依赖动态加载
This commit is contained in:
@@ -143,3 +143,10 @@ export async function GetPluginByName(name: string): Promise<PluginConfigBean> {
|
||||
data: { name },
|
||||
});
|
||||
}
|
||||
|
||||
export async function ClearRuntimeDeps(): Promise<void> {
|
||||
return await request({
|
||||
url: "/sys/settings/clearRuntimeDeps",
|
||||
method: "post",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useI18n } from "/src/locales";
|
||||
import { Ref, ref, computed } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||
import { Modal } from "ant-design-vue";
|
||||
import { Modal, message } from "ant-design-vue";
|
||||
//@ts-ignore
|
||||
import yaml from "js-yaml";
|
||||
import { usePluginImport } from "./use-import";
|
||||
@@ -83,6 +83,23 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||
await openImportDialog({ crudExpose });
|
||||
},
|
||||
},
|
||||
clearRuntimeDeps: {
|
||||
show: true,
|
||||
icon: "ion:trash-outline",
|
||||
text: t("certd.clearRuntimeDeps"),
|
||||
type: "primary",
|
||||
danger: true,
|
||||
async click() {
|
||||
Modal.confirm({
|
||||
title: t("certd.confirm"),
|
||||
content: t("certd.clearRuntimeDepsConfirm"),
|
||||
async onOk() {
|
||||
await api.ClearRuntimeDeps();
|
||||
message.success(t("certd.clearRuntimeDepsSuccess"));
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
table: {
|
||||
|
||||
Reference in New Issue
Block a user