diff --git a/packages/ui/certd-client/src/views/sys/plugin/config-editor.vue b/packages/ui/certd-client/src/views/sys/plugin/config-editor.vue index 26ab22c5..b0a2f371 100644 --- a/packages/ui/certd-client/src/views/sys/plugin/config-editor.vue +++ b/packages/ui/certd-client/src/views/sys/plugin/config-editor.vue @@ -1,74 +1,111 @@ + + diff --git a/packages/ui/certd-client/src/views/sys/plugin/rollbackable.vue b/packages/ui/certd-client/src/views/sys/plugin/rollbackable.vue new file mode 100644 index 00000000..3fb43fba --- /dev/null +++ b/packages/ui/certd-client/src/views/sys/plugin/rollbackable.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/packages/ui/certd-client/src/views/sys/plugin/use-config.tsx b/packages/ui/certd-client/src/views/sys/plugin/use-config.tsx index 3cefb462..11b4fda1 100644 --- a/packages/ui/certd-client/src/views/sys/plugin/use-config.tsx +++ b/packages/ui/certd-client/src/views/sys/plugin/use-config.tsx @@ -3,45 +3,55 @@ import { useFormWrapper } from "@fast-crud/fast-crud"; import { useI18n } from "/@/locales"; import { Modal, notification } from "ant-design-vue"; import ConfigEditor from "./config-editor.vue"; +import { useModal } from "/@/use/use-modal"; export function usePluginConfig() { const { openCrudFormDialog } = useFormWrapper(); const { t } = useI18n(); + const modal = useModal(); async function openConfigDialog({ row, crudExpose }) { - function createCrudOptions() { - return { - crudOptions: { - columns: {}, - form: { - wrapper: { - width: "80%", - title: "插件元数据配置", - saveRemind: false, - slots: { - "form-body-top": () => { - return ( -
- -
- ); - }, - }, - }, - afterSubmit() { - notification.success({ message: t("certd.operationSuccess") }); - crudExpose.doRefresh(); - }, - async doSubmit({ form }: any) { - return await api.ImportPlugin({ - ...form, - }); - }, - }, - }, - }; - } - const { crudOptions } = createCrudOptions(); - await openCrudFormDialog({ crudOptions }); + // function createCrudOptions() { + // return { + // crudOptions: { + // columns: {}, + // form: { + // wrapper: { + // width: "80%", + // title: "插件元数据配置", + // saveRemind: false, + // slots: { + // "form-body-top": () => { + // return ( + //
+ // + //
+ // ); + // }, + // }, + // }, + // afterSubmit() { + // notification.success({ message: t("certd.operationSuccess") }); + // crudExpose.doRefresh(); + // }, + // async doSubmit({ form }: any) { + // return await api.ImportPlugin({ + // ...form, + // }); + // }, + // }, + // }, + // }; + // } + // const { crudOptions } = createCrudOptions(); + // await openCrudFormDialog({ crudOptions }); + + modal.confirm({ + title: "插件元数据配置", + width: "80%", + content: () => { + return ; + }, + }); } return {